Push notifications / C2DM for Kindle Fire?

社会主义新天地 提交于 2019-11-27 16:07:28

问题


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?

I couldn't find any info on push in the Kindle Fire FAQ or anywhere on the web.


回答1:


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.

Urban Airship has a push service named Helium which purportedly works with Kindle Fire. I have yet to be able to try it though.

Update 8/13/2013

There is also Amazon SNS. There is a great blog on the topic.

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);
    }
}



回答2:


In addition to Urban Airship (mentioned by stevebot), there are similar alternatives:

Parse.com - I've successfully pushed a notification to the Kindle Fire following their quick start guide. Very straight-forward. It's a tiered freemium model, i.e., free depending the volume. Pricing seems very reasonable, comparatively to Urban Airship and Xtify.

Xtify - Should also work, but I have yet to try it. It uses an XMPP connection to send messages. Also appears to be freemium, depending on the number of devices (currently says under 10K devices is free as a "developer special").

Alternatively, ralight gives some good information and resources for implementing your own push using MQTT in a related thread: Android device needs to be connected to server - C2DM, polling or something third?




回答3:


I think you can do push using SNS through Amazon Web Services for Kindle Fire.

http://aws.amazon.com/sns/




回答4:


It looks like the Kindle Fire is missing EVERYTHING from Google. Our best guess is that Amazon didn't want to sign a contract with Google to get access to their proprietary software (Market, Maps, and other Google services including C2DM). Which helps explain why there are two distinct market apps now (Amazon and Google) as well as all the issues people are discovering with their existing apps.




回答5:


Note that Urban Airship ended support for Helium for Google Android - their custom technology that allowed push notifications to Kindle and NOOK devices (Helium For Google Android Sunset FAQ).

Here (Google Cloud Messaging Support FAQ) they do state:

"We plan to support Kindle via Amazon's Amazon Device Messaging (ADM) service at some point in the future."




回答6:


I'm just reseaching for the Amazon's way to push on kindel devices. The AWS service for that is the Simple Queue Service (SQS). I did no use it yet, but it seems to be nice since it allows you to send and schedule push messages also for Google Cloud Messaging (GCM) and even the Apple guys.

Amazon calls his service Amazon Device Messaging (ADM), on that page you can download the SDK and integrate the API.

Even if this answer is late (four years later), I hope this will help other developers for their research.




回答7:


You can't use C2DM to Kindle. I don't know why Dule's answer above says he could use Parse to push to Kindle - their service is C2DM and there is no mention of a Kindle client in their docs.

Urban Airship works only because they have their own client, which is fine, but it's not standard.



来源:https://stackoverflow.com/questions/8439999/push-notifications-c2dm-for-kindle-fire

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!