That's not what I mean, I do not have all the time to go through your blocks. If you require help, you need to make it very easy for me to help you. Like reducing the number of blocks. Also make sure you have completely read the first post.
Itoo Sky 4.4.0
-
Ability — Call background procedures from UI
Once a background service is started, you can call a procedure to run in background.
-
Ability — Call UI procedures from background.
Now you can call to update user interface while in background, if your app is open
Wait, what are the requirements?Carefully notice the above blocks.
We are registering theTimer
event ofClock1
and we keep track of the counts and increment it by 1 each time theClock1_Timer
is called.
Then we call the procedureui_update
from the background that will update the count in the label.
So whenever you need to call a procedure to user interface, the procedure name must start with prefixui_
. -
Ability — Automatic event resolution system
Beginning from this update, you do not necessarily need to register for events using the RegisterEvent block. From now, Itoo will try to search for a procedure using the naming conventionComponentName_EventName
and call the procedure if it exists.Demonstrating automatic event registration for Timer event of Clock1.
-
Behavior — Now when you click the notification, by default it opens the application. (
Screen1
)
V4.4.0 xyz.kumaraswamy.itoo.aix (91.1 KB)
Donate
Maintaining and updating extensions is a tedious task, I'm an high school student, if this extension has been helpful to you, then please consider donating to keep me motivated.
Paypal — paypal.me/XomaDev
Kumaraswamy B G
Thank you
Great update!
Concerning the example
Wouldn't it be possible to call Player1.Stop directly from the user interface to stop the music?
Taifun
Hi Taifun, we cannot directly call Player1.Stop from the user interface. We first have to route the call through a background (environment) procedure and then call Player1.Stop.
This is because there are two environments.
- Background environment (managed by Itoo) which provides background execution.
- Normal App Inventor environment.
Both of the environments run isolated from each other.
So, when we call Player1.Stop from the user interface, we here are accessing the Player component that is managed by the default environment.
But if we were to route this call through a background procedure, now we are accessing the Player component managed by Itoo.
So it looks like we only have one Player1 that exists. But this isnt true. There are two versions of Player1, one that exists in the normal environment and one that exists in the Itoo environment (background process).
Hi I'm trying to display a notification while the app is in the background and when I click the notification it will open the app. The counting (calling the notification) doesn't seem to work. Any ideas?
Preferably I would like the user to click action buttons but let's just take it the simple way.
testNotification(1).aia (126.3 KB)
Refer to Notification Style extension docs for that:
Generally fill all sockets
Taifun
Yes I found that. Fixed also the variable needed for the Itoo procedure (always forget that) but still it's not working.
I don't even see the "Starting" notification
It is your procedure Notification, which requires the x, not your ClockTimer procedure
EDIT: also remove the method from procedure Notification... it will not work like that, because post notification permission still has not been granted there
Taifun
ok I just saw you edit. I misplaced the X variable
i have the tested "shake and send sms "project in mit app .
i need it to convert it to background task with some fee.shall i send .aia and .apk files so that u can quote.
See again my answer from here
Taifun
Great update! thank you
Hi
I'm trying to add a button to the Notification example above and it doesn't work. I can't see the notification at all. If this works I will try to add the button capture in Itoo using the "NotificationButton" procedure.
HI, can you please post your AIA? I'll look at it later.
I am very sorry, I fell sick for last two days, I'll look at it when I'm better.
Take good care of yourself. Hopefully you feel better again soon.
Take your time, feel better