Member since Dec 23, 2009
Forum Posts: 17
After writing a single activity, there comes a need to transition to another activity to perform another task either with or without information from the first activity.
Android platform allows transition by means of Intent Interface.
In this example there are two activities - IntentActionDemo.java and IntentA.java that both extend the super class Activity. Do not forget to declare any new activity in the AndroidManifest.xml with permission.
I have introduced buttons in both activities which have a listener to allow an intent to transition from one intent to the other activity and vis-versa.
Simple intent example; Note that optional step 2 was not used in our demo. Step 1: Intent i = new Intent(context, NameOfClassToTransitionTo.class)
Step 2:(Optional)Intents can take various forms that make it even carry data in key/name pairs ie i.putExtra("key1", "My first Info") i.putExtra("key2", "My second Info")
Serete, This will look a bit like a useless post, but every time I need a quick way to do something I stumble upon an example written by you that does EXACTLY what I need, nothing more, nothing less :) thanks!