Showing posts from December, 2014

Facebook Android Sdk : Serialize GraphUser object

If you check at the Facebook sdk GraphUser object documentation , it does not implements the as a result of which you can pass the GraphUser object through activities.

Though if you like to pass GraphUser to other activities, you can do it by saving GraphUser json string in a String instance and then pass it,

// Save GraphUser json information in String instance and pass to another activity using intent
List<GraphUser> selectedUsers = friendPickerFragment.getSelection();
List<GraphUser> selectedUsersJson = new ArrayList<String>();
for (GraphUser graphUser : selectedUsers) { selectedUsersJson.add(graphUser.getInnerJSONObject().toString()); }

// Re-initialize the GraphUser from the saved graph user json from the intent List<GraphUser> selectedUsers = new ArrayList<GraphUser>();
for (String graphUserJson : selectedUsersJson) { selectedUsers .add(GraphObject.Factory.create(new JSONObject(graphUserJson),GraphUser.class)); }

Happy Serializin…

Download Android SDK offline

Many of you interested in Android development or automation, must have downloaded Android SDK installer and have noticed once you install the SDK on your machine, you still need to download some more file using the Android SDK Manager like :

Android SDK Tools
Android Platform Tools
Android API's

In some case you may not have the fast internet connection/bandwidth to download this much stuff.( Same with me :D ). So, here is the solution i am sharing with you guys how you can download with stuff from an high internet connection machine and then cut and paste to your development machine :)
Navigate to the link in browser. [ Note this is the last updated link at the time of writing this post.In future you will need to check the latest page by +1 increment to digit shown in url. Example next updated version should have 'respository-10.xml' in end ] Search for the sdk-tools/platform-tools/other stuff in the page like:  Fo…