Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,785,371 Members 38,713 Now Online
XDA Developers Android and Mobile Development Forum

Objection to Tutorials

Tip us?
 
mohamedrashad
Old
#1  
mohamedrashad's Avatar
Senior Member - OP
Thanks Meter 442
Posts: 936
Join Date: Nov 2012
Location: ismailia
Default Objection to Tutorials

Great developers all over xda make good guides and awesome mods.but all they do is writing the mod and say copy to bla bla and you are done. This don't create a real developer. I think you should explain the codes to us. If you don't mind some people wanna learn here
Pi Locker is updated to V3.1 with amazing additions and upgrading go and try it >>> Google play || XDA

 
sameer.n.soni
Old
#2  
Senior Member
Thanks Meter 22
Posts: 112
Join Date: Jan 2014
Location: Bhilai
True but you should move the thread to the General section.
Press thanks if I helped you instead of typing it. Isn't it a lot more simpler!

My Device
 

My Phone: Samsung Galaxy Y GT-S5360
Current ROM: CM 11

My works
 
mohamedrashad
Old
(Last edited by mohamedrashad; 22nd May 2014 at 11:05 AM.)
#3  
mohamedrashad's Avatar
Senior Member - OP
Thanks Meter 442
Posts: 936
Join Date: Nov 2012
Location: ismailia
Deleted
Pi Locker is updated to V3.1 with amazing additions and upgrading go and try it >>> Google play || XDA

 
Himan Boro
Old
#4  
Himan Boro's Avatar
Senior Member
Thanks Meter 62
Posts: 494
Join Date: Jul 2013
Location: Guwahati
The thread is in its right place....

ya GUIDE Codes shoul be explaind
The Following User Says Thank You to Himan Boro For This Useful Post: [ Click to Expand ]
 
mohamedrashad
Old
#5  
mohamedrashad's Avatar
Senior Member - OP
Thanks Meter 442
Posts: 936
Join Date: Nov 2012
Location: ismailia
I know java well, but most of Guides are on Smali language, I don't like copy paste cause I wanna learn it right, So what's the problem in explaining mods
@Jonny pls move this to general section, thanks
Pi Locker is updated to V3.1 with amazing additions and upgrading go and try it >>> Google play || XDA

 
Jonny
Old
#6  
Jonny's Avatar
Forum Moderator
Thanks Meter 7,961
Posts: 7,936
Join Date: Jul 2011
Location: Cheshire

 
DONATE TO ME
If you want to know what smali functions do then download Virtuous Ten Studio by Diamondback and the rest of the Virtuous team then look in the included smali help section.
 
mohamedrashad
Old
#7  
mohamedrashad's Avatar
Senior Member - OP
Thanks Meter 442
Posts: 936
Join Date: Nov 2012
Location: ismailia
Quote:
Originally Posted by Jonny View Post
If you want to know what smali functions do then download Virtuous Ten Studio by Diamondback and the rest of the Virtuous team then look in the included smali help section.
I don't mean the smali basics, I meant explaining mods in depth instead of this Copy-Paste, I will check VTS asap, thanks for suggestion
Pi Locker is updated to V3.1 with amazing additions and upgrading go and try it >>> Google play || XDA

 
Jonny
Old
#8  
Jonny's Avatar
Forum Moderator
Thanks Meter 7,961
Posts: 7,936
Join Date: Jul 2011
Location: Cheshire

 
DONATE TO ME
Quote:
Originally Posted by mohamedrashad View Post
I don't mean the smali basics, I meant explaining mods in depth instead of this Copy-Paste, I will check VTS asap, thanks for suggestion
With smali you are basically just moving numbers around and calling other methods (invoke and invoke-virtual) - usually you store the result in a register for example v0. Then you've got you're comparison statements like if-ne (if not equal), if-eq (if equal), if-nez (if not equal to zero) etc. Then you can also call resources by using the hex values in public.xml, eg const v4, "0x070000" for example.

