Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Push notifications / C2DM for Kindle Fire?

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.

like image 802
Artem Russakovskii Avatar asked Dec 09 '11 01:12

Artem Russakovskii


3 Answers

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);
    }
}
like image 141
stevebot Avatar answered Oct 23 '22 12:10

stevebot


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?

like image 30
dule Avatar answered Oct 23 '22 12:10

dule


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

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

like image 22
jt-gilkeson Avatar answered Oct 23 '22 10:10

jt-gilkeson