Open adrcotfas opened 4 years ago
What Android version do you use?
@Gericop: Android 10 I see this problem on other generations of Pixel and OnePlus 7 Pro too (ANRs & crashes report from Google Play Console).
Do those devices run Android 10 as well?
@Gericop: Yes, there's Android 10 on all of them.
Well, at first look it must be something with the scoped storage introduced in 10. The problem is to add a custom ringtone, the app must copy the file from wherever the user selects it from to the ringtone folder of the phone but it seems like there's no way to do this with scoped storage. A workaround would be to show a save dialog after selecting the file and saving it to the ringtone folder but that's just a pretty terrible UX... Still looking into a proper fix though.
A different solution would be introducing the shared prefs to the game so the custom ringtones would get copied into the app folders (which are available with scoped storage), and the custom ringtone's properties would be saved to the shared prefs.
I wonder how the file explorers will work with the messy scoped storage... I guess they won't.
@Gericop do you know where the list of added custom notification sounds is stored? I would like to clear it in the following case:
I see that if you start fresh with Android 10, a toast is shown when trying to add a custom ringtone which is still better than a completely unusable RingtonePreference like the case above.
Edit: the exception I'm getting comes from onPrepareDialogBuilder
where createCursor
is called.
Hello, I'm getting this exception on a Pixel 3.