-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Status of push and other external services #416
Comments
tl;dr
Details:ah yes. before the giant upgrade earlier this year (#325) we used GCM which did not do any automatic analysis tracking on android. However, google was deprecating GCM as of April 10, so I also decided to migrate GCM -> FCM at the same time (#325 (comment)). And that time I did notice in the logs that FCM was sending information automatically, and I even disabled it using the change to I used the instructions here https://firebase.google.com/docs/analytics/configure-data-collection Also, the way that the token generation works is different on android and iOS. On android, since FCM is the native notification mechanism, it generates a token natively, which we store on the server. On iOS, however, since APNS is the native notification mechanism, we get an APNS token from the server. We send it to the e-mission server, and then map it to an FCM token by calling an FCM API This allows us to switch to a different provider for APNS or even use APNS directly in the future. No way of getting around FCM for android, as far as I can tell, though. |
@jf87 the silent push notification essentially works as a coarse timer since we do not have the ability to schedule periodic tasks on iOS. As part of the coarse timer on android, I sync to the server, but also check whether location services are enabled and whether the app has appropriate permissions. The coarse timer on iOS currently only syncs data but I would like to add similar checks to avoid confusion and "the app is not tracking anything" concerns. so it seems to me that we should continue to have the silent push notifications enabled in the long term. What do you think? we don't really need the coarse timer if we don't want to perform periodic housekeeping tasks. But as you know, most robust, long-running systems do need to perform periodic housekeeping tasks. and ongoing background data collection is essentially a robust, long-running system. |
Thank you very much for the long reply. 👍 I think in general, push notifications are useful for survey/crowdsourcing related tasks in this context. |
https://github.com/e-mission/e-mission-data-collection/blob/master/src/ios/BEMDataCollection.m#L231 which calls https://github.com/e-mission/e-mission-data-collection/blob/master/src/ios/BEMAppDelegate.m#L142 Note that we actually register for notifications in the javascript code using the push plugin So the flow is:
|
Neither do I, which is why I have been very careful about external integrations (e.g. not using Google's or MapQuests' APIs for map matching). But there aren't really a lot of alternatives to Google and Apple for the push notifications since they are integrated into the OS. I will make the changes to the |
I can do, but I am not sure what is the right way. It seems that we are using https://github.com/phonegap/phonegap-plugin-push Is it possible to pass this setting though config.xml using a CLI variable? |
I was going to do something easy like add the entries to the e-mission-data-collection plugin.xml but you are right that the better solution is to add it to the push-plugin. The only problem is that I am not currently on the latest version of the push plugin because it requires I think we could submit a PR to that repository and state that it fixes the open issue around advertising ID + analytics collection But for now, we could:
|
our fork is at https://github.com/e-mission/phonegap-plugin-push
Yup! You can look at the camera plugin for an example. |
Hi Shankari,
I am wondering about the current status/requirement of push notifications through firebase.
Is it still used for silent push on iOS?
Otherwise, am I correct that it is only needed to send surveys to single users or a group of users?
From my understanding, the firebase plugin on the phone will generate some device token the first time the app is used. Then this token is sent to firebase server and to our server.
If we want to send a notification, we can make the mapping between uuid/email on our server and ask firebase to send a notification to specific device tokens.
Is this correct?
It seems that this results also in some collection of analytics data on firebase servers.
See screenshot below (somehow only for iOS users for me, this might be a bug or some mis-configuration on my side).
According to firebase doc, this can be turned off: https://firebase.google.com/docs/cloud-messaging/android/client#prevent-auto-init
Would this break anything?
Generally, I need to understand other external services we use and what data is shared with them in order to have the correct data protection documentation. Besides firebase, I guess there is the openstreetmap server for mapping. I have not enabled habitica. Can you think of anything else?
Thanks :-)
The text was updated successfully, but these errors were encountered: