I have a service setup to receive a PACKAGE_ADDED and a PACKAGE_REMOVED intent from all <data android:scheme="package" />
I receive the intent correctly, but I need to know how to use the Intent and Context classes from onReceive to get the name and label of the application that was added or removed.
I have been able to use Intent.getDataString() to get the uri string of the package, but don’t really know where to go from there.
Thanks.
I don’t know what the
Urilooks like. I would assume it contains the package name (e.g.,com.commonsware.my.really.awesome.app). If so, you can usePackageManagerto get the rest of the details regarding that application.