'Is possible to check if the user/device still has my app installed?
I'm creating a Flutter+Firebase app for a dental franchise.
Every client will be asked to install the app before the treatment starts. When the treatment finishes, the system will send a notification to the device that will trigger a survey within the app, just to check the client overall satisfaction.
The problem is, if the client doesn't has the app installed anymore, it must not send any notification, because the client will be asked to answer the survey before leaving the clinic.
I thought about using Firebase Data Messaging to return an "OK" to the server, like a "PING-PONG" request, but it works only when the app is on background or foreground, not if it is terminated.
There's any other method to confirm if my app is still active/alive?
Solution 1:[1]
No. If the user uninstalls you app, you can't access that device anymore. Also push messages won't be shown anymore.
However, you can have it the other way round, have an app send an event to firebase, once it receives a background push. So you can see if your app is still active.
Solution 2:[2]
There's any other method to confirm if my app is still active/alive?
From what I understand you want to know if your app is still installed - and for that the answer is Yes,
You can use FCM (Firebase cloud messaging). when a server is sending a message to a specific device via FCM it uses the device firebase-token.
You can see the usage in this article.
if the device doesn't have your app installed you'll get a 'Not registered' response - such as -
{
"multicast_id": 123411681083894123,
"success": 0,
"failure": 1,
"canonical_ids": 0,
"results": [
{
"error": "NotRegistered"
}
]
Solution 3:[3]
try using firebase dynamic links, and make them sign up for newsletters as an alternative to firebase-messaging. such that if the user receives the newsletter and does not have the app installed on the phone it takes them to your app in google play, or refers them to your website.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Tobias |
| Solution 2 | Kai - Kazuya Ito |
| Solution 3 | Yushin |
