qw123wh / new-clock

The best clock app there is
Apache License 2.0
79 stars 27 forks source link

Cannot set timer or alarm via intent #15

Closed bartlibert closed 2 years ago

bartlibert commented 2 years ago

When I'm trying to set a timer or an alarm via voice or a shortcut with an intent, this fails and I get an "app not installed" error. With your old clock app, this did work, but now it's broken. I'm using a Samsung Galaxy S20 FE with Android 12. The logcat shows 'requires com.best.alarm.permission.SET_ALARM', so maybe that's the issue. Note that the logcats are very similar for alarm and timer, but I include them both just to be sure:

Timer: 01-21 08:31:35.992 730 908 I A : Setting the timer using public Clock API on com.best.deskclock 01-21 08:31:35.994 7517 8692 I Opa2NgaEvent: Got conversation params update 01-21 08:31:36.001 1222 8424 D ActivityTaskManager: startActivityAsUser: callingPid=730, callingUid=10244, caller=com.android.server.wm.ActivityTaskManagerService.startActivityAsUser:1742 com.android.server.wm.ActivityTaskManagerService.startActivity:1695 android.app.IActivityTaskManager$Stub.onTransact:1132 com.android.server.wm.ActivityTaskManagerService.onTransact:6172 android.os.Binder.execTransactInternal:1215 android.os.Binder.execTransact:1179 <bottom of call stack> 01-21 08:31:36.002 1222 8424 I ActivityTaskManager: START u0 {act=android.intent.action.SET_TIMER flg=0x10000000 pkg=com.best.deskclock cmp=com.best.deskclock/.HandleSetAlarmApiCalls (has extras)} from uid 10244 01-21 08:31:36.002 1222 8424 W ActivityTaskManager: Permission Denial: starting Intent { act=android.intent.action.SET_TIMER flg=0x10000000 pkg=com.best.deskclock cmp=com.best.deskclock/.HandleSetAlarmApiCalls (has extras) } from ProcessRecord{e1431d8 730:com.google.android.googlequicksearchbox:search/u0a244} (pid=730, uid=10244) requires com.best.alarm.permission.SET_ALARM 01-21 08:31:36.004 730 730 E A : Cannot start activity: Intent { act=android.intent.action.SET_TIMER flg=0x10000000 pkg=com.best.deskclock (has extras) } 01-21 08:31:36.004 730 730 E A : java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.SET_TIMER flg=0x10000000 pkg=com.best.deskclock cmp=com.best.deskclock/.HandleSetAlarmApiCalls (has extras) } from ProcessRecord{e1431d8 730:com.google.android.googlequicksearchbox:search/u0a244} (pid=730, uid=10244) requires com.best.alarm.permission.SET_ALARM 01-21 08:31:36.004 730 730 E A : at android.os.Parcel.createExceptionOrNull(Parcel.java:2437) 01-21 08:31:36.004 730 730 E A : at android.os.Parcel.createException(Parcel.java:2421) 01-21 08:31:36.004 730 730 E A : at android.os.Parcel.readException(Parcel.java:2404) 01-21 08:31:36.004 730 730 E A : at android.os.Parcel.readException(Parcel.java:2346) 01-21 08:31:36.004 730 730 E A : at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:2897) 01-21 08:31:36.004 730 730 E A : at android.app.Instrumentation.execStartActivity(Instrumentation.java:1743) 01-21 08:31:36.004 730 730 E A : at android.app.ContextImpl.startActivity(ContextImpl.java:1135) 01-21 08:31:36.004 730 730 E A : at com.google.android.apps.gsa.shared.util.u.c.a(PG:23) 01-21 08:31:36.004 730 730 E A : at com.google.android.apps.gsa.shared.util.u.a.a(PG:3) 01-21 08:31:36.004 730 730 E A : at com.google.android.apps.gsa.staticplugins.opa.mb.a(PG:17) 01-21 08:31:36.004 730 730 E A : at com.google.android.apps.gsa.staticplugins.opa.it.a(PG:1) 01-21 08:31:36.004 730 730 E A : at com.google.android.apps.gsa.staticplugins.opa.ga.h(PG:88) 01-21 08:31:36.004 730 730 E A : at com.google.android.apps.gsa.staticplugins.opa.ga.a(PG:57) 01-21 08:31:36.004 730 730 E A : at com.google.android.apps.gsa.staticplugins.opa.dx.k(PG:11) 01-21 08:31:36.004 730 730 E A : at com.google.android.apps.gsa.staticplugins.opa.valyrian.eh.gb(PG:30) 01-21 08:31:36.004 730 730 E A : at com.google.android.apps.gsa.search.shared.service.y.run(PG:5) 01-21 08:31:36.004 730 730 E A : at com.google.android.apps.gsa.shared.util.c.a.cg.b(PG:1) 01-21 08:31:36.004 730 730 E A : at com.google.android.apps.gsa.shared.util.c.a.ci.run(PG:1) 01-21 08:31:36.004 730 730 E A : at android.os.Handler.handleCallback(Handler.java:938) 01-21 08:31:36.004 730 730 E A : at android.os.Handler.dispatchMessage(Handler.java:99) 01-21 08:31:36.004 730 730 E A : at android.os.Looper.loopOnce(Looper.java:226) 01-21 08:31:36.004 730 730 E A : at android.os.Looper.loop(Looper.java:313) 01-21 08:31:36.004 730 730 E A : at android.app.ActivityThread.main(ActivityThread.java:8641) 01-21 08:31:36.004 730 730 E A : at java.lang.reflect.Method.invoke(Native Method) 01-21 08:31:36.004 730 730 E A : at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567) 01-21 08:31:36.004 730 730 E A : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133) 01-21 08:31:36.004 730 730 E A : Caused by: android.os.RemoteException: Remote stack trace: 01-21 08:31:36.004 730 730 E A : at com.android.server.wm.ActivityTaskSupervisor.checkStartAnyActivityPermission(ActivityTaskSupervisor.java:1335) 01-21 08:31:36.004 730 730 E A : at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1252) 01-21 08:31:36.004 730 730 E A : at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:883) 01-21 08:31:36.004 730 730 E A : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1871) 01-21 08:31:36.004 730 730 E A : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1742) 01-21 08:31:36.004 730 730 E A : 0

