推送通知/ C2DM为Kindle Fire的? [英] Push notifications / C2DM for Kindle Fire?
问题描述
AFAIK,推送通知要求谷歌帐户的工作(他们捎带上GTalk的),这是否意味着为Kindle Fire的应用程序,是注定,如果他们使用的标准C2DM的方法呢?
AFAIK, push notifications require a Google account to work (they piggyback on GTalk), so does that mean for apps for the Kindle Fire are doomed if they use the standard C2DM approach?
我找不到推送的 Kindle Fire的常见问题解答或任何在网络上的任何信息
I couldn't find any info on push in the Kindle Fire FAQ or anywhere on the web.
推荐答案
据我所知是的。一切我已经阅读表明,亚马逊剥离C2DM支持了火。我知道,对吧?如果您或您的用户愿意根吧,安装谷歌服务是一个选项。
As far as I know yes. Everything I have read indicates that Amazon stripped C2DM support out of the Fire. I know right? If you or your users are willing to root it, installing Google services is an option.
城市飞艇有一个名为氦推送服务,据称与Kindle Fire的作品。我还没有能够去尝试,但。
Urban Airship has a push service named Helium which purportedly works with Kindle Fire. I have yet to be able to try it though.
更新2013年8月13日
还有亚马逊SNS 。有href="http://aws.typepad.com/aws/2013/08/push-notifications-to-mobile-devices-using-amazon-sns.html" rel="nofollow">伟大的博客的主题演讲。
There is also Amazon SNS. There is a great blog on the topic.
请参阅如何实现一个接收器这项code段(从Amazon Web Services的博客):
See this code snippet for how to implement a receiver ( from the Amazon Web Services blog):
public class ExternalReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Log.i("ExternalReceiver","onReceive");
Bundle extras = intent.getExtras();
StringBuilder payload = new StringBuilder();
for(String key : extras.keySet()){
payload.append(String.format("%s=%s", key, extras.getString(key)) + '\n');
}
Intent newIntent = new Intent();
newIntent.setClass(context, AndroidMobilePushApp.class);
newIntent.putExtra(context.getString(R.string.msg_field), payload.toString());
newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
context.startActivity(newIntent);
}
}
这篇关于推送通知/ C2DM为Kindle Fire的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!