Rafiq , my prayer times app, plays the adhan as a notification sound. A user wrote that the notification arrived but the adhan did not play. Debug builds were fine, the emulator was fine and 1,814 tests were green. On every release build, the phone played its ordinary notification tone.
The symptom
The notification arrives on time.
The sound is the system default instead of your file.
It only happens in release builds with resource shrinking on.
No error is logged anywhere.
Read the channel before the code
My first move was to reread the scheduler, which was a waste. Android owns the channel, so ask Android:
adb shell dumpsys notification
Enter fullscreen mode
Exit fullscreen mode
Find your channel in the output and read mSound . Mine said:
mSound=content://settings/system/notification_sound
Enter fullscreen mode
Exit fullscreen mode
The channel had been created with the wrong sound. Nothing about scheduling could cause or fix that.…