When you install an app from Google Play Web store through PC web browser on an Android device. A notification, "App successfully installed", will be seen on notification bar of the android device. I have seen for many apps (LinkedIn app etc), a click on this notification will launch the app itself. How can I implement the same for my app? Any pointers? Currently, for my app, if I click on this notification it will open play store app and show the uninstall option. I dont want that :(
I searched for "launching app from notification bar", but it talks about creating an notification (pendingintent) and all. But in my scenario the notification is created by Google play services. So how to launch my app when user click on this notification "app successfully installed"?
Thank you so much,
The notification is displayed by Google Play app after installation automatically, for every app that is downloaded from Google Play, you don't need to do something special for it. :-)
It seems that if your application does not have an Activity that declares an intent-filter for the launcher, then the notification won't open your app and instead will open the Google Play listing for it.
I'm not sure what your app does, but most of the time you want to something the user can launch anyway. Reasons include:
If your app really isn't supposed to have a launcher activity, you could use PackageManager
to disable the activity after they've opened it the first time.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.