Difference between GCM and Baidu Push Notification

5k views Asked by At

I need to use Baidu Push notification in my app. But it is very difficult to find the documentaion on it to know about the difference from GCM. Is there any document or site available to know the exact difference between GCM and Baidu Pushnotification ? Also which is better to use in terms of performance ?

1

There are 1 answers

3
Zax On BEST ANSWER

In terms of functionality there is no difference between GCM and Baidu Push notifications.

Baidu can be considered as an alternative for your GCM in china, as most of the Google services are blocked in China. Since, GCM is a part of Google-play-services package, it is also blocked in China.

Documentation: For this you would need to use google translate on pages specified below (ie. once the page is loaded, right click and select translate to english) :

Step 1: Create a new Developer account on Baidu platform. (If you do not possess a Mainland China Phone number, it is not possible to create a Baidu developer account)

Step 2: Download the Android SDK for Baidu push services from the below address: http://push.baidu.com/sdk/push_client_sdk_for_android

Step 3: Integrate the above downloaded SDK into your app like you would do for any SDK that has *.so (Shared Object file libraries) files. That is you need to put them in your jniLibs/

Step 4: Then like in GCM console you create a new application with its application Id/ Package Name, in baidu as well you need to do the same. That is goto the below URL (Make sure you are logged in): http://push.baidu.com/console/app On this console page Create a new application (Use Google translate plugin on Chrome).

Step 5: Once a new application is created, your application will be assigned a API Key and a Secret Key. Inorder to receive Push notifications, you need to used the API Key as specified in the below page: http://push.baidu.com/doc/android/api All the development steps are specified in the above link. Just translate the page to follow the same.

Step 6: In GCM you can either send a push notification using the GCM console or you can use your own server to send a GCM notification to the device. Its the same on Baidu as well. Details are in the above link.

Performance:

From my personal experience, i feel GCM is really good. I always get the Notification immediately. However, in case of Baidu, it does take sometime for the notification to arrive(most of the times).

Also there is a Demo example which comes along with the SDK. You can keep that as a reference while developing the app.