http://developer.android.com/reference/android/content/pm/PackageManager.html#getLaunchIntentForPackage%28java.lang.String%29

This method returns null if no launch intent was found though... so you have
to handle that.

On Thu, Feb 17, 2011 at 2:00 PM, sharksoft android <[email protected]>wrote:

> app = activityManager.getRunningAppProcesses();
> manager = this.getPackageManager();
>
> for (final RunningAppProcessInfo name : app) {
>
> info = manager.getPackageInfo(name.processName, 1);
> appinfo = info.applicationInfo;
>
> Intent intent = new Intent(Intent.ACTION_MAIN,null);
> intent.addCategory(Intent.CATEGORY_LAUNCHER);
> final ComponentName cn1 = new
> ComponentName(name.processName,---------------!!!!!------------:D--------);
> intent.setComponent(cn1);
> intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
> startActivity(intent);
>
>
> I have a problem with the second parameter of ComponentName because I
> have only package name and not also the main activity name of an
> application. Can you help me?
>
> thanks ;)
>
> --
> 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

-- 
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

Reply via email to