My app isn't working on Android 7. My BroadcastReceiver.onReceive method is called but the contents of the intent.getExtras is missing. I've verified that the data was correctly loaded. Here's a snippet from my onReceive method, where intent is passed as a parameter to onReceive.
Bundle bundle = intent.getExtras();
textMessage = bundle.getString("TEXT_MESSAGE");
ArrayList<MyPhoneNumber> phoneNumbersToText = bundle.getParcelableArrayList("PHONE_NUMBERS");
Both textMessage and phoneNumbersToText are null.
Here's a snippet from my manifest file:
<receiver android:process=":remote" android:name="com.friscosoftware.timelytextbase.AlarmReceiver"></receiver>
Here's a snippet where the data is loaded:
Intent intent = new Intent(context , AlarmReceiver.class);
intent.putExtra(Constants.TEXT_MESSAGE, scheduledItem.getMessageToSend());
intent.putExtra(Constants.PHONE_NUMBERS, scheduledItem.getPhoneNumbersToText());
PendingIntent sender = PendingIntent.getBroadcast(context, getRequestCodeFromKey(key), intent, PendingIntent.FLAG_UPDATE_CURRENT);
// Get the AlarmManager service
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
alarmManager.set(AlarmManager.RTC_WAKEUP, selectedDateTime.getTimeInMillis(), sender);
The same code works fine in Android 6.
Any thoughts on what changes are required here for Android 7?
Thank you