onPerformSync(...) {
// building status bar notification here
}
<service android:name=".SyncService" android:exported="false"> ...
This works for me (4.4.2 SGN3). Notifications appear. Both requestSync()
and addPeriodicSync()
.
Do anybody has some thoughts about?
Is there need for exporting SyncAdapter
service?
What am I actually wanna know is whether any other (enemy) application can start my exported
service or not. If they can, I don't need to export the service hoping Android isn't so liberal.
I haven't find any clarifications in the Android dev guide/api. I'm pretty novice and I hope my question is correct and understandable enough :)
I suppose you need to export SyncService for using it from other applications. This is what documentation says:
The attribute android:exported="true" allows processes other than your app (including the system) to access the Service.
If you don't need to share your sync service to other apps, probably you can leave it not exported. But you need to test it on old versions of android, it's logic might has changed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With