Ad

How To Notify My App About Newly Available Resources On The Server To Download?

- 1 answer

I have an app to display images in sequence (as a slideshow). Images are downloaded from the server and stored on the device then it is displayed in a slideshow using ImageView and TimerTask. I would like to tell the app that images have been updated on the server and force it to download them again.

How do I tackle this?

Ad

Answer

I used firebase messaging service and it worked like a charm. As some member(s) might have mentioned, the downside of using notification is that it can be switched off from settings and then you lose your communicate channel with the App. It's best to use web sockets to have a full communicative channel with the App (but again, 4g/wifi can be switched off as well..).

I have followed the following tutorial to get started.

https://firebase.google.com/docs/android/setupClick Here

Ad
source: stackoverflow.com
Ad