How to get package name of the android app installed on the device
I want to get package name of opening app that installed on the android device.
I need package name of that partic开发者_JS百科ular application running.
What's the best way to get it?
Get the active application name in Android
ActivityManager.getRunningAppProcesses()
Get active Application name in Android
How to get package name from anywhere?
@Hari: When particular application is running on your emulator, in Eclipse, you can browse to Devices view and see the list of running applications. Along all the running services, the third-party applications will also be there with their package name listed.
Another but tricky way is that in Emulator you can press Menu button and go to Settings and then browse to Manage Applications list. As soon as you tap this button, the list of all installed/running applications will get visible and quickly you can see their respective package name
Hope this will help you..
Download this application : https://play.google.com/store/apps/details?id=com.csdroid.pkg or the same app in another android store app. This app will give you the package name and the mainActivity from the app.
https://i.stack.imgur.com/cuhey.png
AFAIK, you can't intercept the moment of starting thirdparty application. But what you can do is obtain a list of installed apps with their package names via PackageManager
.
精彩评论