Tag: google cloud messaging

适用于PHP的AWS开发工具包:错误从实例configuration文件元数据服务器检索凭据

我正在尝试通过web api将SNS messeges发送给android。 从http://aws.amazon.com/developers/getting-started/php/下载并安装SDK 运行sample.php时出现以下错误: Fatal error: Uncaught exception 'Aws\Common\Exception\InstanceProfileCredentialsException' with message 'Error retrieving credentials from the instance profile metadata server. When you are not running inside of Amazon EC2, you must provide your AWS access key ID and secret access key in the "key" and "secret" options when creating a client or provide an […]

Android的GCM SENDER_ID,如何得到它?

我尝试迁移到GCM并且SENDER_ID需要提供的SENDER_ID的问题。 我使用谷歌演示项目。 在这个项目中,如果我明白这一点,我需要在SENDER_ID文件中向应用程序提供一个SENDER_ID 。 我提供的SENDER_ID是我在https://code.google.com/apis/console/上注册的API密钥,具有以下格式: AIzaSyAxxxxxxx_xxxxxxxxxxxnoGZw (共40个字符)。 使用这个string作为SENDER_ID我得到“BroadcastReceiver mHandleMessageReceiver”错误消息: 从GCM:错误(INVALID_SENDER)。 。 错误在哪里? 我提供的string不是SENDER_ID ? 谢谢。

如何将推送通知发送到Web浏览器?

我一直在阅读关于推送通知API和Web通知API的几个小时。 我也发现Google和Apple分别通过GCM和APNS免费推送通知服务。 我试图了解,如果我们可以实现推送通知浏览器使用桌面通知,我相信是Web通知API所做的。 我看到一个谷歌文档,说明如何在这里和这里为Chrome做这件事。 现在还不能理解的是: 我们可以使用GCM / APNS向所有网页浏览器(包括Firefox和Safari)发送推送通知吗? 如果不通过GCM,我们可以用我们自己的后端来做同样的事情吗? 我相信所有这些答案在一个答案可以帮助很多人有类似的困惑。

Android:在线testing推送通知(Google Cloud Messaging)

我正在应用程序中实施Google云消息传递。 由于某些防火墙的限制,服务器代码还没有准备好,而且在我的环境中,我无法部署testing服务器来进行推送通知。 我正在寻找的是一个在线服务器,它会发送一些testing通知到我的设备来testing我的客户端实现。

INSTALL_FAILED_DUPLICATE_PERMISSION … C2D_MESSAGE

我在我的应用程序中使用Google通知,直到现在我已经在清单中完成了以下操作: <!– GCM –> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <!– GCM requires a Google account. –> <uses-permission android:name="android.permission.WAKE_LOCK" /> <!– Keeps the processor from sleeping when a message is received. –> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <!– This app has permission to register and receive data message. –> <!– Creates a custom permission so only this app can receive […]

FCM与AWS SNS

我正在为我的Android项目使用AWS资源,我计划使用AWS SNS为我的项目添加推送通知服务。有几个问题困扰我很多。 除了一两个问题,我没有发现任何问题,只是解释不清。 1. AWS支持FCM ? SNS与GCM工作。 但Googlebuild议使用FCM而不是GCM 。 我没有findAWS支持FCM 。 2.即使在发送推送通知后, AWS会将消息(或数据)存储到其数据库中? 3.我试过在SNS应用平台上放FCM API key,为什么会显示无效参数?

错误:与依赖项冲突com.google.code.findbugs:jsr305'

我在Android Studio 2.2预览版1中使用Android应用程序和使用Google消息传递的后端模块创build了一个新项目。 这是应用程序文件 apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { applicationId "com.xxx.xxx" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha1' compile 'com.google.android.gms:play-services-gcm:9.0.0' testCompile 'junit:junit:4.12' […]

Google Cloud Messaging – 在networking状态发生变化之前有时收不到消息

在开发一个与GCM集成的小项目时,我偶然发现了一个奇怪的问题。 有些时候,当我开始看日志,看看是否收到消息,消息似乎没有通过,直到我改变了networking状态(IE最初在WiFi上,如果我关掉WiFi,移动到移动数据,消息到达精细)。 在我改变了networking状态之后,消息开始得到完全正常,而且一旦我将networking状态改回到之前的状态(在这种情况下是WiFi),消息就继续被接收。 该项目本身包括启动的能力(启动时启动GCMBaseIntentService),这再次正常工作,我敢肯定,应用程序/服务正在运行,因为我已经手动启动应用程序,当这个问题发生时还检查服务是否正在运行,如果没有运行,检查是否已经注册。 有没有其他人遇到这个问题,或有任何指示,我该如何解决这个问题? 在没有收到消息的时间和收到消息的时间(更改networking状态之后)之间,我没有看到任何帮助。 我浏览过GCM文档,看不到任何由于超时(在设备本身上)而未收到消息,或任何可能影响此设置的configuration选项。 欣赏任何帮助 – 如果需要,我可以提供源代码,但它几乎不会偏离android-sdk中提供的演示应用程序。

更新到Android构build工具后的IncompatibleClassChangeError 25.1.6 GCM / FCM

由于我更新了Android SDK Tools 25.1.6和Android Support Repository 32.0.0(今天上午),我得到了以下错误,我没有改变我的代码中的任何东西,它仍然在我的同事计算机上工作(Android SDK工具25.1.1 + Android支持库30.0.0)。 java.lang.IncompatibleClassChangeError: The method 'java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)' was expected to be of type virtual but instead was found to be of type direct (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar) at com.google.android.gms.iid.zzd.zzeb(Unknown Source) at com.google.android.gms.iid.zzd.<init>(Unknown Source) at com.google.android.gms.iid.zzd.<init>(Unknown Source) at com.google.android.gms.iid.InstanceID.zza(Unknown Source) at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source) at com.xxxxxxx.utils.RegistrationIntentService.onHandleIntent(RegistrationIntentService.java:55) at […]