Alarm: 01-21 08:36:46.845 730 894 I A : Setting an alarm using public Clock API on com.best.deskclock 01-21 08:36:46.845 730 894 I A : ClientOpResult: OK 01-21 08:36:46.846 730 910 I A : hasHotwordEverywhere-false 01-21 08:36:46.848 730 894 W AssistSearchResultCache: Assistant search result is not present. 01-21 08:36:46.849 730 894 I A : trying to assist locally 01-21 08:36:46.849 730 894 I ContactLookupFeatureImp: #interaction 1 01-21 08:36:46.849 730 894 I A : fallback to server 01-21 08:36:46.849 730 918 I AudioRequestLSAdapter: StopListeningStatus result: # com.google.android.libraries.search.c.di@7bca4 01-21 08:36:46.850 730 909 I A : trying to assist locally 01-21 08:36:46.850 730 909 I ContactLookupFeatureImp: #interaction 1 01-21 08:36:46.850 730 909 I A : fallback to server 01-21 08:36:46.853 730 921 I Search.LoginHelperImpl: Successfully received auth token for scope: oauth2:https://www.googleapis.com/auth/googlenow in time 0 ms 01-21 08:36:46.853 730 910 I A : Using PairHttp for connection 01-21 08:36:46.853 730 924 I A : Attempting to connect to work profile. 01-21 08:36:46.854 1222 1303 D ActivityTaskManager: startActivityAsUser: callingPid=730, callingUid=10244, caller=com.android.server.wm.ActivityTaskManagerService.startActivityAsUser:1742 com.android.server.wm.ActivityTaskManagerService.startActivity:1695 android.app.IActivityTaskManager$Stub.onTransact:1132 com.android.server.wm.ActivityTaskManagerService.onTransact:6172 android.os.Binder.execTransactInternal:1215 android.os.Binder.execTransact:1179 <bottom of call stack> 01-21 08:36:46.854 730 924 I A : Finished attempting to connect to work profile, outcome: UNAVAILABLE, elapsed time: 0 ms. 01-21 08:36:46.854 730 7233 I CrossProfileSender: Attempting to bind 01-21 08:36:46.855 730 7233 I CrossProfileSender: Binding attempt failed: Permission not granted 01-21 08:36:46.855 7517 9697 I Opa2NgaEvent: Got conversation params update 01-21 08:36:46.855 730 7227 I Search.LoginHelperImpl: Successfully received auth token for scope: oauth2:https://www.googleapis.com/auth/googlenow in time 0 ms 01-21 08:36:46.856 1222 1303 I ActivityTaskManager: START u0 {act=android.intent.action.SET_ALARM flg=0x10000000 pkg=com.best.deskclock cmp=com.best.deskclock/.HandleSetAlarmApiCalls (has extras)} from uid 10244 01-21 08:36:46.856 1222 1303 W ActivityTaskManager: Permission Denial: starting Intent { act=android.intent.action.SET_ALARM flg=0x10000000 pkg=com.best.deskclock cmp=com.best.deskclock/.HandleSetAlarmApiCalls (has extras) } from ProcessRecord{e1431d8 730:com.google.android.googlequicksearchbox:search/u0a244} (pid=730, uid=10244) requires com.best.alarm.permission.SET_ALARM 01-21 08:36:46.857 730 924 W LocationOracle: getBestLocation(): no location is available 01-21 08:36:46.857 730 730 E A : Cannot start activity: Intent { act=android.intent.action.SET_ALARM flg=0x10000000 pkg=com.best.deskclock (has extras) } 01-21 08:36:46.857 730 730 E A : java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.SET_ALARM flg=0x10000000 pkg=com.best.deskclock cmp=com.best.deskclock/.HandleSetAlarmApiCalls (has extras) } from ProcessRecord{e1431d8 730:com.google.android.googlequicksearchbox:search/u0a244} (pid=730, uid=10244) requires com.best.alarm.permission.SET_ALARM 01-21 08:36:46.857 730 730 E A : at android.os.Parcel.createExceptionOrNull(Parcel.java:2437) 01-21 08:36:46.857 730 730 E A : at android.os.Parcel.createException(Parcel.java:2421) 01-21 08:36:46.857 730 730 E A : at android.os.Parcel.readException(Parcel.java:2404) 01-21 08:36:46.857 730 730 E A : at android.os.Parcel.readException(Parcel.java:2346) 01-21 08:36:46.857 730 730 E A : at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:2897) 01-21 08:36:46.857 730 730 E A : at android.app.Instrumentation.execStartActivity(Instrumentation.java:1743) 01-21 08:36:46.857 730 730 E A : at android.app.ContextImpl.startActivity(ContextImpl.java:1135) 01-21 08:36:46.857 730 730 E A : at com.google.android.apps.gsa.shared.util.u.c.a(PG:23) 01-21 08:36:46.857 730 730 E A : at com.google.android.apps.gsa.shared.util.u.a.a(PG:3) 01-21 08:36:46.857 730 730 E A : at com.google.android.apps.gsa.staticplugins.opa.mb.a(PG:17) 01-21 08:36:46.857 730 730 E A : at com.google.android.apps.gsa.staticplugins.opa.it.a(PG:1) 01-21 08:36:46.857 730 730 E A : at com.google.android.apps.gsa.staticplugins.opa.ga.h(PG:88) 01-21 08:36:46.857 730 730 E A : at com.google.android.apps.gsa.staticplugins.opa.ga.a(PG:57) 01-21 08:36:46.857 730 730 E A : at com.google.android.apps.gsa.staticplugins.opa.dx.k(PG:11) 01-21 08:36:46.857 730 730 E A : at com.google.android.apps.gsa.staticplugins.opa.valyrian.eh.gb(PG:30) 01-21 08:36:46.857 730 730 E A : at com.google.android.apps.gsa.search.shared.service.y.run(PG:5) 01-21 08:36:46.857 730 730 E A : at com.google.android.apps.gsa.shared.util.c.a.cg.b(PG:1) 01-21 08:36:46.857 730 730 E A : at com.google.android.apps.gsa.shared.util.c.a.ci.run(PG:1) 01-21 08:36:46.857 730 730 E A : at android.os.Handler.handleCallback(Handler.java:938) 01-21 08:36:46.857 730 730 E A : at android.os.Handler.dispatchMessage(Handler.java:99) 01-21 08:36:46.857 730 730 E A : at android.os.Looper.loopOnce(Looper.java:226) 01-21 08:36:46.857 730 730 E A : at android.os.Looper.loop(Looper.java:313) 01-21 08:36:46.857 730 730 E A : at android.app.ActivityThread.main(ActivityThread.java:8641) 01-21 08:36:46.857 730 730 E A : at java.lang.reflect.Method.invoke(Native Method) 01-21 08:36:46.857 730 730 E A : at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567) 01-21 08:36:46.857 730 730 E A : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133) 01-21 08:36:46.857 730 730 E A : Caused by: android.os.RemoteException: Remote stack trace: 01-21 08:36:46.857 730 730 E A : at com.android.server.wm.ActivityTaskSupervisor.checkStartAnyActivityPermission(ActivityTaskSupervisor.java:1335) 01-21 08:36:46.857 730 730 E A : at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1252) 01-21 08:36:46.857 730 730 E A : at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:883) 01-21 08:36:46.857 730 730 E A : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1871) 01-21 08:36:46.857 730 730 E A : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1742) 01-21 08:36:46.857 730 730 E A :

