here is sample code
PackageManager appInfo = context.getPackageManager();
List<PackageInfo> packageList=appInfo.getInstalledPackages(0);
packageList holds the all the packages in your android device/
emulator
check with ur application package
then you will get u r application information
The application information gives you the all activities
For example your package name is com.example.mypackage
for(int i=0;i<packageList.size();i++)
if(packageList.get(i).compareTo(your package name)==0){
PackageInfo correctPackage=packageList.get(i);
ActivityInfo aInfo[]=correctPackage.receivers;
ApplicationInfo applicationInfo=aInfo[0].applicationInfo;
}
On Apr 15, 2:22 pm, Jobs He <[email protected]> wrote:
> Hi :
> In my project ,I need get all the name of the activities ,not
> only my own application, but also the third party
> application , and how can I get ? Thank you !
--
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
To unsubscribe, reply using "remove me" as the subject.