2

I've been trying to send a push message from my java EE web app, to my Android phone.

I've followed and read a lot of tutorial (like this one http://www.vogella.com/articles/AndroidCloudToDeviceMessaging/article.html)

I successfully get my registration_id on my Android Phone. Then I sent a POST request witch sent me a "200 ok" response !

But I can't get nothing on my BroadcastReceiver...

The "200 OK" response mean that the message as been send ? What can i do ?

Thanks guys ;)

2 Answers2

1

There are a few things to check here.

  1. Did you declare your receiver for messages in the manifest? this is a seperate receiver for when the application receives messages. Ensure that the package name also matches yours. It should look similar too:

     <receiver
        android:name=".C2DMMessageReceiver"
        android:permission="com.google.android.c2dm.permission.SEND" >
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" >
            </action>
    
            <category android:name="jakebuller.liveapp" />
        </intent-filter>
    </receiver>
    
  2. You need to make sure you created another class with a matching name to the name of the receiver declared in the manifest as seen above. this class is much like the registration receiver.

I had the same issue a few days ago and it turned out to be the receiver not being declared in the manifest properly so just be sure to triple check that. hope this helps!

Jake
  • 513
  • 5
  • 16
0

A little feedback about this issue : This was a problem from my local network... All the port were closed.

It tried with 3G and it works...