shake and sms location and give a call.i have a working .aia for this.I want it to run in background.Can u please do it for me?
i am ready to pay.
here is nirbhaya.aia
I've been struggling with this extension since morning. I realized one thing, the extension is not stable for some reason. Sometimes it works great, sometimes it stops working altogether. I don't understand anything anymore
You also can log something from the background there, just use the Notifier.LogInfo method for this
To find possible errors of your blocks in the background, let me suggest to filter the logcat output for the tags Notifier , ItooCreator and System.err .
In your latest screenshot you are still using the 3 alarmmanager methods... I already explained twice, that these are obsolete...
also are you sure, that the gottext event handler gets triggered in the background? This was my recommendation earlier
I also use Itoo.StoreProperty to store the value from the global variable. But when I use Clock.FormatTime on the value returned from Itoo.FetchProperty, I get a FormatTime argument error.
So although it "looks" like an instant, it is only the "image" of an instant ... as it is said: "looks can be deceiving"
Thanks for jumping in with the explanation and solution! I'll use millis and convert to instant when needed (e.g., FormatTime)
BTW, I ran into this when converting an exiting app to use the itoo services and therefore moving all globals to itoo store/fetch memory... So far, this is the only incompatibility that I have found. Are you aware of other object/types which can be retained in globals but which cannot be stored/fetched from TinyDB or itoo memory?
what does this error mean? for some reason only 4 out of 5 signals are triggered 1,2,4,5 3 signal never triggers. the blocks are identical. and maybe this information is useful to someone, when clearing the cache of the application or phone, background processes are disabled, you need to start the application again.
Excuse me for asking too much, but without your help I cannot solve my problems. I am grateful to everyone who helped me. (I read the documentation
, can I turn on switcht On - True in the background? or click on the button?
since we can set the clock timer (green block), but for some reason this method with switch does not work for me
I am looking forward to implementing these great new 4.4.0 features/behaviors! Before I do, I have a few questions as to their use/abuse .
I am converting an existing app to use an itoo background process/service and have decisions to make as to how to modify and/or break it up into code that runs in the foreground vs background. The following questions may seem strange, but I think they will help me minimize the changes. I apologize if the are too obtuse
May itoo.CallBackgroundProcedure be done FROM the background itself and execute normally?
Similarly, can a ui_<procedure_name> be called from the UI itself and execute normally?
Or in both cases (1 & 2) one must use "InBackground" to determine the calling context and avoid this?
[the following concern nesting of these new call mechanisms]
If the UI calls procedure X using CallBackgroundProcedure what is returned if X calls InBackground? Further (if permitted), if X then calls procedure ui_Y, if ui_Y calls InBackground, what does it return T or F?
Similarly if ui_Z is called from the background, and if ui_Z calls InBackground what is returned? Then (if permitted), if ui_Z calls procedure A using CallBackgroundProcedure, what would InBackground return if called from A?
Again I apologize if these questions do not make sense.
The CallBackgroundProcedure is only meant to be called from the user interface (non background), it wont have any effect if you do so from background.
Yes! The naming convention ui_ just tells Itoo that the procedure must be executed on the user interface. (Note: if the application isnt active, the procedure wont get executed). You can also normally use the ui_ procedure.
It will be true since now you are in the background.
Now it will return false, since the flow is not in the background anymore.
It is the same as when X called ui_Y, it will be false.
Now again the application flow is in background, so it will be true!
Hmm maybe there are such features offered by Android, but with the current version you cannot do it directly.
You can create your own methods, for e.g. you can implement any of these:
Heartbeat timer: Update a value every X second in UI and check the last updated time in the background.
Echo method: Send a message from Background -> UI, and make the UI send back a response to the message. If the background receives response in given time, then it concludes the UI is active / inactive.
You may expect this feature officially added in the upcoming updates.
Thanks for the information... and two great ideas if it is necessary. But as I understand it, making the mistake of calling ui_xxxxxx from itoo background would not do anything (and therefore, not anything bad )
I also intend to use the implicit event registration you have provided in this update - another nice touch!
BTW, may I ask what "itoo" means or represents (a word? an achronym?)
[Edit about 4am GMT Wed]
Came across another question:
How can UI get a function return from a background component. For example, if Player1 is running in a bg itoo service, how can the UI determine the value of Player1.Is_Playing or Player1.Source?
Any method other than the above "echo method" in reverse?: UI procedure X calls bg procedure Y that makes the inquiry (Player1.IsPlaying) and sets an itoo variable which is monitored (loop or alarm) by the UI X for an updated value....?