I am having troubles to get Rich Push messages working with Urban Airship for Android. I tried to implement by myself looking at the tutorials, but after many tries i decided to test first the sample app from the github: https://github.com/urbanairship/android-samples/tree/master/RichPushSample
The problem is that is not working as i was expecting to work. I send the Rich Push messages from their testing website, and if i check the inbox i can see the new messages (and the old ones of course), but i never get a notification for those pushes.I didn't change anything in the code (neither in the AndroidManifest.xml).
Normal pushes are working fine, and debugging i can see how the RichNotificationBuilder creates the notification for normal pushes, and when tapped, the PushReceiver handles the intent. However for the Rich Push messages i never get a notification (thus i never receive intent in PushReceiver).
All the listeners they provide for rich push messages RichPushInbox.Listener, RichPushManager.Listener are only receiving when manually triggering inbox updates and so on (never when sending rich push from website)
Also tried sending them an email to their support email, but no answer.
Any help?
Thanks!
Related
In my Android app, the Push Notification Firebase Cloud Messaging is only received on the device when the user is not in the app at the time of sending - The message is received, but not displayed. I made a console.writeline to log if the message was received, and it was, but no sound was made and the notification didn't pop up.
Some background:
I am testing on an emulator
I am using the FirebasePushNotification Plugin (as it is a Xamarin.Forms project and I want to be able to do cross-platform setup
I have downloaded GoogleServicesJSON, set build action, etc.
I think you are sending the Data messages,When using this type of message you are the one providing the UI and handling when push notification is received on an Android device.
So you should define and create your notification yourself in the receive callback.
When testing to the android app from the firebase console the status of the messages says completed and shows the delivery date. How do we check whether a message has sent to the receipts and delivered in an android app with fire-base: https://console.firebase.google.com?
I am working on a firebase quickstart app to test push notification message to my target users. Please help me.
#SaikCaskey have an insight of the solution of your question, though I do not agree on some points.
The push notification is not guaranteed to be received to your targeted user actually. Push notification might fail for several reason. But that's not the issue here. You might get notifications even if your application is in background or stopped. You need to start your FirebaseMessagingService with START_STICKY. This behaviour might differ in different devices too. Some devices allows/disallow this behaviour of receiving push notification when your app is stopped.
So, if you need to log when your user has received the push notification, you might get it in a bit complex way. When your device will come online you'll get the push and in your onMessageReceived function you can get the System.Clock for getting the time of notification received. Then create an instance of Firebase and then set the time to the reference node of the user's notification delivery time.
Hope that helps!
Is it possible to receive a GCM push notification but choose to not show it in the notification bar under certain circumstances? On an incoming push notification, I would like to do a check of whether or not the user is within a specified location or not, and only show the push notification in the notification bar if the user is within this location. I'm using Urban Airship.
Thanks in advance
Update:
To clarify: in the Urban Airship intent receiver, I have the onReceive() method, which I thought was what I was supposed to modify in order to conditionally show the push notification. However, it seems that this intent is only for showing logging information and I suspect that the real receiving intent is baked into the Urban Airship .jar file as the .class file com.urbanairship.push.GCMPushReceiver, which contains the onMessage() method. Since this is not the source code, it seems it would be difficult to modify this part since it is linked to the numerous other components. Does anybody have any idea on how this could be done?
It is definitely possible: push notifications are information to the device, but on Android they aren't automatically shown. You can choose to not display a notification at all. With Urban Airship you can probably just replace their default receiver with one of your own to prevent it from displaying in the notification area.
I have an app built for iOS and Android which has push notifications. Everything is working great however I was wondering if there is a way to store the data of the push notification in the app so that when users launch the app after receiving a notification I can show them the message again?
Basically I allow users to share information and/or chat amongst their friends. If they receive a notification when the app is in the background it comes through as a normal push message but when they launch the app I would like to direct them to the chat feature to see the message again.
I am storing the messages sent in a remote DB but seeing as they have already received the payload it doesn't make much sense for the app to call the remote DB to retrieve the same message.
I am using Distriqt's extensions in AS3 and Air 3.5.
Cheers
I asked Distriqt's support for the same thing a few weeks ago and they explained that there is no way to get the information of the push notification message while the app is closed so they suggested this :
- when the user opens the app, you call your server to check if they haven't missed anything, and get the data from there. If there has been a push, you display the push message as if it was received with the app in the foreground.
It's a bit tricky and not very satisfying but it works.. As long as the user follows the path.
If your user receives the push and chooses not to open your app, he will still get the push message in your app next time he opens it.
I was having trouble figuring this out too but I found a solution! Basically if a user launches an app (not running in the background) by way of a notification it comes through in the Invoke event, not the usual Notification event. So do this:
NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, invoked);
private function invoked(evt:InvokeEvent):void
{
if (evt.reason == InvokeEventReason.NOTIFICATION)
{
var payload:Object = Object(evt.arguments[0]);
// do stuff
}
}
That's pretty much it. There's more detail in this blog post here: http://blogs.adobe.com/airodynamics/2012/05/29/push-notifications-support-in-ios/
NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, invoked);
doesn't work correctly for Android push notification. Android starts with InvokeEventReason.standard all the time, so we cant receive message. It works only for iOS.
Hi i wish to implement push notification in my own android application. how can i do? please give me some ideas....
This kind of broadcast receivers should receive messages even if my app is closed(like Gmail.here i receive one new message in my inbox means that time the notification message is displayed on top of my android device,clicked that notification message means directly go to inbox and view that message).
here i wish to insert one data on my database means the notification message is display on my android app even my app is closed.
Please see http://developer.android.com/guide/google/gcm/index.html. You need to implement GCM.
EDIT:
To get notification even if app is in background, see Android GCM (push notification): device doesn't receive notification if application is stopped.
See Android GCM basic implementation, http://developer.android.com/guide/google/gcm/demo.html & How to setup Google Cloud Messaging for Android?
see http://developer.android.com/guide/google/gcm/index.html for detaily. There you find a tutorial and all the basic stuff