java.lang.SecurityException: Caller com.example.newflashcard needs to hold…
- User
java.lang.SecurityException: Caller com.example.newflashcard needs to hold android.permission.SCHEDULE_EXACT_ALARM or android.permission.USE_EXACT_ALARM to set exact alarms. at android.os.Parcel.createExceptionOrNull
- Assistant
The
java.lang.SecurityExceptionyou are encountering indicates that your application, identified by the packagecom.example.newflashcard, is trying to set an exact alarm but does not have the necessary permissions. Starting from Android 12 (API level 31), apps need to hold one of the following permissions to schedule exact alarms: - User
java.lang.SecurityException: Caller com.example.newflashcard needs to hold android.permission.SCHEDULE_EXACT_ALARM or android.permission.USE_EXACT_ALARM to set exact alarms. at android.os.Parcel.createExceptionOrNull(Parcel.java:3057) at android.os.Parcel.createException(Parcel.java:3041) at android.os.Parcel.readException(Parcel.java:3024) at android.os.Parcel.readException(Parcel.java:2966)
- Assistant
- User
Alarm kuruyorum ama notification gelmiyor ->24-10-28 04:02:00.001 1877-2317 AlarmManager system_server D mBroadcastRefCount -> 1 2024-10-28 04:02:00.005 1877-1877 AlarmManager system_server D mBroadcastRefCount -> 0 2024-10-28 04:02:00.005 1877-1877 AlarmManager system_server D mPendingIntent -> null 2024-10-28 04:02:00.571 1877-2317 AlarmManager system_server D mBroadcastRefCount -> 1 2024-10-28 04:02:00.613 1877-1877 AlarmManager system_server D mBroadcastRefCount -> 0 2024-10-28 04:02:00.613 1877-1877 AlarmManager system_server D mPendingIntent -> PendingIntent{ea830a: PendingIntentRecord{b83077b com.example.newflashcard broadcastIntent}}
- Assistant
- User
Bu sonuçlar alarmın tetiklendiğini mi işaret ediyor? -> 2024-10-28 04:06:59.098 1877-2317 AlarmManager system_server D mBroadcastRefCount -> 1 2024-10-28 04:06:59.106 1877-1877 AlarmManager system_server D mBroadcastRefCount -> 0 2024-10-28 04:06:59.106 1877-1877 AlarmManager system_server D mPendingIntent -> null 2024-10-28 04:06:59.844 1877-2317 AlarmManager system_server D mBroadcastRefCount -> 1 2024-10-28 04:06:59.919 1877-1877 AlarmManager system_server V nonwake up less than 100ms;nowElapsed:357263275, Alarm{d36737b uId =1000 creatorUid =1000 packageName =android sourcePackage =android operation =null type 3 origWhen 357263357 whenElapsed 357263357 android} 2024-10-28 04:06:59.920 1877-1877 AlarmManager system_server D mBroadcastRefCount -> 0 2024-10-28 04:06:59.920 1877-1877 AlarmManager system_server D mPendingIntent -> PendingIntent{a7f71f1: PendingIntentRecord{e6121d6 android broadcastIntent}} 2024-10-28 04:07:00.001 1877-2317 AlarmManager system_server D mBroadcastRefCount -> 1 2024-10-28 04:07:00.003 1877-1877 AlarmManager system_server D mBroadcastRefCount -> 0 2024-10-28 04:07:00.003 1877-1877 AlarmManager system_server D mPendingIntent -> null 2024-10-28 04:07:00.109 1877-2317 AlarmManager system_server D mBroadcastRefCount -> 1 2024-10-28 04:07:00.165 1877-1877 AlarmManager system_server D mBroadcastRefCount -> 0 2024-10-28 04:07:00.165 1877-1877 AlarmManager system_server D mPendingIntent -> PendingIntent{40ef4f: PendingIntentRecord{aaa26dc com.example.newflashcard broadcastIntent}}
- Assistant
- User
E Error opening kernel wakelock stats for: wakeup12 (../../devices/platform/soc/10026000.pwrap/10026000.pwrap:mt6366/mt6358-rtc/rtc/rtc0/alarmtimer.1.auto/wakeup/wakeup12): Permission denied
- Assistant