I would like to store the package name when user launch the application.When user open a application i would like to get that package name.
Thanks in advance.
I would like to store the package name when user launch the application.When user open a application i would like to get that package name.
Thanks in advance.
It is possible if API version < 21, but not newer version. Look at GET_TASKS permission:
https://developer.android.com/reference/android/Manifest.permission.html#GET_TASKS
This can be easily abused so it is good to deprecate it.