Check this section:
That's how I have it configured but when I close the phone the process and automatically pick it up again in the background puts the microphone in the notification
Do you have a demo project file to reproduce the issue? Can you PM me it? (Of App Inventor)
I'm sorry I only have the project in Spanish and there are more than 2000 blocks haha but what I'm trying to say is if that icon can be configured by default as a bell instead of a microphone
Oh you mean the extension should by default select the bell icon? Haha sure, I actually didn't want the microphone icon, but forgot to change it.
Correct if it could be the one I gave you (ic_popup_reminder)
some clients say I hear them haha
Thanks again for reimplementing the icon property!
But ... in looking through the Android docs, I did not find a satisfactory icon Maybe I did not look in the right place ... Are there others - icon constants, predefined that itoo will recognize? Such as "stat_notify_wifi_in_range.png".
Actually, I would like to use my own file (.png), but I understand that would require modification of itoo, unless, perhaps, there is a component that takes the icon .png file as input and will add it to the list of "constants" that are available and return its string or integer value which could then be used by itoo.
Any suggestions on the use of icons will be appreciated. Clearly this is not a big or important concern for my "toy" app, but I would like to understand more about them.
Kind regards,
Randal
The main concern here is that we would be trying to set the icon dynamically in runtime but Android does not appreciate it that much.
As compared to Android Studio, when you add an icon file, it also automatically gets adapted into different resolutions required by different devices, which I dont exactly understand how it works to implement it in Itoo.
It is not necessary. I just want to be sure I am taking advantage of all that is readily available... I will likely just go with something such as ic_menu_compass.
One more question on these drawable icons. Why are not all these available to itoo?
https://android.googlesource.com/platform/frameworks/base.git/+/3dec7d563a2f3e1eb967ce2054a00b6620e3558c/core/res/res/drawable
Some of these do not seem to work when I try them - such as "stat_notify_wifi_in_range".
Thanks for your helpful comments.
-Randal
Itoo can only support these icons, drawables names starting from ic_
(icon) are the ones mainly used. I'll take a look, what I can extend the support to in future.
Ok. Thanks! That explains it.
My guess is that other enhancements would be more important and useful to your itoo users than a richer icon set ... But it might be nice, if it turns out not to be too much effort. You might mention the "ic_" only icon set (found in Android docs) in the next documentation update.
Kind regards,
Randal
How can I assure that a sequence of blocks in a procedure will be executed atomically/exclusively if the procedure is called by both foreground user interface code and a foreground service (as defined in the documentation)?
An example requiring this functionality might be incrementing a counter that is stored using itoo.StoreProperty. The count must be Fetch'd, incremented, and then Store'd from procedure, IncrementCounter, which contains the necessary blocks.
Without some sort of semaphore/lock/test-and-set mechanism, if both service and UI calls overlap, a count can be missed, their being generated a duplicate increment of some value.
I sense that the itoo Broadcast mechanism may be the solution (perhaps BroadcastEvent is the exclusive, serializing code), but my experimenting with it has proved fruitless. (BTW, in any case, I would like an example that illustrates the use of BroadcastEvent, RegisterBroadcast, and Broadcast. Perhaps one has been posted somewhere in this thread.)
Any comments or other help would be greatly appreciated.
Kind regards,
Randal
To avoid that problem, what about calling that procedure only from the foreground service?
You might want to provide a screenshot of what you are doing...
Taifun
I think I can explain without code,,, I am still working on the data transport monitor. The user interface is used, when needed, to set parameter(s) such as how often to check for changes (wifi vs cell). However, internally the service may determine that the parameter(s) need to be changed such as in the following scenario:
-
The user has set the monitor period to "snooze" (with monitor interval on the order of a few hours) b/c user 1) doesn't expect there to be wifi around and 2) he doesn't want to be bothered with constant notifications that cell data is all he has.
-
However, if wifi should become available (i.e., the app service detects a data transport change back to wifi), then the user would want the monitor app to begin checking "frequently" (every minute or so), because if the user happens to begin using data (from wifi), then he would want to know quickly if the wifi he is using is no longer available.
-
This requires the service to change parameters from "snooze" to "frequently". and if the user interface is also "up" and the user is making changes, say, from "snooze" to "hibernate" (a very long period), then there could be a collision.
The above is very unlikely and would not be fatal - if the service was first and the UI was last, the monitor would sleep when it should be "on the job". (sanity would be restored once the "hibernate" time ran out). But there may be other parameter changes which could result in some unanticipated state... so I just wanted to see what was possible as far as exclusivity/locks.
[after thought ... perhaps I could have the service post a notification that the user should make the change ... but the user may miss the notification and it could be a Looooong time till the next one ... hmmm.]
-Randal
Ahh, hmm, I'm sorry, I dont understand you very well.
Could you please simplify the explanation of this problem with a simple demonstration if possible? That would be great for understanding what limits you.
Could you help me in some way how to change the icon by default, since one assigns a bell to it but if for some reason the service is closed and it opens automatically it puts the microphone back, as if from the root it has the microphone by default
I will put something together and try to get it to "mis-behave" If I am successful, I will post it.
-Randal
Hi, I will do that by this evening.
Hi
I have tried to use itoo to autorun an app when restart phone.
At first on installing apk and running app, it plays the voice and runs the assigned app to run: facebook
On restart of phone, it just plays the voice and does not run the app: facebook.
Is it possible to use itoo to autorun apps?
Here is my blocks: