<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                org.jeecg.modules.eoa.config.UniappConstant ### 1.UniPush開通指南 https://ask.dcloud.net.cn/article/35716 ### 2.UniappConstant配置簡介: ![](https://img.kancloud.cn/b7/d2/b7d25df41e9f84cdd4147d2970303423_1129x634.png) #### 2.1 appid等配置的獲取: unipush 開通后可以獲取到appid、appkey、masterSecret的配置信息,可在下圖位置找到 ![](https://img.kancloud.cn/dc/7b/dc7b1f7e0207dcde457adae8b732154f_1719x828.png) #### 2.2 intent配置: 使用廠商推送下發推送消息必須設置intent,并且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 ~~~ **其中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事件的問題** 注意事項: * intent格式與個推的多廠商pdf文檔中描述的不一樣,以此格式為準 * intent是為了兼容Android平臺的數據,但為了保持兼容性,建議iOS平臺也配置此數據 * action=android.intent.action.oppopush為固定的數據,是兼容oppo設備的離線推送功能,不需要修改 * component=io.dcloud.HBuilder/io.dcloud.PandoraEntry中的io.dcloud.HBuilder為應用的包名,與App云端打包界面設置的Android包名一致 *部分內容節選自,跳轉可參考詳情:https://ask.dcloud.net.cn/article/35622* ### 3.服務端接入步驟 **STEP1:** 獲取應用基本信息:AppId、AppKey、masterSecret。 **STEP2:** 設置推送標題、推送內容 **STEP3:** 設置響鈴、震動等推送效果 **STEP4:** 選擇通知模板 **STEP5:** 設置推送消息有效期等推送參數 **STEP6:** 執行推送 **STEP7:** 打開手機查看通知欄消息 #### **代碼示例:** import com.gexin.rp.sdk.base.IPushResult; import com.gexin.rp.sdk.base.impl.AppMessage; import com.gexin.rp.sdk.http.IGtPush; import com.gexin.rp.sdk.template.LinkTemplate; import java.io.IOException; import java.util.ArrayList; import java.util.List; public class AppPush { // STEP1:獲取應用基本信息 private static String appId = ""; private static String appKey = ""; private static String masterSecret = ""; // 如果需要使用HTTPS,直接修改url即可 //private static String url = "https://api.getui.com/apiex.htm"; private static String url = "http://api.getui.com/apiex.htm"; public static void main(String[] args) throws IOException { IGtPush push = new IGtPush(url, appKey, masterSecret); Style0 style = new Style0(); // STEP2:設置推送標題、推送內容 style.setTitle("請輸入通知欄標題"); style.setText("請輸入通知欄內容"); style.setLogo("push.png"); // 設置推送圖標 // STEP3:設置響鈴、震動等推送效果 style.setRing(true); // 設置響鈴 style.setVibrate(true); // 設置震動 // STEP4:選擇通知模板 NotificationTemplate template = new NotificationTemplate(); template.setAppId(appId); template.setAppkey(appKey); template.setStyle(style); // STEP5:定義"AppMessage"類型消息對象,設置推送消息有效期等推送參數 List<String> appIds = new ArrayList<String>(); appIds.add(appId); AppMessage message = new AppMessage(); message.setData(template); message.setAppIdList(appIds); message.setOffline(true); message.setOfflineExpireTime(1000 * 600); // 時間單位為毫秒 // STEP6:執行推送 IPushResult ret = push.pushMessageToApp(message); System.out.println(ret.getResponse().toString()); } } ***具體服務端推送配置可參考個推文檔:[http://docs.getui.com/](http://docs.getui.com/)。***
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看