Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Android GCM and Titanium Receivers

$
0
0

Hi. I'm trying to get my to work with Android's GCM push notifications I'm having quite a bit of trouble.

Every time I run my code, I get 'Unable to start receiver com.appcelerator.aps.GCMReceiver'. I've searched around and found no matches to this exact error. I see some similar, but they refer to com.appcelerator.cloudpush instead of .aps, although I'm not sure if this has any influence.

My tiapp.xml includes the following:

<receiver android:name=".GcmBroadcastReceiver" android:exported="true"  android:permission="com.google.android.c2dm.permission.SEND" >
        <intent-filter>
               <action android:name="com.google.android.c2dm.intent.RECEIVE" />
              <category android:name="com.blueaim.t4" />
        </intent-filter>
</receiver>
<service android:name="com.google.android.gcm.GcmIntentService" />
Without the receiver, I don't get any errors, although that might be because I'm also not getting the notifications. With the receiver, I consistently get: TiApplication: (main) [6,9894] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start receiver com.appcelerator.aps.GCMReceiver: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference; Titanium 3.5.1,2015/03/05 10:08,96875c9

This happens in version 3.5.0GA and 3.5.1GA. Any help would be much appreciated, thank you.


Viewing all articles
Browse latest Browse all 8068

Trending Articles