第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

如何在Firebase中的后臺(tái)應(yīng)用時(shí)處理通知

如何在Firebase中的后臺(tái)應(yīng)用時(shí)處理通知

qq_笑_17 2019-05-27 15:01:21
如何在Firebase中的后臺(tái)應(yīng)用時(shí)處理通知這是我的清單    <service android:name=".fcm.PshycoFirebaseMessagingServices">         <intent-filter>             <action android:name="com.google.firebase.MESSAGING_EVENT" />         </intent-filter>     </service>     <service android:name=".fcm.PshycoFirebaseInstanceIDService">         <intent-filter>             <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />         </intent-filter>     </service>當(dāng)應(yīng)用程序處于后臺(tái)并且通知到達(dá)時(shí),默認(rèn)通知將會(huì)運(yùn)行并且不會(huì)運(yùn)行我的代碼onMessageReceived。這是我的onMessageReceived代碼。如果我的應(yīng)用程序在前臺(tái)運(yùn)行,而不是在后臺(tái)應(yīng)用程序時(shí),則調(diào)用此方法。如何在應(yīng)用程序處于后臺(tái)時(shí)運(yùn)行此代碼?// [START receive_message]@Overridepublic void onMessageReceived(RemoteMessage remoteMessage) {     // TODO(developer): Handle FCM messages here.     // If the application is in the foreground handle both data and notification messages here.     // Also if you intend on generating your own notifications as a result of a received FCM     // message, here is where that should be initiated. See sendNotification method below.     data = remoteMessage.getData();     String title = remoteMessage.getNotification().getTitle();     String message = remoteMessage.getNotification().getBody();     String imageUrl = (String) data.get("image");     String action = (String) data.get("action");     Log.i(TAG, "onMessageReceived: title : "+title);     Log.i(TAG, "onMessageReceived: message : "+message);     Log.i(TAG, "onMessageReceived: imageUrl : "+imageUrl);     Log.i(TAG, "onMessageReceived: action : "+action);     if (imageUrl == null) {         sendNotification(title,message,action);     } else {         new BigPictureNotification(this,title,message,imageUrl,action);     }}// [END receive_message]
查看完整描述

4 回答

  • 4 回答
  • 0 關(guān)注
  • 1433 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)