Cobub Razor
Cobub Toaster
Other Links
Cobub Razor
Cobub Toaster
Other Links
It integrates the push function of GCM and the Tag function of Cobub Razor , and make you push messages more conveniently, fastly and accurately.
The Open GCM platform of Google has helped enterprises’ App push messages through low_cost Internet, provide a sound, efficient and stable service system which has solved the problem of message exchange between Internet cloud and Mobile client.
FAQs
How register a Google Account to get a Project Number and Api Key?
Cobub User Center is a service platform for moblie developers, provide series of value-added services by integrating mobile application data of Cobub Razor platform for the process of the product life cycle in mobile development process.Mobile developers can find a one-stop solution for various problems in Cobub User Center.
Users can not use the GCM push service unless they register as a formal user in Cobub User Center .
If you have not registered yet,please go to Cobub User Center and register now.
Authorization code is the secret key for interaction between Cobub Razor and Cobub User Center, users need to authorize it in authorization module of Cobub Razor after getting it.
Only an authorized account can use the rich extended function and value-added services of Cobub Razor provided by Cobub User Center.
Obtain the authorization code and get authorization in authorization module of Cobub Razor.
Resgister a Google account,get a Project Number and Api Key, Project Number is the SEND_ID we need to use when programming later.
a)Use the account of Google and login to https://code.google.com/apis/console , click on Services, as shown below. Open Google Cloud Messaging for Android service.
b)Same as above, click on Overview in the left navigation bar,we can see Project Number on the right of page body,as shown below.
c)Same as above, click on API Access, we can see API key, as shown below where marked red line; If you can’t see API Key, you can click on “Create new Server key…” where marked redline and create a new API key.
d)API key is the only certificate of push function. Please login to Cobub Razor firstly,click on the GCM in the left to enter the home page of GCM, input the API key obtained above, and click on save.
<permission android:name="PACKAGENAME.permission.C2D_MESSAGE" android:protectionLevel="signature" /> <uses-permission android:name="PACKAGENAME.permission.C2D_MESSAGE" /> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <!-- Keeps the processor from sleeping when a message is received. --> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.READ_PHONE_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<receiver android:name="com.google.android.gcm.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND" > <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <action android:name="com.google.android.c2dm.intent.REGISTRATION" /> <category android:name="PACKAGENAME" /> </intent-filter> </receiver> <receiver android:name="com.cobub.gcm.CobubBroadcastReceiver" > <intent-filter > <action android:name="cobub.razor.message"/> </intent-filter> </receiver> <service android:name="com.cobub.gcm.GCMIntentService" /> <meta-data android:name="UMS_APPKEY" android:value="从cobub获取到的UMS_APPKEY"/>
1.Call the RazorGCM.checkDeviceAndMainfest(this) before setContentView.
2.Set the SendID RazorGCM.setSendID(String sendid); Note: the sendid is the Project Nomber ,shown in the first figure.
3.Call RazorGCM.register(this)
To prevent accidents from causing initialization failed, it is suggested that the application calls this interface one time when starting for every time.
Push reports contains all of the Apps’ reports, click on a specific APP to view the push reports of this application.