In Activity A I essentially have:
Long customerId = 123;
intent.putExtra("customerId", customerId);
startActivity(intent);
And in Activity B's onCreate() I have:
mCustomerId = getIntent().getLongExtra("customerId", -1);
But for one of my users (Nexus 4, Android 6.0.1), mCustomerId resolves to -1 in Activity B (-1 being the default value). This code works fine for my other 1000 users.
This same user has a similar issue receiving an intent extra in a library I use:
https://github.com/Ereza/CustomActivityOnCrash/issues/56
How can this happen?
Log:
Fatal Exception: java.lang.IllegalArgumentException
Update is not supported for content://appinventor.ai_GavinGT.TipTracker_9_1_426am_ready_for_market/customers/-1
appinventor.ai_GavinGT.DeliveryTipTrackerPro_ready_for_market.data.TipProvider.update (TipProvider.java:326)
android.content.ContentProvider$Transport.update (ContentProvider.java:355)
android.content.ContentResolver.update (ContentResolver.java:1364)
appinventor.ai_GavinGT.DeliveryTipTrackerPro_ready_for_market.customer_info.CustomerProfileActivity.saveChanges (CustomerProfileActivity.java:208)
appinventor.ai_GavinGT.DeliveryTipTrackerPro_ready_for_market.customer_info.CustomerProfileActivity.access$400 (CustomerProfileActivity.java:58)
appinventor.ai_GavinGT.DeliveryTipTrackerPro_ready_for_market.customer_info.CustomerProfileActivity$6.onDebouncedClick (CustomerProfileActivity.java:137)
appinventor.ai_GavinGT.DeliveryTipTrackerPro_ready_for_market.custom_classes.DebouncedOnClickListener.onClick (DebouncedOnClickListener.java:39)
android.view.View.performClick (View.java:5204)
android.view.View$PerformClick.run (View.java:21153)
android.os.Handler.handleCallback (Handler.java:739)
android.os.Handler.dispatchMessage (Handler.java:95)
android.os.Looper.loop (Looper.java:148)
android.app.ActivityThread.main (ActivityThread.java:5420)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:726)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:616)
As you can see from the second line of the log, -1 is being inserted as the rowId for the customer table when it should be 123 (123 is just an example, the rowId could be any number greater than 0).
EDIT: I'm starting to think that this guy might be poking around my app in ADB. That would explain why the intent extras aren't being delivered:
A user is somehow accessing Pro features in the Free version