I have an app that retrieves data over httpconnection just b calling a php script. I want to implement the following: enable notifications like facebook when new data arrives. I have found a way to do it but I am wondering if there is a better sollution. so far, my app is running in the background and fetches data all the time. I am wondering if it would be better any othrr approach (because I am always fetching data over http connection and I think that this is in-effective). Is there any other way? like enabling my app over my server?
Share
It might make more sense to integrate GCM into your application. Have your server querying that data, and when it meets your criteria for a needed update on the client-side… send a GCM notification from your server to your client. When your client grabs that message… then run your ‘update’ calls.
More information for GCM can be found here:
http://developer.android.com/guide/google/gcm/index.html
If you have more specific needs or functionality let me know, and I can help you work them in, in a less data-intensive way.