![](/img/trans.png)
[英]How to implement FCM in android app? Is it possible that we can use same listener, receiver methods of GCM with FCM?
[英]Can we use GCM to send push notification wihout starting the app even once as broadcast receiver not working for android 3.0+
有沒有一種方法可以使我的應用程序在安裝后立即啟動,而無需用戶干預,因為廣播接收器不適用於3.0+版本。
一種解決方案可能是使用GCM,但為此,還必須在發送推送消息之前在服務器上注冊該應用程序。
我可以在服務器上遠程注冊該應用程序嗎? 例如通過傳入的短信,這將啟動谷歌推送服務
將向用戶顯示有關您的應用程序的權限,從安裝后的API級別到最新的API,有一種方法可以在安裝后立即啟動應用程序,並且BroadcastReceiver
正常工作。 但由於API級別11(版本3.0),您需要使用它。
Intent intent = new Intent("com.mypackage.yourapp.custom.intent.action.ADDON_REQ");
intent.setFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
sendBroadcast(intent);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.