Two ways to make oAuth integration

Great documentation about linking twitter to Android app.

This authentication technique can be used for the oAuth of other websites.

1. Using web browser

http://blog.doityourselfandroid.com/2011/02/13/guide-to-integrating-twitter-android-application/

2. Using webview.

http://blog.doityourselfandroid.com/2011/08/08/improved-twitter-oauth-android/

https://github.com/ddewaele/AndroidTwitterGoogleApiJavaClient

Activity launch mode

Excellent excellent explanation about the activity launch mode of android

http://www.intridea.com/blog/2011/6/16/android-understanding-activity-launchmode

[Excerpt]

Before I dive into the launch mode of an activity, we need to first understand the term, ‘Task’. A task is the stack (“Last in, First out”) which contains a collection of activity instances. Normally, when a user starts an app a new task will be created, and the first activity instance is called as a root of the task. The Android system can hold multiple tasks at the same time and only one task is in the foreground. Similar to a double click of the home key on iOS, if you long press the HOME key on Android you’ll be presented with a list of your currently running applications. You can select any one of these applications (which are currently running in the background) in order to bring it to the foreground and interact with the app! Of course, because background tasks do tend to use up your processor cycles you should try to keep your backgrounded apps to a minimum to ensure your phone performs optimally.

Now let’s look at the launch mode of an activity. Launch mode allows you to define how a new instance or the existing instance of an activity is associated with the current task. The activity launch mode has four valid values: …..

List to Array, Array to List

Don’t understand why I keep forgetting this simple snippet. ūüėõ

 

From Array to List

  1. String[]¬†words¬†=¬†{“ace”,¬†“boom”,¬†“crew”,¬†“dog”,¬†“eon”};
  2. List<String> wordList = Arrays.asList(words);

 

From List to Array

  1. List<String> wordList = new ArrayList<String>();
  2. wordList.add(“ace”);
  3. wordList.add(“boom”);
  4. wordList.add(“crew”);
  5. wordList.add(“dog”);
  6. String [] words = wordList.toArray(new String[wordList.size()]);