3 years ago (2016-01-07)  Algorithm language |   First to comment  3 
post score 0 times, average 0.0
[Slideup] Catalog

In the development of Wang Baiyuan's blog client, in order to participate in the new article published to achieve the effect of client notification, extremely guests use Baidu cloud push platform, using Baidu official SDK and demo provided to achieve.When the server sends a notification, the client executes the onNotificationClicked callback function.The formal parameters of the function are

  • Context context: context
  • String title: Notification title
  • String description: notification content
  • String customContentString: custom field, through the json access to the server's value.

Android end

Server-side code requires the introduction of sdk.php. The key is that the server must support the cUrl module.My Alibaba Cloud Free Host does not support it. Later, my message push code was placed on Jingan's virtual host and the Alibaba Cloud URL was used to execute the PHP files on Jingan's host. This solved the problem.

PHP server side

 

 

  
 

This article has been printed on copyright and is protected by copyright laws. It must not be reproduced without permission.If you need to reprint, please contact the author or visit the copyright to obtain the authorization. If you feel that this article is useful to you, you can click the "Sponsoring Author" below to call the author!

Reprinted Note Source: Baiyuan's Blog>>https://wangbaiyuan.cn/en/baidu-cloud-push-new-blog-articles-remind-2.html

Post comment

Style

No Comment

登录

Forget password?

您也可以使用第三方帐号快捷登录

切换登录

注册

TW