qw123wh commented 2 years ago

Try the new release just released version 1.1. Do one thing uninstall the old version and install this new one. Let me know if it works fine.

bartlibert commented 2 years ago

Thanks for the quick response, but it is still not working:

Alarm: 01-21 11:33:59.540 18116 18365 I A : Setting an alarm using public Clock API on com.best.deskclock 01-21 11:33:59.540 18116 18365 I A : ClientOpResult: OK 01-21 11:33:59.542 1197 1965 I SoundAlive_SRC384 arch64: ~SoundAlive_SRC384(): instance 90 01-21 11:33:59.543 1222 1303 V WindowManager: Relayout Window{b535daa u0 com.google.android.googlequicksearchbox/com.google.android.apps.gsa.staticplugins.opa.OpaActivity}: viewVisibility=0 req=1080x2400 d0 01-21 11:33:59.544 18116 18315 I AudioRouter: Route changed: ROUTE_NO_BLUETOOTH->ROUTE_NO_AUDIO,CONNECTION_TYPE_NONE->CONNECTION_TYPE_NONE 01-21 11:33:59.545 1222 6421 I MediaFocusControl: abandonAudioFocus() from uid/pid 10244/18116 clientId=android.media.AudioManager@849787acom.google.android.apps.gsa.speech.audio.d.h@259a82b 01-21 11:33:59.545 1222 6421 D AS.AudioService: GetAppDevice, uid=10244 01-21 11:33:59.545 1222 6421 D MediaFocusControl: selectFocusStack, uid = 10244, appDevice = 0, device = 2 01-21 11:33:59.546 1222 1303 D PowerManagerService: [api] release WakeLock SCREEN_BRIGHT_WAKE_LOCK 'WindowManager' ON_AFTER_RELEASE ACQ=-3s669ms (uid=1000 pid=1222 ws=WorkSource{10244} displayId=-1) 01-21 11:33:59.546 1222 1303 D EdgeLightingManager: hideForWakeLock packageName=android 01-21 11:33:59.546 1222 1303 D EdgeLightingManager: hideForWakeLock is no more used 01-21 11:33:59.546 1222 1303 D PowerManagerService: [api] applyWakeLockFlagsOnReleaseLocked : userActivityNoUpdateLocked is called : SCREEN_BRIGHT_WAKE_LOCK 'WindowManager' ON_AFTER_RELEASE (uid=1000 pid=1222 ws=WorkSource{10244} displayId=-1) 01-21 11:33:59.547 18116 18321 I AudioRouter: Audio focus abandoned 01-21 11:33:59.547 7517 9697 I Opa2NgaEvent: Got conversation params update 01-21 11:33:59.548 18116 18368 W AssistSearchResultCache: Assistant search result is not present. 01-21 11:33:59.548 18116 18368 I A : trying to assist locally 01-21 11:33:59.548 18116 18368 I ContactLookupFeatureImp: #interaction 1 01-21 11:33:59.549 18116 18368 I A : fallback to server 01-21 11:33:59.549 1222 1303 V WindowManager: Relayout hash=b535daa, pid=18116: mAttrs={(0,0)(fillxfill) sim={adjust=resize} ty=BASE_APPLICATION fmt=TRANSPARENT 01-21 11:33:59.549 1222 1303 V WindowManager: fl=81810102 01-21 11:33:59.549 1222 1303 V WindowManager: pfl=12020040 01-21 11:33:59.549 1222 1303 V WindowManager: vsysui=2410 01-21 11:33:59.549 1222 1303 V WindowManager: apr=LIGHT_STATUS_BARS LIGHT_NAVIGATION_BARS 01-21 11:33:59.549 1222 1303 V WindowManager: bhv=DEFAULT 01-21 11:33:59.549 1222 1303 V WindowManager: fitSides= dimAmount=0.58 naviIconColor=0} 01-21 11:33:59.550 18116 18367 I A : trying to assist locally 01-21 11:33:59.550 18116 18367 I ContactLookupFeatureImp: #interaction 1 01-21 11:33:59.550 18116 18367 I A : fallback to server 01-21 11:33:59.550 18116 18116 I ViewRootImpl@a9e0cb9[OpaActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=7 res=0x1 s={true -5476376633256759296} ch=false fn=1112 01-21 11:33:59.555 18116 18830 I Search.LoginHelperImpl: Successfully received auth token for scope: oauth2:https://www.googleapis.com/auth/googlenow in time 0 ms 01-21 11:33:59.555 18116 18370 I A : Attempting to connect to work profile. 01-21 11:33:59.556 18116 18836 I CrossProfileSender: Attempting to bind 01-21 11:33:59.556 18116 18315 I MicroDetectionState: Should stop hotword detection immediately - true 01-21 11:33:59.557 18116 18370 I A : Finished attempting to connect to work profile, outcome: UNAVAILABLE, elapsed time: 1 ms. 01-21 11:33:59.557 18116 18315 I A : Using PairHttp for connection 01-21 11:33:59.557 18116 18836 I CrossProfileSender: Binding attempt failed: Permission not granted 01-21 11:33:59.557 18116 18829 I Search.LoginHelperImpl: Successfully received auth token for scope: oauth2:https://www.googleapis.com/auth/googlenow in time 0 ms 01-21 11:33:59.557 18116 18833 I A : [Upload] Connected 01-21 11:33:59.559 18116 18370 W LocationOracle: getBestLocation(): no location is available 01-21 11:33:59.560 18116 18368 W CronetNetworkRqstWrppr: Upload request without a content type. 01-21 11:33:59.562 18116 18370 I A : tag() 01-21 11:33:59.562 18116 18370 I A : tag() 01-21 11:33:59.563 1222 1303 D ActivityTaskManager: startActivityAsUser: callingPid=18116, callingUid=10244, caller=com.android.server.wm.ActivityTaskManagerService.startActivityAsUser:1742 com.android.server.wm.ActivityTaskManagerService.startActivity:1695 android.app.IActivityTaskManager$Stub.onTransact:1132 com.android.server.wm.ActivityTaskManagerService.onTransact:6172 android.os.Binder.execTransactInternal:1215 android.os.Binder.execTransact:1179 <bottom of call stack> 01-21 11:33:59.564 1222 1303 I ActivityTaskManager: START u0 {act=android.intent.action.SET_ALARM flg=0x10000000 pkg=com.best.deskclock cmp=com.best.deskclock/.HandleSetAlarmApiCalls (has extras)} from uid 10244 01-21 11:33:59.564 1222 1303 W ActivityTaskManager: Permission Denial: starting Intent { act=android.intent.action.SET_ALARM flg=0x10000000 pkg=com.best.deskclock cmp=com.best.deskclock/.HandleSetAlarmApiCalls (has extras) } from ProcessRecord{43ec4ab 18116:com.google.android.googlequicksearchbox:search/u0a244} (pid=18116, uid=10244) not exported from uid 10519 01-21 11:33:59.566 18116 18116 E A : Cannot start activity: Intent { act=android.intent.action.SET_ALARM flg=0x10000000 pkg=com.best.deskclock (has extras) } 01-21 11:33:59.566 18116 18116 E A : java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.SET_ALARM flg=0x10000000 pkg=com.best.deskclock cmp=com.best.deskclock/.HandleSetAlarmApiCalls (has extras) } from ProcessRecord{43ec4ab 18116:com.google.android.googlequicksearchbox:search/u0a244} (pid=18116, uid=10244) not exported from uid 10519 01-21 11:33:59.566 18116 18116 E A : at android.os.Parcel.createExceptionOrNull(Parcel.java:2437) 01-21 11:33:59.566 18116 18116 E A : at android.os.Parcel.createException(Parcel.java:2421) 01-21 11:33:59.566 18116 18116 E A : at android.os.Parcel.readException(Parcel.java:2404) 01-21 11:33:59.566 18116 18116 E A : at android.os.Parcel.readException(Parcel.java:2346) 01-21 11:33:59.566 18116 18116 E A : at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:2897) 01-21 11:33:59.566 18116 18116 E A : at android.app.Instrumentation.execStartActivity(Instrumentation.java:1743) 01-21 11:33:59.566 18116 18116 E A : at android.app.ContextImpl.startActivity(ContextImpl.java:1135) 01-21 11:33:59.566 18116 18116 E A : at com.google.android.apps.gsa.shared.util.u.c.a(PG:23) 01-21 11:33:59.566 18116 18116 E A : at com.google.android.apps.gsa.shared.util.u.a.a(PG:3) 01-21 11:33:59.566 18116 18116 E A : at com.google.android.apps.gsa.staticplugins.opa.mb.a(PG:17) 01-21 11:33:59.566 18116 18116 E A : at com.google.android.apps.gsa.staticplugins.opa.it.a(PG:1) 01-21 11:33:59.566 18116 18116 E A : at com.google.android.apps.gsa.staticplugins.opa.ga.h(PG:88) 01-21 11:33:59.566 18116 18116 E A : at com.google.android.apps.gsa.staticplugins.opa.ga.a(PG:57) 01-21 11:33:59.566 18116 18116 E A : at com.google.android.apps.gsa.staticplugins.opa.dx.k(PG:11) 01-21 11:33:59.566 18116 18116 E A : at com.google.android.apps.gsa.staticplugins.opa.valyrian.eh.gb(PG:30) 01-21 11:33:59.566 18116 18116 E A : at com.google.android.apps.gsa.search.shared.service.y.run(PG:5) 01-21 11:33:59.566 18116 18116 E A : at com.google.android.apps.gsa.shared.util.c.a.cg.b(PG:1) 01-21 11:33:59.566 18116 18116 E A : at com.google.android.apps.gsa.shared.util.c.a.ci.run(PG:1) 01-21 11:33:59.566 18116 18116 E A : at android.os.Handler.handleCallback(Handler.java:938) 01-21 11:33:59.566 18116 18116 E A : at android.os.Handler.dispatchMessage(Handler.java:99) 01-21 11:33:59.566 18116 18116 E A : at android.os.Looper.loopOnce(Looper.java:226) 01-21 11:33:59.566 18116 18116 E A : at android.os.Looper.loop(Looper.java:313) 01-21 11:33:59.566 18116 18116 E A : at android.app.ActivityThread.main(ActivityThread.java:8641) 01-21 11:33:59.566 18116 18116 E A : at java.lang.reflect.Method.invoke(Native Method) 01-21 11:33:59.566 18116 18116 E A : at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567) 01-21 11:33:59.566 18116 18116 E A : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133) 01-21 11:33:59.566 18116 18116 E A : Caused by: android.os.RemoteException: Remote stack trace: 01-21 11:33:59.566 18116 18116 E A : at com.android.server.wm.ActivityTaskSupervisor.checkStartAnyActivityPermission(ActivityTaskSupervisor.java:1335) 01-21 11:33:59.566 18116 18116 E A : at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1252) 01-21 11:33:59.566 18116 18116 E A : at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:883) 01-21 11:33:59.566 18116 18116 E A : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1871) 01-21 11:33:59.566 18116 18116 E A : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1742) 01-21 11:33:59.566 18116 18116 E A :

