textileio / android-textile

[DEPRECATED] Android bindings for https://github.com/textileio/go-textile
MIT License
16 stars 7 forks source link

Assure node is started for background upload events #61

Open asutula opened 5 years ago

asutula commented 5 years ago

Similar to what I did in ios-textile:

https://github.com/textileio/ios-textile/pull/82

sanderpick commented 5 years ago

This might not be needed because our background events do not "wake up" the app in the iOS sense. See https://developer.android.com/guide/components/broadcasts#context-registered-receivers, which is what we use. So far as I can tell, manifest-registered receivers are no longer available for non-system events: https://developer.android.com/guide/components/broadcasts#manifest-declared-receivers

asutula commented 5 years ago

Ok cool. I guess this ticket was just more to get a handle on the situation, understand how it does work. Sounds like you have a better handle on it than me.

asutula commented 5 years ago

So given the way you describe it, do the upload events always get sent to a running node? Or are we going to miss events and there's nothing we can do about it?

sanderpick commented 5 years ago

Needs more research... I think we could miss events but not sure. I was never able to get a definitive answer about the manifest registered broadcast receivers no longer being available. I spent a lot of time trying to get them to work w/o luck. There's a chance that the node stops during an upload and the events just go into the ether.... but again, not sure.