Moving Data between Intents in Android
Being working on android from past few months the most attracting feature it provides is about activities and intents. Intents play a major role wheter you have to make a primitive screen to screen workflow of your application or if you have to combine various different activities or tasks (defined as different classes) together.
In the calling Activity;
Intent intent = new Intent ( the calling activity class.this,to be called activity.class );
intent.putExtra( the calling activity class.data , the calling activity class.data );
startActivity(intent);// Keeping the variable data static would keep less room for bugs and errors
In the called Activity, you have to catch the data.
Bundle extras= getIntent().getExtras();
DataType data= extras.getString(the calling activity class.data);
About this entry
You’re currently reading “Moving Data between Intents in Android,” an entry on Sujay Gawand’s Weblog
- Published:
- 4.25.09 / 3am
- Category:
- Android
- Tags:
- activity, Android, intent, moving data


1 Comment
Jump to comment form | comments rss [?] | trackback uri [?]