title: Java/Android: passing Intent extras from BroadcastReceiver to Activity
body: <p><strong>Update:</strong> Neither eclipse nor the code did cause these trouble. <strong>Genymotion</strong> did.</p>
  
  <p>Maybe my approach is completely wrong, since no one else seems to have this problem - if so, i am open to try different ways rather then fix this problem:
  I have the following setting.</p>
  
  <p>A BroadcastReceiver is listening for installations of Apps. Whenever a new App is installed, I create a Notification, using a PendingIntent that is based on a normal Intent via </p>
  
  <pre><code>PendingIntent pIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0);
  </code></pre>
  
  <p>Before the PendingIntent is created, I put some extras in the normal Intent, that shall be passed to the Activity which is triggered, when the notification is clicked.</p>
  
  <pre><code>notificationIntent.putExtra("AppLabel", appLabel); // the installed App
  notificationIntent.putStringArrayListExtra("Group", group); // the corresponding group
  notificationIntent.putStringArrayListExtra("List", list); // the corresponding list
  </code></pre>
  
  <p>Now this works fine and the notification is displayed. Debugging I can see, that when pIntent is created, all extras are set correctly and passed.
  However, when I try to read the extras in the opened Activity trouble starts. I already had to build a workaround, based on an answer here, to read the extras:</p>
  
  <pre><code>Bundle bundle = getIntent().getExtras();
  for (String key : bundle.keySet()) {
    Object value = bundle.get(key);
    if (key.equals("Group")) {
     group = (ArrayList&lt;String&gt;) value;
    } ... }
  </code></pre>
  
  <p>This also worked for a time, but now i am completely lost. For some Reason, the ArrayList extras are empty [] - the appLabel is still set correctly.</p>
  
  <p>Now the real trouble is, that I am not sure if this is code related, or an eclipse issue.</p>
  
  <p>I observed, that after some deployments, the bundle.keySet() returned different keys then I had set in the putExtra call. I also encounter OutOfSync errors often when I search. Refreshing does help some times, regarding the names of the keys, but the values are lost still.</p>
  
  <p>To anyone who has read this: many thanks! now - has somebody a clue, what is going on here? Does anyone know similar eclipse problems? Or is there an error in the code?
  Any proposals for a different design are welcome as well. I'd be just glad, if I can exclude some error sources...
  Thanks in advance</p>
  
  <p>Update: Manifest Infos: The launched notification Activity is defined like:</p>
  
  <pre><code>&lt;activity
   android:theme="@style/Theme.AppCompat.CompactMenu.Dialog"
   android:label="Notification Receiver"
   android:excludeFromRecents="true"&gt;
  &lt;/activity&gt;
  </code></pre>
  
  <p>The MainActivity however has just a name and a label. Besides:</p>
  
  <pre><code>&lt;uses-sdk
  android:minSdkVersion="18"
  android:targetSdkVersion="19" /&gt;
  </code></pre>
  
  <p>I just added a SystemOut at two points: One when the intent is created by the BCR, one when it is read by the Activity.</p>
  
  <pre><code>BroadcastReceiver.getExtras.keyset returns [a,b,c,d]
  
  Activity.getExtras.keyset returns the keys [x,y,z]
  </code></pre>
  
  <p>Searching in all Projects and all Workspace, x,y,z are nowhere to be found... They were used in a previous version of some days ago, so it seems eclipse stored some invalid old data?</p>