It looks like I can't explain clearly which is the problem and there is something that dodges my understanding. My bad.
The log file I posted should be examined in relation to the videoclip of my app running. In the log file, when the device is locked and the screen is marked as off in the log, this can actually correspond to two status that can't be told apart: when the screen is on and when the screen is off. Here is my problem.
We have therefore these 3 conditions:
Device unlocked --> IdleMode.IsScreenOff = False ---> The notification triggers: OK, as expected
Device locked, screen OFF --> IdleMode.IsScreenOff = True ---> The notification doesn't trigger: OK, as expected
Device locked, screen ON --> IdleMode.IsScreenOff = True (but should be False!) ---> The notification doesn't trigger: Wrong behaviour
If the device is locked, but the screen is on, I want the notification triggers, but this does not occur because Anke's extension detects the case "Device locked, screen ON" as IdleMode.IsScreenOff = True.
To show the problem, I modified the debug version of my app by changing the log messages text and by adding a button Log Debug within the notification message itself and I pressed it to record a log message just only when the device is locked with screen active:
This is the corresponding logcat (on each line, I reported the actual status of the device):
03-08 21:32:46.593 30319 30319 I Notifier: DEBUG: IdleMode.IsScreenOff = FALSE ---> Device unlocked
03-08 21:32:51.631 30319 30319 I Notifier: DEBUG: IdleMode.IsScreenOff = FALSE ---> Device unlocked
03-08 21:32:56.649 30319 30319 I Notifier: DEBUG: IdleMode.IsScreenOff = FALSE ---> Device unlocked
03-08 21:32:59.296 18275 2501 I NearbySharing: Screen is locked
03-08 21:33:01.658 30319 30319 I Notifier: DEBUG: IdleMode.IsScreenOff = TRUE ---> Device locked, screen off
03-08 21:33:06.671 30319 30319 I Notifier: DEBUG: IdleMode.IsScreenOff = TRUE ---> Device locked, screen off 03-08 21:33:11.691 30319 30319 I Notifier: DEBUG: IdleMode.IsScreenOff = TRUE ---> Device locked, screen on 03-08 21:33:14.314 31115 31115 I Notifier: DEBUG: Device now LOCKED with screen ON. ---> Here I pressed the button Log Debug in the notification... 03-08 21:33:16.705 30319 30319 I Notifier: DEBUG: IdleMode.IsScreenOff = TRUE ---> Device locked, screen on
03-08 21:33:18.900 18275 30940 I NearbySharing: Screen is unlocked
03-08 21:33:21.745 30319 30319 I Notifier: DEBUG: IdleMode.IsScreenOff = FALSE ---> Device unlocked
03-08 21:33:26.766 30319 30319 I Notifier: DEBUG: IdleMode.IsScreenOff = FALSE ---> Device unlocked
03-08 21:33:28.704 31115 31115 I Notifier: DEBUG: IdleMode.IsScreenOff = FALSE ---> Device unlocked
At this point, I wonder about Anke's extension purpose: does it detect if the screen is on/off, or does it detect if the device is locked/unlocked?
I believe what I really need is something to just detect is the screen is on or off...
Thanks again and I apologize for my miscommunication.
I feel like I am a step away from solving such issue and get my app finally working, but the things are getting more and more complicated...
Do you deem feasible to somehow exploit ActivityStarter component to do that?
By the way, just right now I was unsuccessfully trying something like that (I get permission denied and the activity is not found):
I need that my APP work uninterruptedly and them I download the ITOO extension. I read the information and I made a very simple example , see the picture, but it doesn't work, somebody could help me?
thanks
I really don't know why I must put an argument x and if it is really needed what I define as argument X ("...also you forgot the argument x for the procedure..."), for instance : I have to put "response content" due I´m asking a url conexion??
About my start mode, I need an exactly alarm schedule, as you see I already asking for this permission
I did not tell you to add an argument responseContent, I said
Your getphp procedure is the event handler for the Timer event. Both the event and event handler do not have any argument, fetchMessage is the event handler for the GotText event. Both have 4 arguments.
What about
As you are trying to call the alarmmanager extension from the background, you first have to set the start mode in your main background procedure console
Also it would make sense to register the Alarmmanager1.Started event to find out, if the alarm time could have been set correctly or if an error ocurred.
i have tested the whole web1 code seperately and ik that it can store the value, there r no battery ristrictions currently active on my Nothing Phone 1(that i know of).
Please post an higher resolution of your screenshots the next time. It's hard to read and makes it difficult for us to help you.
I see a few mistakes in your blocks.
Do not use TinyDB in background due to sync issues, instead use Itoo's own StoreProperty and Fetch property blocks. (Read Principles of Design and Usage) in the first post.
Secondly, global variables do not work in the background. They are not defined when you access them from background. So the URL variable must not be accessed from the background.
You are still using TinyDB in the background
Also why do you use TinyDB and Store/FetchProperty methods for the same tags? Just use only Store/FetchPropetty methods to simplify your blocks