diff --git a/docs/unipush.md b/docs/unipush.md index 8c2ce16fa36d637b24ac85780dc0e86f4214d1ff..d8cb3d990ab1a10c424ad9a3f7527d17f8bddfb0 100644 --- a/docs/unipush.md +++ b/docs/unipush.md @@ -66,14 +66,14 @@ iOSå¹³å°éœ€è¦ä½¿ç”¨åˆ°è‹¹æžœçš„APNS,务必在åŽå°æ£ç¡®é…ç½®è‹¹æžœæŽ¨é€ ä½¿ç”¨åŽ‚å•†æŽ¨é€ä¸‹å‘推é€æ¶ˆæ¯å¿…须设置intent,该数æ®æ ¼å¼æ˜¯Android原生Intent对象åºåˆ—化由æ¥ã€‚具体å¯å‚考[详情](https://blog.csdn.net/u011068702/article/details/51406572)。并且intent须符åˆä»¥ä¸‹æ ¼å¼ï¼Œæ¤æ ¼å¼æ—¶åœ¨ä¸ªæŽ¨å®šä¹‰é¢åŸºç¡€ä¸ŠäºŒæ¬¡å°è£…,所以必须以æ¤æ ¼å¼ä¸ºå‡†ã€‚ä¸æŒ‰æ¤æ ¼å¼è®¾ç½®intentå¯èƒ½å‡ºçŽ°ç”¨æˆ·ç‚¹å‡»æŽ¨é€æ¶ˆæ¯æ— 法å¯åŠ¨APP的问题。 intentæ•°æ®æ ¼å¼å¦‚下: ``` -intent:#Intent;action=android.intent.action.oppopush;launchFlags=0x14000000;component=io.dcloud.HBuilder/io.dcloud.PandoraEntry;S.UP-OL-SU=true;S.title=æµ‹è¯•æ ‡é¢˜;S.content=测试内容;S.payload=test;end +intent://io.dcloud.unipush/?#Intent;scheme=unipush;launchFlags=0x4000000;component=io.dcloud.HBuilder/io.dcloud.PandoraEntry;S.UP-OL-SU=true;S.title=æµ‹è¯•æ ‡é¢˜;S.content=测试内容;S.payload=test;end ``` **component=io.dcloud.HBuilder/io.dcloud.PandoraEntry å…¶ä¸io.dcloud.HBuilder为APP包å,需è¦æ›¿æ¢ä¸ºè‡ªå·±APP的包åï¼›** S.title=的值为推é€æ¶ˆæ¯æ ‡é¢˜ï¼Œå¯¹åº”5+ APIä¸[PushMessage](https://www.html5plus.org/doc/zh_cn/push.html#plus.push.PushMessage)对象的title属性值; S.content=的值为推é€æ¶ˆæ¯å†…容,对应5+ APIä¸[PushMessage](https://www.html5plus.org/doc/zh_cn/push.html#plus.push.PushMessage)对象的content属性值; S.payload=的值为推é€æ¶ˆæ¯çš„æ•°æ®ï¼Œå¯¹åº”5+ APIä¸[PushMessage](https://www.html5plus.org/doc/zh_cn/push.html#plus.push.PushMessage)对象的payload属性值; -**launchFlags=0x14000000å—段,解决接收多æ¡é€šçŸ¥åŽç‚¹å‡»å¯èƒ½æ— 法触å‘click事件的问题** +**launchFlags=0x4000000å—段,解决接收多æ¡é€šçŸ¥åŽç‚¹å‡»å¯èƒ½æ— 法触å‘click事件的问题** 注æ„事项: - intentæ ¼å¼ä¸Žä¸ªæŽ¨çš„多厂商pdf文档ä¸æè¿°çš„ä¸ä¸€æ ·ï¼Œä»¥æ¤æ ¼å¼ä¸ºå‡† @@ -128,7 +128,7 @@ S.payload=的值为推é€æ¶ˆæ¯çš„æ•°æ®ï¼Œå¯¹åº”5+ APIä¸[PushMessage](https://                     "title":"安å“ç¦»çº¿å±•ç¤ºçš„æ ‡é¢˜",                     "body":"安å“ç¦»çº¿å±•ç¤ºçš„æ ‡é¢˜",                     "click_type":"intent", -                    "intent":"intent:#Intent;launchFlags=0x04000000;action=android.intent.action.oppopush;component=io.dcloud.HBuilder/io.dcloud.PandoraEntry;S.UP-OL-SU=true;S.title=æµ‹è¯•æ ‡é¢˜;S.content=测试内容;S.payload=test;end" +                    "intent":"intent://io.dcloud.unipush/?#Intent;scheme=unipush;launchFlags=0x4000000;component=io.dcloud.HBuilder/io.dcloud.PandoraEntry;S.UP-OL-SU=true;S.title=æµ‹è¯•æ ‡é¢˜;S.content=测试内容;S.payload=test;end"                 }             }         }, @@ -200,7 +200,7 @@ public class push2 { notification1.setTitle("安å“ç¦»çº¿å±•ç¤ºçš„æ ‡é¢˜"); notification1.setBody("安å“离线展示的内容"); notification1.setClickType("intent"); - notification1.setIntent("intent:#Intent;launchFlags=0x04000000;action=android.intent.action.oppopush;component=io.dcloud.HBuilder/io.dcloud.PandoraEntry;S.UP-OL-SU=true;S.title=æµ‹è¯•æ ‡é¢˜;S.content=测试内容;S.payload=test;end"); + notification1.setIntent("intent://io.dcloud.unipush/?#Intent;scheme=unipush;launchFlags=0x4000000;component=io.dcloud.HBuilder/io.dcloud.PandoraEntry;S.UP-OL-SU=true;S.title=æµ‹è¯•æ ‡é¢˜;S.content=测试内容;S.payload=test;end"); //å„厂商自有功能å•é¡¹è®¾ç½® //ups.addOption("HW", "/message/android/notification/badge/class", "io.dcloud.PandoraEntry "); //ups.addOption("HW", "/message/android/notification/badge/add_num", 1);