我在SO上读过类似的问题,然而,我无法从中得到正确的答案.
我有一个系统,我们向大约500个设备发送通知.
不幸的是,许多这些设备没有收到通知.我发现OPPO F1系列手机特别没有收到通知.
我发现,如果应用程序从多任务托盘中停止,则会发生这种情况.我该如何解决这个问题?
更新:我观察到当我从任务托盘关闭应用程序时,我的应用程序被强制停在应用程序管理器中.当我从任务托盘关闭Whatsapp时,仍然没有强制停止.怎么被Whatsapp处理?
android firebase firebase-cloud-messaging firebase-notifications
Hello Friends我是这个stackoverflow社区的新手,但在使用各种编程语言(如android)开发代码方面拥有丰富的经验.今天我用我的一个应用程序实现了GCM,我遇到了推送通知消息的延迟问题.我正在看护目镜,发现谷歌最近推出了一些名为FCM的新服务.我阅读了各种文章或博客,但没有从那里找到太多信息.我有一些问题,请给出你的意见,所有stackoverflowian都衷心地邀请他们提出他们的建议.
为什么我们需要这个FCM.
FCM over GCM.
GCM现在是否已折旧.他们是否会停止gcm的所有服务和支持.
如何将我的旧应用程序从GCM更新到FCM.
任何人都可以告诉我谷歌宣布FCM
超过GCM 的原始链接,因为我没有发现这最初发布谷歌.
谢谢你们!
乔丹·查芬斯
最近我问了一个关于使用GCM 发送推送通知的问题:向Android发送推送通知.现在有了FCM,我想知道它与服务器端开发有多么不同.明智的编码,它们是一样的吗?在哪里可以找到显示从服务器向Android设备发送推送通知的示例FCM代码?
我是否需要下载任何JAR库以使用Java代码向FCM发送通知?向Android发送推送通知中的示例代码显示使用GCM发送推送通知,并且需要服务器端GCM JAR文件.
但是,另一个例子在https://www.quora.com/How-do-I-make-a-post-request-to-a-GCM-server-in-Java-to-push-a-notification-to -the-client-app显示使用GCM发送推送通知,并且不需要服务器端GCM JAR文件,因为它只是通过HTTP连接发送.FCM可以使用相同的代码吗?使用的网址是" https://android.googleapis.com/gcm/send ".什么是FCM的等效URL?
提前致谢.
由于Firebase将取代GCM,我问自己Google会支持GCM多长时间?
简而言之:GCM的寿命/支持何时结束?
这是在MainActivity中用作BroadcastReceiver的代码
//Initializing our broadcast receiver
mRegistrationBroadcastReceiver = new BroadcastReceiver() {
//When the broadcast received
//We are sending the broadcast from GCMRegistrationIntentService
@Override
public void onReceive(Context context, Intent intent) {
//If the broadcast has received with success
//that means device is registered successfully
if(intent.getAction().equals(GCMRegistrationIntentService.REGISTRATION_SUCCESS)){
//Getting the registration token from the intent
String token = intent.getStringExtra("token");
//Displaying the token as toast
Toast.makeText(getApplicationContext(), "Registration token:" + token, Toast.LENGTH_LONG).show();
//if the intent is not with success then displaying error messages
} else if(intent.getAction().equals(GCMRegistrationIntentService.REGISTRATION_ERROR)){
Toast.makeText(getApplicationContext(), …Run Code Online (Sandbox Code Playgroud)