2016-02-26 46 views
0

我試圖在單擊Azure伸手可及時打開一個Android應用程序。系統和應用內通知正確到達設備,但是當我點擊它時什麼也沒有發生。在Azure Reach推送通知中單擊時打開Android應用程序

我已經按照本文檔https://azure.microsoft.com/en-us/documentation/articles/mobile-engagement-android-integrate-engagement-reach/和一些研究之後,我發現我的EngagementReachDataPushReceiver擴展分類(與重寫的方法「onDataPushStringREcieved」和「onDataPushBase64Received」)永遠不會被調用。

當然,我已經添加了Android清單中的引用到該類,所以...有人有任何線索可以發生什麼?

回答

1

好了,終於我發現我自己的解決方案。問題是在onNotificationPrepared覆蓋方法,具體而言,我建立通知的方式:

Notification.Builder builder = new Notification.Builder(mContext) 

該通知生成器需要是:

NotificationCompat.Builder builder = (NotificationCompat.Builder) new NotificationCompat.Builder(mContext) 

(從android.support.v7.app)

神奇的是,收到的推送開始再次打開應用程序。

相關問題