Timer: 01-21 11:35:41.840 18116 18368 I A : Setting the timer using public Clock API on com.best.deskclock 01-21 11:35:41.842 1197 1965 I SoundAlive_SRC384 arch64: ~SoundAlive_SRC384(): instance 94 01-21 11:35:41.845 18116 18315 I AudioRouter: Route changed: ROUTE_NO_BLUETOOTH->ROUTE_NO_AUDIO,CONNECTION_TYPE_NONE->CONNECTION_TYPE_NONE 01-21 11:35:41.845 1222 2406 V WindowManager: Relayout Window{b535daa u0 com.google.android.googlequicksearchbox/com.google.android.apps.gsa.staticplugins.opa.OpaActivity}: viewVisibility=0 req=1080x2400 d0 01-21 11:35:41.846 1222 8424 I MediaFocusControl: abandonAudioFocus() from uid/pid 10244/18116 clientId=android.media.AudioManager@849787acom.google.android.apps.gsa.speech.audio.d.h@259a82b 01-21 11:35:41.846 1222 8424 D AS.AudioService: GetAppDevice, uid=10244 01-21 11:35:41.846 1222 8424 D MediaFocusControl: selectFocusStack, uid = 10244, appDevice = 0, device = 2 01-21 11:35:41.847 1222 2406 D PowerManagerService: [api] release WakeLock SCREEN_BRIGHT_WAKE_LOCK 'WindowManager' ON_AFTER_RELEASE ACQ=-3s370ms (uid=1000 pid=1222 ws=WorkSource{10244} displayId=-1) 01-21 11:35:41.847 18116 18318 I AudioRouter: Audio focus abandoned 01-21 11:35:41.847 1222 2406 D EdgeLightingManager: hideForWakeLock packageName=android 01-21 11:35:41.847 1222 2406 D EdgeLightingManager: hideForWakeLock is no more used 01-21 11:35:41.847 1222 2406 D PowerManagerService: [api] applyWakeLockFlagsOnReleaseLocked : userActivityNoUpdateLocked is called : SCREEN_BRIGHT_WAKE_LOCK 'WindowManager' ON_AFTER_RELEASE (uid=1000 pid=1222 ws=WorkSource{10244} displayId=-1) 01-21 11:35:41.847 7517 9273 I Opa2NgaEvent: Got conversation params update 01-21 11:35:41.850 1222 2406 V WindowManager: Relayout hash=b535daa, pid=18116: mAttrs={(0,0)(fillxfill) sim={adjust=resize} ty=BASE_APPLICATION fmt=TRANSPARENT 01-21 11:35:41.850 1222 2406 V WindowManager: fl=81810102 01-21 11:35:41.850 1222 2406 V WindowManager: pfl=12020040 01-21 11:35:41.850 1222 2406 V WindowManager: vsysui=410 01-21 11:35:41.850 1222 2406 V WindowManager: apr=LIGHT_NAVIGATION_BARS 01-21 11:35:41.850 1222 2406 V WindowManager: bhv=DEFAULT 01-21 11:35:41.850 1222 2406 V WindowManager: fitSides= dimAmount=0.58 naviIconColor=0} 01-21 11:35:41.851 18116 18315 I MicroDetectionState: Should stop hotword detection immediately - true 01-21 11:35:41.854 18116 18368 W AssistSearchResultCache: Assistant search result is not present. 01-21 11:35:41.854 18116 18116 I ViewRootImpl@a9e0cb9[OpaActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=9 res=0x1 s={true -5476376633256759296} ch=false fn=1118 01-21 11:35:41.854 18116 18368 I A : trying to assist locally 01-21 11:35:41.854 18116 18368 I ContactLookupFeatureImp: #interaction 1 01-21 11:35:41.854 18116 18368 I A : fallback to server 01-21 11:35:41.855 18116 18319 I A : trying to assist locally 01-21 11:35:41.855 18116 18319 I ContactLookupFeatureImp: #interaction 1 01-21 11:35:41.855 18116 18319 I A : fallback to server 01-21 11:35:41.857 18116 18826 I Search.LoginHelperImpl: Successfully received auth token for scope: oauth2:https://www.googleapis.com/auth/googlenow in time 0 ms 01-21 11:35:41.858 18116 18830 I A : Attempting to connect to work profile. 01-21 11:35:41.858 18116 18315 I A : Using PairHttp for connection 01-21 11:35:41.859 18116 18830 I A : Finished attempting to connect to work profile, outcome: UNAVAILABLE, elapsed time: 0 ms. 01-21 11:35:41.859 18116 18827 I A : [Upload] Connected 01-21 11:35:41.859 18116 18836 I CrossProfileSender: Attempting to bind 01-21 11:35:41.859 18116 18829 I Search.LoginHelperImpl: Successfully received auth token for scope: oauth2:https://www.googleapis.com/auth/googlenow in time 0 ms 01-21 11:35:41.859 1222 5975 D ActivityTaskManager: startActivityAsUser: callingPid=18116, callingUid=10244, caller=com.android.server.wm.ActivityTaskManagerService.startActivityAsUser:1742 com.android.server.wm.ActivityTaskManagerService.startActivity:1695 android.app.IActivityTaskManager$Stub.onTransact:1132 com.android.server.wm.ActivityTaskManagerService.onTransact:6172 android.os.Binder.execTransactInternal:1215 android.os.Binder.execTransact:1179 <bottom of call stack> 01-21 11:35:41.860 18116 18836 I CrossProfileSender: Binding attempt failed: Permission not granted 01-21 11:35:41.861 18116 18368 W CronetNetworkRqstWrppr: Upload request without a content type. 01-21 11:35:41.861 1222 5975 I ActivityTaskManager: START u0 {act=android.intent.action.SET_TIMER flg=0x10000000 pkg=com.best.deskclock cmp=com.best.deskclock/.HandleSetAlarmApiCalls (has extras)} from uid 10244 01-21 11:35:41.861 1222 5975 W ActivityTaskManager: Permission Denial: starting Intent { act=android.intent.action.SET_TIMER flg=0x10000000 pkg=com.best.deskclock cmp=com.best.deskclock/.HandleSetAlarmApiCalls (has extras) } from ProcessRecord{43ec4ab 18116:com.google.android.googlequicksearchbox:search/u0a244} (pid=18116, uid=10244) not exported from uid 10519 01-21 11:35:41.862 18116 18829 I A : tag() 01-21 11:35:41.862 18116 18829 I A : tag() 01-21 11:35:41.862 18116 18116 E A : Cannot start activity: Intent { act=android.intent.action.SET_TIMER flg=0x10000000 pkg=com.best.deskclock (has extras) } 01-21 11:35:41.862 18116 18116 E A : java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.SET_TIMER flg=0x10000000 pkg=com.best.deskclock cmp=com.best.deskclock/.HandleSetAlarmApiCalls (has extras) } from ProcessRecord{43ec4ab 18116:com.google.android.googlequicksearchbox:search/u0a244} (pid=18116, uid=10244) not exported from uid 10519 01-21 11:35:41.862 18116 18116 E A : at android.os.Parcel.createExceptionOrNull(Parcel.java:2437) 01-21 11:35:41.862 18116 18116 E A : at android.os.Parcel.createException(Parcel.java:2421) 01-21 11:35:41.862 18116 18116 E A : at android.os.Parcel.readException(Parcel.java:2404) 01-21 11:35:41.862 18116 18116 E A : at android.os.Parcel.readException(Parcel.java:2346) 01-21 11:35:41.862 18116 18116 E A : at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:2897) 01-21 11:35:41.862 18116 18116 E A : at android.app.Instrumentation.execStartActivity(Instrumentation.java:1743) 01-21 11:35:41.862 18116 18116 E A : at android.app.ContextImpl.startActivity(ContextImpl.java:1135) 01-21 11:35:41.862 18116 18116 E A : at com.google.android.apps.gsa.shared.util.u.c.a(PG:23) 01-21 11:35:41.862 18116 18116 E A : at com.google.android.apps.gsa.shared.util.u.a.a(PG:3) 01-21 11:35:41.862 18116 18116 E A : at com.google.android.apps.gsa.staticplugins.opa.mb.a(PG:17) 01-21 11:35:41.862 18116 18116 E A : at com.google.android.apps.gsa.staticplugins.opa.it.a(PG:1) 01-21 11:35:41.862 18116 18116 E A : at com.google.android.apps.gsa.staticplugins.opa.ga.h(PG:88) 01-21 11:35:41.862 18116 18116 E A : at com.google.android.apps.gsa.staticplugins.opa.ga.a(PG:57) 01-21 11:35:41.862 18116 18116 E A : at com.google.android.apps.gsa.staticplugins.opa.dx.k(PG:11) 01-21 11:35:41.862 18116 18116 E A : at com.google.android.apps.gsa.staticplugins.opa.valyrian.eh.gb(PG:30) 01-21 11:35:41.862 18116 18116 E A : at com.google.android.apps.gsa.search.shared.service.y.run(PG:5) 01-21 11:35:41.862 18116 18116 E A : at com.google.android.apps.gsa.shared.util.c.a.cg.b(PG:1) 01-21 11:35:41.862 18116 18116 E A : at com.google.android.apps.gsa.shared.util.c.a.ci.run(PG:1) 01-21 11:35:41.862 18116 18116 E A : at android.os.Handler.handleCallback(Handler.java:938) 01-21 11:35:41.862 18116 18116 E A : at android.os.Handler.dispatchMessage(Handler.java:99) 01-21 11:35:41.862 18116 18116 E A : at android.os.Looper.loopOnce(Looper.java:226) 01-21 11:35:41.862 18116 18116 E A : at android.os.Looper.loop(Looper.java:313) 01-21 11:35:41.862 18116 18116 E A : at android.app.ActivityThread.main(ActivityThread.java:8641) 01-21 11:35:41.862 18116 18116 E A : at java.lang.reflect.Method.invoke(Native Method) 01-21 11:35:41.862 18116 18116 E A : at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567) 01-21 11:35:41.862 18116 18116 E A : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133) 01-21 11:35:41.862 18116 18116 E A : Caused by: android.os.RemoteException: Remote stack trace: 01-21 11:35:41.862 18116 18116 E A : at com.android.server.wm.ActivityTaskSupervisor.checkStartAnyActivityPermission(ActivityTaskSupervisor.java:1335) 01-21 11:35:41.862 18116 18116 E A : at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1252) 01-21 11:35:41.862 18116 18116 E A : at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:883) 01-21 11:35:41.862 18116 18116 E A : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1871) 01-21 11:35:41.862 18116 18116 E A : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1742)

For reference, setting an alarm with your old clock app where it is working: AlarmClock: Set next power off alarm : instance id 3 01-21 11:38:02.678 32223 32223 I AlarmClock: Setting upcoming AlarmClockInfo for alarm: 3 01-21 11:38:02.679 1222 5245 D ActivityTaskManager: SafeActivityOptions created, mOriginalCallingPid=32223, mOriginalCallingUid=10515, options=ActivityOptions(59728242), mPackageName=null, mAnimationType=-1, mStartX=0, mStartY=0, mWidth=0, mHeight=0, caller=com.android.server.wm.SafeActivityOptions.fromBundle:82 com.android.server.am.PendingIntentController.getIntentSender:140 com.android.server.am.ActivityManagerService.getIntentSenderWithFeatureAsApp:6201 com.android.server.am.ActivityManagerService.getIntentSenderWithFeature:6122 android.app.IActivityManager$Stub.onTransact:3471 com.android.server.am.ActivityManagerService.onTransact:3030 android.os.Binder.execTransactInternal:1215 01-21 11:38:02.679 1222 6421 V SamsungAlarmManager: setLocked to kernel - W:67051391 / NW:66853616, now=66847917 01-21 11:38:02.679 1222 6421 D SamsungAlarmManager: setExact (T:0/F:3/AC:true) 20220121T114600 now=66847917 - CU:10515/CP:32223/OP:PendingIntent{86da240: PendingIntentRecord{bd4e1d3 com.chen.deskclock broadcastIntent}} 01-21 11:38:02.679 1222 6421 V SamsungAlarmManager: setLocked to kernel - W:67051391 / NW:66853616, now=66847917 01-21 11:38:02.680 1222 6021 D FreecessController: com.best.deskclock is top app, skip to freeze 01-21 11:38:02.680 18116 28860 W LocationOracle: getBestLocation(): no location is available 01-21 11:38:02.680 1222 1222 D SettingsProvider: isChangeAllowed() : name = next_alarm_formatted 01-21 11:38:02.681 1222 1222 I GenerationRegistry: mBackingStore.isClosed() : false 01-21 11:38:02.681 1222 1222 D ConditionProviders.SCP: onReceive android.app.action.NEXT_ALARM_CLOCK_CHANGED 01-21 11:38:02.682 1222 1222 D ConditionProviders.SCP: evaluateSubscriptionLocked cal=ScheduleCalendar[mDays={1, 2, 3, 4, 5, 6, 7}, mSchedule=ScheduleInfo{days=[2, 3, 4, 5, 6, 7, 1], startHour=22, startMinute=0, endHour=6, endMinute=29, exitAtAlarm=false, nextAlarm=Thu Jan 01 01:00:00 GMT+01:00 1970 (0)}], now=Fri Jan 21 11:38:02 GMT+01:00 2022 (1642761482681), nextUserAlarmTime=Fri Jan 21 11:46:00 GMT+01:00 2022 (1642761960000) 01-21 11:38:02.682 1222 1222 D ConditionProviders.SCP: notifyCondition condition://android/schedule?days=2.3.4.5.6.7.1&start=22.0&end=6.29&exitAtAlarm=false STATE_FALSE reason=!meetsSchedule 01-21 11:38:02.682 1222 1222 D SettingsProvider: isChangeAllowed() : name = snoozed_schedule_condition_provider 01-21 11:38:02.682 1222 1222 D SamsungAlarmManager: Cancel Alarm calling from uid:1000 pid :1222 / OP:PendingIntent{8ee22be: PendingIntentRecord{2f3f787 android broadcastIntent}} 01-21 11:38:02.682 1222 1222 V SamsungAlarmManager: setLocked to kernel - W:67051391 / NW:66853616, now=66847920 01-21 11:38:02.682 1222 1222 D ConditionProviders.SCP: Scheduling evaluate for Fri Jan 21 22:00:00 GMT+01:00 2022 (1642798800000), in +10h21m57s319ms, now=Fri Jan 21 11:38:02 GMT+01:00 2022 (1642761482681) 01-21 11:38:02.682 32223 32223 V Toast : show: caller = com.chen.deskclock.AlarmUtils.popAlarmSetToast:100 01-21 11:38:02.682 32223 32223 V Toast : show: focusDisplayId = 0, isFocusInDesktop = false mCustomDisplayId=-1 isDexDualMode=false 01-21 11:38:02.682 32223 32223 V Toast : show: isActivityContext = true 01-21 11:38:02.683 1222 1375 D SSRM:LoadDetectMonitor: PID = 32223, UID = 10515 01-21 11:38:02.683 5067 5067 D KeyguardUpdateMonitor: handleTimeUpdate 01-21 11:38:02.684 1222 5551 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1242 com.android.server.notification.sec.DisplayToast.sendIntentForToastDumpLog:156 com.android.server.notification.sec.DisplayToast.outFile:106 com.android.server.notification.sec.DisplayToast.out:62 com.android.server.notification.NotificationManagerService$14.enqueueToastForDex:3890 01-21 11:38:02.685 1212 1258 I SurfaceFlinger: id=11770 createSurf (0x0),-1 flag=80004, WindowToken{6aaa26c android.os.Binder@8eedf1f}#0 01-21 11:38:02.685 5067 5067 D FaceWidgetPagesController: onTimeChanged() 01-21 11:38:02.685 1222 5975 D SamsungAlarmManager: Cancel Alarm calling from uid:10243 pid :27529 / OP:PendingIntent{fac4035: PendingIntentRecord{8d3b5d9 com.google.android.gms/com.google.android.gms.gcm broadcastIntent}} 01-21 11:38:02.686 1222 1222 D SamsungAlarmManager: setExact (T:0/F:9/AC:false) 20220121T220000 now=66847923 - CU:1000/CP:1222/OP:PendingIntent{8ee22be: PendingIntentRecord{2f3f787 android broadcastIntent}} 01-21 11:38:02.686 1222 1222 V SamsungAlarmManager: setLocked to kernel - W:67051391 / NW:66853616, now=66847923 01-21 11:38:02.686 1222 5975 V SamsungAlarmManager: setLocked to kernel - W:67051391 / NW:66856656, now=66847924 01-21 11:38:02.687 1222 5975 D SamsungAlarmManager: setInexact (T:3/F:0/AC:false) 20220121T115943 now=66847924 - CU:10243/CP:27529/OP:PendingIntent{5e5acca: PendingIntentRecord{8d3b5d9 com.google.android.gms/com.google.android.gms.gcm broadcastIntent}} 01-21 11:38:02.687 1222 5975 V SamsungAlarmManager: setLocked to kernel - W:67051391 / NW:66856656, now=66847925 01-21 11:38:02.687 1222 6421 V WindowManager: Changing focus from null to Window{b535daa u0 com.google.android.googlequicksearchbox/com.google.android.apps.gsa.staticplugins.opa.OpaActivity} displayId=0 Callers=com.android.server.wm.RootWindowContainer.updateFocusedWindowLocked:582 com.android.server.wm.WindowManagerService.updateFocusedWindowLocked:6419 com.android.server.wm.DisplayContent.layoutAndAssignWindowLayersIfNeeded:4588 com.android.server.wm.TaskDisplayArea.positionChildTaskAt:552 01-21 11:38:02.687 1222 6421 D StatusBarManagerService: notifyRequestedSystemKey recent=false home=false 01-21 11:38:02.687 1222 6421 W WindowManager: Prepare app transition: mNextAppTransitionRequests=[TRANSIT_OPEN, TRANSIT_OPEN, TRANSIT_CLOSE], mNextAppTransitionFlags=, displayId: 0 Callers=com.android.server.wm.DisplayContent.prepareAppTransition:6193 com.android.server.wm.DisplayContent.prepareAppTransition:6188 com.android.server.wm.ActivityRecord.finishIfPossible:3571 com.android.server.wm.ActivityClientController.finishActivity:523 android.app.IActivityClientController$Stub.onTransact:706 01-21 11:38:02.688 27529 28719 W NetworkScheduler: Error inserting flex_time=0 job_id=-1 period=2000 source=16 requires_charging=0 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService user_id=0 target_package=com.google.android.gms tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG task_type=0 required_idleness_state=0 service_kind=0 source_version=214815000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1642761482677 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}} last_runtime=0, error message: UNIQUE constraint failed: pending_ops.tag, pending_ops.target_class, pending_ops.target_package, pending_ops.user_id (code 2067 SQLITE_CONSTRAINT_UNIQUE[2067]) [CONTEXT service_id=218 ] 01-21 11:38:02.689 1222 8229 V SamsungAlarmManager: setLocked to kernel - W:67051391 / NW:66856656, now=66847927 01-21 11:38:02.689 1222 8229 D SamsungAlarmManager: setInexact (T:3/F:0/AC:false) 20220121T113804 now=66847927 - CU:10243/CP:27529/OP:PendingIntent{bac4e3b: PendingIntentRecord{8d3b5d9 com.google.android.gms/com.google.android.gms.gcm broadcastIntent}} 01-21 11:38:02.689 1222 8229 V SamsungAlarmManager: setLocked to kernel - W:67051391 / NW:66852926, now=66847927 01-21 11:38:02.691 32223 32223 I DecorView: [INFO] isPopOver=false, config=true 01-21 11:38:02.691 32223 32223 I DecorView: updateCaptionType >> DecorView@101572e[], isFloating=false, isApplication=true, hasWindowControllerCallback=true, hasWindowDecorCaption=false 01-21 11:38:02.691 32223 32223 D DecorView: setCaptionType = 0, this = DecorView@101572e[] 01-21 11:38:02.691 32223 32223 I DecorView: getCurrentDensityDpi: from real metrics. densityDpi=480 msg=resources_loaded 01-21 11:38:02.692 18116 18318 I A : Media params proto is created 01-21 11:38:02.693 1222 8229 I NotificationService: cancelToast pkg=com.chen.deskclock token=android.os.BinderProxy@7079317 01-21 11:38:02.693 1222 8229 W NotificationService: Toast already cancelled. pkg=com.chen.deskclock token=android.os.BinderProxy@7079317 01-21 11:38:02.693 1222 5997 W NetlinkSocket: maximum read 01-21 11:38:02.694 32223 32223 I DigitalWidgetProvider: onReceive: Intent { act=android.app.action.NEXT_ALARM_CLOCK_CHANGED flg=0x21000010 cmp=com.chen.deskclock/com.chen.alarmclock.DigitalAppWidgetProvider } 01-21 11:38:02.695 1222 5245 V ActivityManager: Changed top to ProcessRecord{43ec4ab 18116:com.google.android.googlequicksearchbox:search/u0a244} 01-21 11:38:02.696 1212 1212 I SurfaceFlinger: [b535daa com.google.android.googlequicksearchbox/com.google.android.apps.gsa.staticplugins.opa.OpaActivity#0] FrameRatePriority: 1 01-21 11:38:02.698 1222 5997 W NetlinkSocket: maximum read 01-21 11:38:02.699 32223 32223 V ToastPresenter: Text: Xekk in android.widget.ToastPresenter@2f6845c 01-21 11:38:02.700 32223 32245 D NativeCustomFrequencyManager: [NativeCFMS] BpCustomFrequencyManager::BpCustomFrequencyManager() 01-21 11:38:02.702 18116 18318 I A : #getNlsDisclaimerHeardData 01-21 11:38:02.702 1222 5551 D InputTransport: Input channel constructed: '19f0b22', fd=891 01-21 11:38:02.702 1222 5551 D InputTransport: Input channel constructed: '19f0b22', fd=892 01-21 11:38:02.702 1222 5551 D InputTransport: Input channel constructed: '19f0b22', fd=903 01-21 11:38:02.703 1212 2503 I SurfaceFlinger: id=11771 createSurf (0x0),-1 flag=80004, 19f0b22 Toast#0 01-21 11:38:02.704 1222 5551 D InputTransport: Input channel destroyed: '19f0b22', fd=903 01-21 11:38:02.705 1222 5109 D DARUtil : Device owner status not updated yet... 01-21 11:38:02.705 1222 5109 D DARUtil : Not an enterprise user : 0 01-21 11:38:02.705 1222 5109 D DARUtil : Device owner status not updated yet... 01-21 11:38:02.705 1222 5109 D DARUtil : Not an enterprise user : 0 01-21 11:38:02.706 32223 32223 I ViewRootImpl@96f4ceb[Toast]: setView = android.widget.

qw123wh commented 2 years ago

The strange thing is that the two apps have 90% the same code. So if the old one works I have to try to understand the differences between the two and figure out which part of the code is causing this bug. Not if it may be the package name or whatever. Try the old app again and let me know if it works. If you have phone other than Samsung try that too.

bartlibert commented 2 years ago

I don't seem to see the "Setting the timer using public Clock API" lines for the old app, so maybe that one is using some older way to handle alarm settings? I tried it on a OnePlus 7 with Android 11 and I have the same issue.

qw123wh commented 2 years ago

I found some differences in android manifest, later i send you a test apk. If you find other differences, send them via link, for example if you find something in the old app copy the github url and send it. For what concerns"Setting the timer using public Clock API" send me the url because I can't find the difference

bartlibert commented 2 years ago

It was not a difference in the code, sorry if that was not clear. I just saw in the ADB logs that for this app, I see a line " Setting the timer using public Clock API", while for the old app I don't see that line at all. So indeed maybe something in the manifest that tells android to use another way to set timers/alarms? (I'm a software engineer but I have zero experience programming for android, so I'm just guessing here).

qw123wh commented 2 years ago

try this trial app. uninstall the old one and install this one. Let me know

qw123wh commented 2 years ago

I called it test it's a pre release

https://github.com/qw123wh/new-clock/releases

bartlibert commented 2 years ago

Unfortunately still the same. Logcat in attachment logcat.log

qw123wh commented 2 years ago

try again with test2 always in releases. Then tell me how it is created with shortcut with an intent, so I can test it too

qw123wh commented 2 years ago

try again with test 3

bartlibert commented 2 years ago

Not working with test3 either.

My test procedure:

  1. open google assistant
  2. say "set an alarm" (but don't specify a time)
  3. click on the clock icon that is shown to select the clock app to use tempFileForShare_20220121-171607
  4. Say the time when you want the alarm
  5. Wait till the assistant confirms the alarm is set. Now the "app not installed" message is shown

Another test I have is that I use the app QuickTiles to add a "new timer" and "new alarm" button to my quick settings. If I click those and I have multiple clock apps, it will ask me which app to use, but new-clock is never one of the options (the old one is). If I uninstall all clock apps, except new-clock, nothing happens when I click the setting.

qw123wh commented 2 years ago

Ok thanks, now I just have to figure out if it's a source problem or something that can be solved. If it is a source problem, I must first take a source of the aosp clock that does not have this bug, and then modify it to make it the same as the app we know today. Basically a hard job. This may take a long time.

qw123wh commented 2 years ago

good news, test 4 should work, quick tiles recognizes this. The package name has been restored with the original name com.android.deskclock this can cause installation failure on some devices because the xiaomi or other type system clock has the same system name. I had changed the name to com.best.deskclock so it could be installed on all devices. Now tell me if it works and then I'll find a way to make it work even with the name changed

bartlibert commented 2 years ago

This version works indeed. Very strange that the package name could have this effect.

qw123wh commented 2 years ago

It's absurd, I'm going crazy, I tried to change the package name again, but nothing doesn't want to work. It only works with the original name. I cannot release an app with the original name, otherwise it conflicts with the pre-installed apps. Keep using that trial version. So if I can get it to work I will release an update

qw123wh commented 2 years ago

download version 1.2 should work. Thanks for reporting the bug