【實用教育app】GCM4Public DEMO open source|最夯免費app

【實用教育app】GCM4Public DEMO open source|最夯免費app

分享好友

【免費教育App】GCM4Public DEMO open source-APP點子

GCM4Public open-source GCM service

The event

During the +GDG Vilnius event Hackathon: Google Cloud Messaging for Android, this open source project was created:

https://github.com/gdgvilnius/GCM4Public-GAE-Server

The server

The Demo Android application using this GCM4Public service is open here:

https://github.com/gdgvilnius/GCM4Public-Android-Client

This is the Java class which sends GCM message:

https://github.com/gdgvilnius/GCM4Public-GAE-Server/blob/master/src/lt/andro/gcm4public/SendGCM2Clients.java

The client

To use Google Cloud Messaging for Android you need to register at Google's API console:

https://code.google.com/apis/console

This is the Java class responsible for handling GCM messages and registers on GCM4Public server:

【免費教育App】GCM4Public DEMO open source-APP點子

https://github.com/gdgvilnius/GCM4Public-Android-Client/blob/master/src/lt/andro/gcm4public/GCMIntentService.java

Here you can see how device initiates registration on the GCM:

https://github.com/gdgvilnius/GCM4Public-Android-Client/blob/master/src/lt/andro/gcm4public/MainActivity.java

Sending messages

You'll get the project number (aka senderId) and API Key. These two are used in this service to send GCM notifications. And you need to provide it in this form: https://gcm4public.appspot.com/

The service is secure, because only senderId and phones registrationId are stored. The API key is not saved on server and you need to provide it every time you want to send a message to the server.

The senderId is used to filter app's users, so one application would not disturb other's users.

Multiple applications can use this single server: https://gcm4public.appspot.com/

Google App Engine

It's running on Google App Engine so it has some limitations, but I think, it might be running ok for few hundred small apps. If you have tens of thousands users, please fork the project on github and put on your separate Google App Engine account with separate daily limits.

Other resources

Blog post: http://www.andro.lt/2012/11/google-cloud-messaging-for-android.html

Google Cloud Messaging for Android by Francesco Nerieri:

https://developers.google.com/events/io/sessions/gooio2012/100/

and get the slides here:

http://commondatastorage.googleapis.com/io2012/presentations/live%20to%20website/100.pdf

If you want to read more, here is the link on developer.android.com about GCM for Android:

http://developer.android.com/guide/google/gcm/gs.html

免費玩GCM4Public DEMO open source APP玩免費

免費玩GCM4Public DEMO open source App

GCM4Public DEMO open source APP LOGO

GCM4Public DEMO open source LOGO-APP點子

GCM4Public DEMO open source APP QRCode

GCM4Public DEMO open source QRCode-APP點子
熱門國家系統支援版本費用APP評分上架日期更新日期
未知Android
Google Play
1.0
App下載
免費
1970-01-012015-03-09
分享app
上一個APP
下一個APP

高評價教育App推薦

Stone Ridge

Stone Ridge School of the Sacred Heart’s app for iPhones, iPods and iPads allows student, faculty and parent constituents to take full advantage of th …
Stonii图片单词-动物篇 for iPad

Stonii角色第一图片单词就是App!推出(Stonii图片单词-动物篇)▶学会的单词通过竞猜游戏能更自然的复习,也助于孩子们的注意力集中和增加成就感会对学习更加感兴趣。▶多样色可爱的动物图片会助于孩子们的视觉和创意,专业并正确的配音效果助于孩子们的听力,答出正确答案获一个标签过程中触觉和知觉发育 …