Note that there are some explanatory texts on larger screens.

plurals
  1. POc2dm why is the wrong c2dm app on my phone getting the message
    primarykey
    data
    text
    <p>[UPDATE]<br> (when you read my question this is good to know)<br> I had a small programing bug and now its kind of working. However both apps on the phone are receiving the same message so there is something i forgot to do </p> <p>[END UPDATE]</p> <p>I have a c2dm app and server set up for month and everything works grate. I have 14 users/friends registered and all pushes works find </p> <p>I run in to some trouble when I created a sandbox on another computer running the next version of the app and server. </p> <p>On the sandbox i have changed the package name on the app.<br> On my phone i have both versions installed fine and dandy.<br> Only difference is the sandbox version app is communicating with sandbox server (of course).<br> why is the wrong c2dm app on my phone getting the message?</p> <p>Now, Why is messages from sandbox app being received by the non-sandbox app?</p> <p>For a amateur programmer like me the documentation for c2dm is sometimes hard to understand.<br> Im confused about the:</p> <pre><code>public static final String EXTRA_APPLICATION_PENDING_INTENT = "app"; </code></pre> <p>Should I write the package name here? Something has to uniquely identify the two apps right?</p> <p>Another thing i cannot find an answer/documentation for is the registration_id.<br> I imagine that a phone only have one registration_id but can have multiple c2dm apps?<br> This was my assumption, gladly correct me if im wrong. </p> <p>im confused if the problem is in the the way i handle registration_id or the way i send push messages. dont know where to begin here?</p> <p>[UPDATE]...</p> <pre><code> &lt;receiver android:name="com.google.android.c2dm.C2DMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND"&gt; &lt;intent-filter&gt; &lt;!-- Receive the actual message --&gt; &lt;action android:name="com.google.android.c2dm.intent.RECEIVE" /&gt; &lt;category android:name="com.bent.blaster" /&gt; &lt;/intent-filter&gt; &lt;intent-filter&gt; &lt;!-- Receive the registration id --&gt; &lt;action android:name="com.google.android.c2dm.intent.REGISTRATION" /&gt; &lt;category android:name="com.bent.blaster" /&gt; &lt;/intent-filter&gt; &lt;/receiver&gt; &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.bent.blaster" android:versionCode="1" android:versionName="0.52" android:installLocation="preferExternal"&gt; &lt;permission android:name="com.bent.blaster.permission.C2D_MESSAGE" android:protectionLevel="signature" /&gt; &lt;uses-permission android:name="com.bent.blaster.permission.C2D_MESSAGE" /&gt; &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt; &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt; &lt;uses-permission android:name="android.permission.INTERNET" /&gt; &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt; &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt; &lt;uses-permission android:name="android.permission.VIBRATE" /&gt; &lt;uses-sdk android:minSdkVersion="8" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload