Reputation:
I have a remote database (have images and text). I want to make an android application which is get data from database when new data added to db..
GCM is good for this project but how can i send images with GCM? (because GCM msg limit 4KB) or should i use web service ?
Any idea?
Thanks for helping..
Upvotes: 1
Views: 142
Reputation: 873
You can create a background service which runs in loop every each X seconds for example. Each time the service execute its tasks (call a web service) it checks for new remote database entries.
At this point you can decide to display a notification to inform the user about the new entries received if this is the desired mechanism. If the user is using the app at the moment of the update, you can use loader and database observers to update the UI.
Upvotes: 0
Reputation: 642
You can use GCM to notify app that data has been updated and whenever you receive this notification, start your web service to fetch data & images.
Upvotes: 1