Using Firebase Cloud Messaging I can push data-only messages. Doing this sends data to my app without showing a notification to the user. Is there any way to do this using only the Android SDK?
How do I send a data-only Android notification using the Android SDK?
102 Views Asked by Carl Patenaude Poulin At
1
There are 1 best solutions below
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in PUSH-NOTIFICATION
- Android: Transferring Data via ContentIntent
- Android Status Bar Icon Size - Using Cordova / Phonegap Push Plugin
- Parse.com - setting up push notifications for single users
- Android Push Notification - Parsing JSON Notification tag name to get raw file (Resource Id or Uri)
- Notification using setFullScreenIntent() for BigTextStyle opening Activity automatically
- Xiaomi does not receive a notification when the application is not running
- Is it possible to send push notifications as per user preference(Time) from parse?
- Cancel pending push notification
- GCM set expiration date for push notifications
- JPush works all over the world?
- Allow user to select notification sound in iOS Notification Settings
- Ios Push notifications not working. (Google play games unity plugin)
- Push notifications that trigger a background refresh before showing the push notification VS silent push
- JavaPNS NoClassDefFoundError
- p12 certificate is always incorrect at Pushwoosh
Related Questions in ANDROID-PUSH-NOTIFICATION
- Android - Firebase push notification not working
- Should I store Android device tokens for sending push notifications?
- In case of Long Text Notifications only single line (Trimmed Text) is appearing on MI/XIAOMI Phone
- How to implement push notification in Qt android application
- How to localise the Firebase remote notification body text in Android?
- How can I display time and date in notification?
- How to add app icon badge in flutter android?
- How start android app with remote message?
- Flutter Scheduled Local Notifications Can't Display and Notify
- Limit on max live access_tokens for Firebase Cloud Messenging
- Gradle Issues with Firebase implementation (buildScript syntax)
- firebase push notification android kotlin appears on the sender device
- How do I send a data-only Android notification using the Android SDK?
- OSPermissionSubscriptionState : Cannot resolve symbol
- Not receiving notification when using Azure hub notifications rest api from Postman
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If your intention is to show a notification to the user when your app receives data.
You can manually create a notification in your customized
FirebaseMessagingService.According to the FCM documentation, Data-only messages are forwarded to your customized
FirebaseMessagingServicewhether your app is foreground or background.So what you have to do is manually create a notification by using
Notification.BuilderandNotificationManagerinonMessageReceivedof your customizedFirebaseMessagingService.You can check the sample code here.