Monday, December 29, 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) {

// 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 Serializing :)

Saturday, December 6, 2014

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 :)
  1. 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 ]
  2.  Search for the sdk-tools/platform-tools/other stuff in the page like:
    1.   For example to download the android sdk api 21,search for "android-21". You will see entry in xml like ""
    2. Copy the entry and append to url ''
    3. Your download url will be like
[ Similarly you can download the other stuff zip files as mentioned in above steps ]

Once you have downloaded, you just copy the zip file to your development machine.Extract the files and place under <android-sdk-path>/<respective-folder-for-tools/other-stuff>. 

You can check the placed files are correct,by opening the ANDROID SDK MANAGER and check the Status of downloaded tools is shown as 'INSTALLED'
:) :)

sdk tools/platform tools/API's download links for your reference  [ latest as of post writing ]

Leave your question in case of any issues :) 

AWS Certified Solutions Architect Associate - AWS Introduction - Questions

All the Best !!! Show Result !! Try Again !! ×