開発者コンソールにエラーがあり、マニフェストRingTonePickerActivity
に権限がないため開始できないと表示されます。WRITE_SETTINGS
を表示するためにその許可が必要なのはなぜRingTonePicker
ですか? マニフェストにそれを含めずにいくつかのデバイスでこれをテストしましたが、まったく問題はありませんでした。
java.lang.RuntimeException: Unable to start activity ComponentInfo{android/com.android.internal.app.RingtonePickerActivity}:
java.lang.SecurityException: Permission Denial: writing com.android.providers.settings.SettingsProvider uri content://settings/system from pid=24760, uid=10108 requires android.permission.WRITE_SETTINGS
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.SecurityException: Permission Denial: writing com.android.providers.settings.SettingsProvider uri content://settings/system from pid=24760, uid=10108 requires android.permission.WRITE_SETTINGS
at android.os.Parcel.readException(Parcel.java:1322)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:160)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:114)
at android.content.ContentProviderProxy.insert(ContentProviderNative.java:408)
at android.content.ContentResolver.insert(ContentResolver.java:604)
at android.provider.Settings$NameValueTable.putString(Settings.java:576)
at android.provider.Settings$System.putString(Settings.java:772)
at android.media.RingtoneManager.setActualDefaultRingtoneUri(RingtoneManager.java:655)
at android.media.RingtoneManager.setDefaultNotificationToProvider(RingtoneManager.java:764)
at com.android.internal.app.RingtonePickerActivity.onCreate(RingtonePickerActivity.java:166)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)