I'm having difficulty figuring out if the user has deleted my app from their Huawei phone when sending a Push.
I'm looking at the push docs, I do not see any error code for this case. Also, looking at the sample app that Huawei has given, I can't see it there either.
Does anyone know exactly what I need to look for when sending a push to Huawei to detect if an app is deleted from the phone?
One gets posted a receipt state with value 2, when the app isn't installed anymore.
If the app does not exist after the message is successfully sent to the device, the app has been uninstalled.
My ReceiptStatus.php would feature these values, but not yet implemented.
Related
I am testing Firebase SMS authentication on my android app on release mode. So, after few succesful authentications, I started getting the error:
we have blocked all requests from this device due to unusual activity. Try again later
I deleted the affected user but still not working. Then, I contacted Firebase support and that's what they said:
There's a limit of 5 SMS per phone number per 4 hour
Now I am struggling how to test my app before making it live for real users.
I need to test receiving SMS instead of using whitelisted phone numbers. The reason is that I have a bug on release mode which requires many testings to be fixed. Please I need some help!
I'm using the following plugin for implementing and handling FCM push notifications in my xamarin application and there's one little unaddressed problem I'm facing.
I was hoping someone else has already figured it out and could help me.
THE PROBLEM:
It seems to be duplicating my MainActivity although I have the LaunchMode set to SingleTop.
There's an event called OnNotificationReceived that's provided by the library.
This event fires as expected, only once, when the application is in the foreground.
When I minimize the application (let it run in the background), send a notification to the device and tap on the notification, it opens the application, as expected, but if I send another notification after that, while the application is in the foreground, The OnNotificationReceived Event is fired twice.
I've tried changing the NotificationActivityFlags property to SingleTop.
I've tried changing my MainActivity's Launch Mode to SingleTop
I tried running the sample application they've provided to check if its something that I'm doing wrong, and still the same thing happens.
Logging the issue in their Github repository
None of the above have worked.
The issue can be reproduced by:
downloading the sample from the repository, link provided above
replacing their google-services.json file with your own from the Firebase
console.
change the package name of the sample of the application to the one you
have registered on Firebase
following the steps above that I've mentioned
ADDITIONAL INFO
Version Number of Plugin: 1.3.0
Device Tested On: Huawei P8 Lite Android Version 6.0
Version of VS: Visual Studio 2019
Version of Xamarin: 3.4.0.1009999
Update:
Unfortunately, the method below has not proven successful after attempting to implement it, I should have thought of the fact that I'm still going to need the notification object for iOS, earlier.
Myself and the team are going to implement a way to keep track of the users platform on the server and send them a notification either with or without the notification based on their platform, since iOS handles FCM notifications differently from Android. For now we're going to use Google's Instance ID service to determine what platform existing users are on.
Workaround:
I hope this helps someone in the future, if not I hope someone can provide me with a better solution.
In order to have my cake and eat it, basically be able to keep the notification object in the payload instead of removing it and having to further customise the payload to display notifications just for iOS, I changed the MainActivity's (the activity thats launched when a user taps on the notification) Launch mode to SingleInstance. That way I can keep my notification object in the payload and not have to worry about the OnNotificationReceived event being triggered twice.
I've been using FCM console(web) to test push notification for Android smartphone.
I use push token from Android device, but FCM console says "Completed" and it's not delivered.
It worked fine before, but recent few days, it's not working.
Is there anyone facing same problem?
I got an answer from FCM support team.
Thank you for that information.
It would seem that you are affected by the changes made between July
31 and August 1st. We rolled out a change to Firebase Notifications to
filter apps by GMP App Id rather than by package name. This change was
purely internal and should have had no effect on visible behavior as
all apps using Firebase should have had both package name and app id
set to match. However, we are now seeing some apps that have the wrong
app id set and this is causing messages to not be delivered (or in
some cases to be delivered to the wrong app if an app has the app id
of another app). These apps have a bug that was previously masked but
is now exposed.
We are investigating ways in which apps have sent these incorrect app
ids and ways in which we can catch them and warn app developers.
For now, the Firebase Notifications console will only work with apps
that use the FCM SDK. We recommend updating to the latest version of
the FCM SDK in order to mitigate the issue, but in case you don't want
to migrate to FCM SDK, you can still use your own server to send push
notifications.
Apologies for the inconvenience this may have caused. Please let me
know if there's anything else I could help with.
Regards,
We have an iOS app which is able to receive push notification through the Apigee SDK.
The push notifications are sent by using the Apigee admin console.
Within the console, we configured both dev and prod environments. The prod environment is used for the app published in the App Store. In both cases, the push notifications are well received by our iPhone devices.
However, my question is about the status displayed in the Message History section of the Apigee console.
In the case of the dev notifier, the console display the message : Finished (with errors) with by example, a total sent of 660 for a total errors of 1318.
I don't well understand these figures and I don't know where they are documented.
Is the total sent figure for the number of devices to which the push is sent? However, we don't have as many devices with the dev app version installed
The devices we have with the dev app version installed have well received the push as expected so why are there as many errors?
The detail of the error message is: "INVALID_TOKEN: Failed sending notification."
Thanks very much for your help
We have a bug where statistics get calculated inaccurately if you have errors from the Apns service since they come back asynchronously.
Invalid Token usually means the device is not registered with the apple push notifications service anymore.
We utilize php-apns to send push notifications to our iPhone app users. This worked great when we were developing, however once the app was in the app store and I switched to the production certificate, I'm only able to send to a single recipient. Any more than that and no one gets a push notification.
I've read elsewhere that others have experienced this problem. The only "solution" I'm aware of is to open & close a fresh connection to APNS for every push notification, but I'm not doing that. That's not a good solution.
Anyone have any thoughts?
I found the answer!
It appears to be an issue with sending to the development device tokens. Like most people, we have a database that stores the device tokens, and the earlier records were populated with our device tokens from testing.
As soon as I net out those device tokens from my list, all works!
I really hope someone finds this useful!