Calling code (run in service):
Intent textIntent = new Intent(this, TextActivity.class);
textIntent.putExtra("text_seq", message.xfer.seq);
textIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(textIntent);
Called code (in TextActivity
):
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
Log.d(TAG, "" + bundle.getInt("text_seq"))
...
In fact the whole bundle is lost - the code above throws an NPE when calling bundle.getInt()
.
I'm sure there's something obvious I have missed...