Hi.
I recently made a software that can launch any application that is
open. It works really fine, except for 2 applications, and i really
don't understand why.
Here is what i do:
1) I make a list of all running apps:
Code:
activityManager = (ActivityManager)this.getSystemService
(ACTIVITY_SERVICE);
List<ActivityManager.RunningTaskInfo> allTasks =
activityManager.getRunningTasks(30);
2) I get all the Intents to lauch apps:
Code:
for (ActivityManager.RunningTaskInfo aTask : allTasks) {
(...)
PackageManager monPackageManager =getPackageManager();
myIntent= myPackageManager.getLaunchIntentForPackage
(aTask.baseActivity.getPackageName()));
3) I launch my apps:
Code:
this.startActivity(myIntent);
This code work for all applications and it's nice. Therefore, i get
problems with:
com.android.contacts
com.android.phone -> myIntent is null!!!
I really don't understand what happen with these 2 android
applications!
--
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