I would like to add a Status Bar Notification for my Android App. This notification should be shown on the Status Bar after the App is installed. I have a background service for the App which is where I could put the notification code. How do I trigger the Notification only after the App is installed?
Any insight to solve this problem will be very helpful.
Thanks.
Turn on notifications for Android devicesTap More on the bottom navigation bar and select Settings. Tap Turn on notifications. Tap Notifications. Tap Show notifications.
Floating Notifications is now available on devices supporting Android OS 11 and above, so keep up-to-date with Conversations and app Notifications without having to scroll through your Notification panel by activating Floating Notifications on your Galaxy phone now.
Check if the notification appears in your Android notification bar or tray. Check that you have enabled notifications on your phone. Android Settings > Apps (then Manage Apps for some users) > Signal > Check on Show notifications. > Notifications > Enable message notifications.
There is a (major) exception to this rule. If your app was installed from the Android Market, the Market app will send an com.android.vending.INSTALL_REFERRER
intent to your app upon installation. For example, AnySoftKeyboard displays a custom notification after it is installed:
It makes a lot of sense for a keyboard to display a notification because new keyboards are disabled by default, so a notification can prompt users to enable it. Otherwise most users would assume the install failed when their keyboard wasn't on the list of input devices (followed by angry support emails, or even worse -- BAD RATINGS AND REFUNDS!).
Refer to this page for more information: Get referrer after installing app from Android Market. I also found this code in the AnySoftKeyboard manifest file (located at http://softkeyboard.googlecode.com):
<receiver android:name="com.anysoftkeyboard.receivers.AnySoftKeyboardInstalledReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
I hope this helps,
Barry
How do I trigger the Notification only after the App is installed?
You cannot do this. None of your code will run immediately upon install.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With