On Fri, May 4, 2012 at 5:05 PM, sushmitha <[email protected]>wrote:
>
>
>
>>
>> Intent i = new Intent();
>>
>> PackageManager manager = getPackageManager();
>>
>> i =
>> manager.getLaunchIntentForPackage("package_name_to_switch");
>>
>> startActivity(i);
>>
>> Above code is exactly what you want.
>>
>>
>>
> Hiiiiiiiii,
> if i use the above code,where i need to pass the nextActivty's .class file?
> we usually write *Intent i=new Intent(this,Nextactivity.class);*
> please clarify that................
Here, you are actually switching to application, not to an activity. (as we
mentioned the package name)
It will switch you to the first activity/ main activity of your switched
application.
There is another way if you want to start a particular activity from
another application.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en