Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,737,354 Members 41,872 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 419
Posts: 886
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


Try Pi Developers apps

Socials Addict || Floata For Twitter
| | Pi locker

Check Pi Developers Blog

pidevelopers.blogspot.com


My Work For Android



 
sameer.n.soni
Old
#2  
Member
Thanks Meter 22
Posts: 89
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.

My Device
 

My Phone: Samsung Galaxy Y GT-S5360
Kernel: Hells Fusion #50
Current ROM: Odexed Hyperion 9 Final Build
Current Mods: Fly On Mod V4 Beta6 with EXT4 Tweak

My works
 
mohamedrashad
Old
(Last edited by mohamedrashad; 22nd May 2014 at 11:05 AM.)
#3  
mohamedrashad's Avatar
Senior Member - OP
Thanks Meter 419
Posts: 886
Join Date: Nov 2012
Location: ismailia
Deleted


Try Pi Developers apps

Socials Addict || Floata For Twitter
| | Pi locker

Check Pi Developers Blog

pidevelopers.blogspot.com


My Work For Android



 
Himan Boro
Old
#4  
Himan Boro's Avatar
Senior Member
Thanks Meter 61
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 419
Posts: 886
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


Try Pi Developers apps

Socials Addict || Floata For Twitter
| | Pi locker

Check Pi Developers Blog

pidevelopers.blogspot.com


My Work For Android



 
Jonny
Old
#6  
Jonny's Avatar
Forum Moderator
Thanks Meter 7826
Posts: 7,838
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 419
Posts: 886
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


Try Pi Developers apps

Socials Addict || Floata For Twitter
| | Pi locker

Check Pi Developers Blog

pidevelopers.blogspot.com


My Work For Android



 
Jonny
Old
#8  
Jonny's Avatar
Forum Moderator
Thanks Meter 7826
Posts: 7,838
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 419
Posts: 886
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


Try Pi Developers apps

Socials Addict || Floata For Twitter
| | Pi locker

Check Pi Developers Blog

pidevelopers.blogspot.com


My Work For Android



 
Jonny
Old
(Last edited by Jonny; 22nd May 2014 at 04:35 PM.)
#10  
Jonny's Avatar
Forum Moderator
Thanks Meter 7826
Posts: 7,838
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:
Select Code
Integer i = 1;

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

Code:
Select 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:
Select 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