Once you know the basic functions and principals of the language then its fairly easy to follow the code of the mods to find out what they're doing and what they're changing.
The Following 3 Users Say Thank You to Jonny For This Useful Post: [ Click to Expand ]
 
mohamedrashad
Old
#9  
mohamedrashad's Avatar
Senior Member - OP
Thanks Meter 442
Posts: 936
Join Date: Nov 2012
Location: ismailia
Quote:
Originally Posted by Jonny View Post
With smali you are basically just moving numbers around and calling other methods (invoke and invoke-virtual) - usually you store the result in a register for example v0. Then you've got you're comparison statements like if-ne (if not equal), if-eq (if equal), if-nez (if not equal to zero) etc. Then you can also call resources by using the hex values in public.xml, eg const v4, "0x070000" for example.

Once you know the basic functions and principals of the language then its fairly easy to follow the code of the mods to find out what they're doing and what they're changing.
Simpler than Java I should learn it soon
Pi Locker is updated to V3.1 with amazing additions and upgrading go and try it >>> Google play || XDA

 
Jonny
Old
(Last edited by Jonny; 22nd May 2014 at 04:35 PM.)
#10  
Jonny's Avatar
Forum Moderator
Thanks Meter 7,961
Posts: 7,936
Join Date: Jul 2011
Location: Cheshire

 
DONATE TO ME
Quote:
Originally Posted by mohamedrashad View Post
Simpler than Java I should learn it soon
Ha! I wish, to do for example the following in java

Code:
Integer i = 1;

if (i = 0) {
      return "wtf is happening!";
} else {
     return "everything is normal";
}
in smali would be something like:

Code:
const v1, 0x1

const-string v2, "wtf is happening"

const-string v3, "everything is normal"

if-eqz v1 :cond_0

return v3

:cond_0

return v2
My syntax is probably not correct but this was just something wrote off the top of my head so... Point is what you can do relatively easily in java with a couple of lines of code can be a pain in the neck and take up a lot of lines to do in smali - especially with more complex functions.

For example I'd hate to have to try and do something like this in smali (code snippet from an app I've made for my school).

Code:
class LoadNews extends AsyncTask<String, String, String> {

        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            mProgress = new ProgressDialog(getSherlockActivity());
            mProgress.setMessage("Loading news, Please wait...");
            mProgress.setIndeterminate(false);
            mProgress.setCancelable(true);
            mProgress.show();
        }

        protected String doInBackground(String... args) {
            List<NameValuePair> params = new ArrayList<NameValuePair>();
            JSONObject json = jParser.makeHttpRequest(AllNewsItemsURL, "GET", params);
            try {
                int success = json.getInt(TAG_SUCCESS);
                if (success == 1) {
                    newsItems = json.getJSONArray(NEWS);
                    for (int i = 0; i < newsItems.length(); i++) {
                        JSONObject obj = newsItems.getJSONObject(i);
                        Integer id = i + 1;
                        String title = obj.getString(TITLE);
                        String story = obj.getString(STORY);
                        String imageSrc = IMAGE_DIR_URL + obj.getString(IMAGE_SRC);
                        String date = obj.getString(DATE);
                        story = replace(story, imageSrc);
                        date = buildDate(date);
                        if (id > dbhandler.getNewsCount()) {
                        	dbhandler.addNews(new News(id, title, story, imageSrc, date));   
                        } else {
                        	dbhandler.updateNews(new News(id, title, story, imageSrc, date));
                        }
                        if (isCancelled() || FlagCancelled) break;
                    }
                } else {
                	Log.e("JSON Response", "success == 0");
                }
            } catch (JSONException e) {
                e.printStackTrace();
            }
            return null;
        }

        protected void onPostExecute(String file_url) {
        	mProgress.dismiss();
        	getSherlockActivity().runOnUiThread(new Runnable() {
                public void run() {
                	getNewsList();
                }
            });
        }
    }

The Following 2 Users Say Thank You to Jonny For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes