Ragazzi come si implementano le notifiche push su android?
Io devo far si che, dal pannello utente (un sito su un server), ogni volta che l'amministratore preme su "invia notifiche" queste arrivano al cellulari che hanno installato l'app.
Thanks
Ragazzi come si implementano le notifiche push su android?
Io devo far si che, dal pannello utente (un sito su un server), ogni volta che l'amministratore preme su "invia notifiche" queste arrivano al cellulari che hanno installato l'app.
Thanks
La risposta è Google Cloud Messaging for Android: Google Cloud Messaging for Android | Android Developers
non ti ho scritto per "sprecare inchiostro digitale", in quel link ci sono le risposte alle tue domande dovevi solo cercarle...
comunque QUESTA è la parte che spiega come realizzare il server:
To send a message, the application server issues a POST request to https://android.googleapis.com/gcm/send.
A message request is made of 2 parts: HTTP header and HTTP body.
[..]
si le entità in gioco sono tre:
* Mobile Device The device that is running an Android application that uses GCM. This must be a 2.2 Android device that has Google Play Store installed, and it must have at least one logged in Google account if the device is running a version lower than Android 4.0.4. Alternatively, for testing you can use an emulator running Android 2.2 with Google APIs.
* 3rd-party Application Server An application server that developers set up as part of implementing GCM in their applications. The 3rd-party application server sends data to an Android application on the device via the GCM server.
* GCM Servers The Google servers involved in taking messages from the 3rd-party application server and sending them to the device.
è in particolare il GCM server che riceve le richieste dal tuo server e le inoltra al device mobile. non posso fare paragoni con iOS visto che non lo conosco, comunque questa mi sembra un metodo ottimo, scalabile e che evita molti problemi allo sviluppatore.
tu hai un esempio di server (dei files)? o un tutorial?