You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
ios
token1 = 'cWbhHNXsnYg:APA91bGAQ6p3f5FZ-K8JlbrBq8oDksVIl70V8U37E6_IDjEkB7-h1pFh6TQ41QgwXBlnR9ZqjypBbUGkRrfTwvRDyTP6nSHIzgsVQjKcyLMkLm8urT01TlKGlzgRhx__QIvPDC-5RIkP'
android
token2 = 'ctbMLcs5mvI:APA91bHPgbZYSV9UxyA15RMQbp6tp-_9CeM2LdiDpO8BIOuSrTVaXHP3Jvapx6yc3YYZJDVF7KijLyMhfhaeaoVTzoNZ0FDblrFEkTdhao2RySVMi6saeb4QiR-mQ87iNblkeUf_oIQ1'
gcm = GCM(API_KEY, debug=True)
data = {
# "notification": {
# "body": "这到底",
# "title": "标题",
# },
"message": "cccccc",
"title": "标题",
}
Downstream message using JSON request
reg_ids = [token1, token2]
订阅消息类似于 群推
topic = 'china_all'
gcm.send_topic_message(topic=topic, data=data['data'],notification=data['notification'])
Android
// T.showShort("From: " + from);
// if (from.startsWith("/topics/")) {
// // message received from some topic.
// } else {
// // normal downstream message.
// boolean isShow = (boolean) SPUtils.get("SHOW",false);
// if (isShow) {
// L.e("收到消息" + data.toString());
//
// //sendNotification(bundle);
// }
// Bundle bundle = data.getBundle("notification");
// Intent intent = new Intent("LUCA_GCM");
// intent.putExtra("message",bundle);
// sendBroadcast(intent);
}
The text was updated successfully, but these errors were encountered: