Start a Project

JPush Notification implementation for China

JPush is one of the popular and free push notification service provider available in China. Due chinese documentation, there might be chances you might find it difficult. This is not true however.

JPush provide SDK that is easy to use and implement. The only difficulty in implementing the JPush is that there resources are bit scattered or unorganized.[PS: don’t get me wrong]. There are two official domain https://www.jiguang.cn/ and other is jpush.cn.

However jpush.cn now redirect to the former one and according to our client it is used for there internal purposes.

So Let start Implementing JPush as per the docs available on http://jiguang.cn

 

There is a lot of information is provided related to common problems, 3-minute quick demo, integration guide and sdk on http://docs.jpush.cn/display/dev/Index

Let us know consume some ready backed code from JPush developers:

Please use sdk jpush-android-2.1.5.jar or above. Here is the link to download

Setting Manifest

Here are the required permission for JPush

 

Here are the service, receiver and meta info related to JPUSH integration.

 

Initialize JPushInterface in Application class

 

Creating JPushReciever

 

Adding jniLibs

You are required to jniLibs in the project. You can find them in the downloaded sdk check sample image below for reference:

 

Location of these library inside your project is

 

Add following line in your module/app level gradle for building jniLibs in your project:

 

Pushing notification from JPush panel

Login at https://www.jiguang.cn/ and create application with the proper application Id.

Here is your sample application detail after you successfully create the application

 

Application details will contatin a APP_KEY and SECRET_MASTER.  use APP_KEY in the android manifest’s meta data for JPush.

SECRET_KEY is used for server side client for REST implementation.

 

SERVER SIDE IMPLEMENTATION

Here is ready baked code for pushing notification from your PHP script.

 

 

You can refer to https://github.com/jpush/jpush-api-php-client/blob/master/examples/push_example.php for complete example and docs.

 

OTHER USEFUL LINKS AND FURTHER READING

http://community.jiguang.cn/

http://docs.jpush.cn/display/dev/Index

Common Issue:

http://community.jiguang.cn/t/jpushglobal-get-sdk-version-fail-sdk/4222

 

Stay updated !!! Keep coding and commenting

Exit mobile version