Data not coming to server with android data sync setting turned off
Your Environment
- Plugin version: 0.5.0-alpha.34
- Platform: Android
- OS version: 5.1.1
- Device manufacturer and model: samsung SM-E700H
- React Native version: 0.55.4
- Plugin configuration options:
- Link to your project:
Context
Not sure if its a bug or needs a workaround. For android version 6,7,8 I tested and data comes to server irrespective of the data sync setting. However in 5.1.1 its not the case. Now I want the app data to reach server irrespective of the data sync option which the user in our case can not turn on due to other reasons.
Expected Behavior
Any location data collected by plugin should reach server irrespective of the data sync setting.
Actual Behavior
For android 5.1.1, not sure if its Android version issue though, data is coming to server only when turning on data sync.
Possible Fix
Not sure
Steps to Reproduce
1. 2. 3. 4.
Context
Debug logs
This is expected behaviour. User must have "Automatically sync data" system option enabled.
Thanks for the prompt answer
Thats ok, but what I do not get is why is behaving different for android 5 and android 8. How do I make sure that I receive tracking data for guys using android 5 and tracking off. Or how can I tell if app in foreground and data not synced because of auto sync off so as to at least show a button to manually sync.
why is behaving different for android 5 and android 8.
that should not be case. are you using same plugin version on all your devices? Becasue "Automatically sync data" was added only in alpha.22.
tell if app in foreground and data not synced because of auto sync off so as to at least show a button to manually sync.
ok, some kind of check is needed here. will mark this issue as enhancement
Thanks for the consideration.
Yes I am using the same version for all devices. This setting which you added in alpha.22 will prevent only background sync or even foreground sync? Because in my case tracking is not reported even when app is in foreground although data sync is off.
Is there a workaround for this like to force sync irrespective of the android sync setting?
Thanks
Hi @mauron85
Is it possible to provide this as a configuration. I can roll back to version 21 now as I am also using gradle 3. Thanks for the great plugin.
@shashanksinghal
it is possible, however I'm not going to do that. The plugin philosophy is to not to be evil. If user disabled sync, that plugin must respect that decision.
Hi @mauron85,
Thanks for the superb library but this issue is affecting a lot now.
This issue has started hindering our use case now. The android sync setting seems to get disabled automatically (not sure of reason) for some of our users. As a result data just stops coming to server.
Asking them to check this setting again and again is pain. I even provided a sync button for them to do manually but thats also not friendly.
I would like to request 2 things if possible for you or if you can guide me in right direction:
- Can you give a handle or helper function to query if sync is off so that I can use that to show a local push notification?
- Or if you can let me know of the changes I need to make to make the app sync data irrespective of android sync option. So i will fork and make those changes.
Sorry for troubling you but I have not worked on native code yet to figure this out on my own.
Thanks
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed, because it has not had recent activity. If you believe this issue shouldn't be closed, please reopen or write down a comment requesting issue reopening with explanation why you think it's important. Thank you for your contributions.