Hello all, I have two requests about this extension:
@Kumaraswamy: Is it possible to improve the extension and get rid of the usage limitation of the global variables? I would like to use the extension in my project including several global variables that is difficult to refactor, because I need to bring around some of them in different spots of my app to trace the status of the app and to drive its execution logic, so these variables are supposed to be visible everywhere.
Is it possible to modify the message displayed in the permanent notification? I would like to exploit the notification to show a message that changes according to the status of my app.
Hello Taifun,
Thank you for your quick reply, your suggestion sounds very interesting and, I guess, the only feasible solution.
Here below the blocks of my app:
I believe it is worthwhile to explain a bit more of the history of my app.
The app was originally written to work in background mode by App Inventor Services. It worked like a charm, then App Inventor Services has been eventually shut down (App Inventor Services: this "services" service is obsolete - #5 by Salvatore_Oliva). However, I still have both aia project and apk files of my original app. Now I am in need to put my hands on the app to make it work on Android 15 (apk file is prevented from installing), but unfortunately I am no longer able to look at the blocks of my original app. I somehow succeeded in recreating and making the app run in foreground, now I would like to convert it to run in background by Itoo extension.
As you can figure, the modification involving global variables refactoring turns out to be quite heavy, since there are a lot of information getting around by them. On the other hand, as long as I acknowledge Itoo extension a very powerful and valuable project, caveat on global variables usage comes as a severe limitation.
I wonder if Kumaraswamy plans to modify and improve the extension in this sense. In the meanwhile, I will try to figure out how to modify my app as per your suggestion (it will be a lot of work!...).
Thank you again.
Hi, I tell you to not use Global variables since its introduces another dimension of complexity to the application, which is often confusing and hard to debug for the users (and not worth the time). That's why we use Itoo's persistent storage method of Store/Fetch property.
In future, definitely improvements will be made in that direction, that's some time to wait.
Yes, you can use melon notification to post a new notification to the Id (123321) from the background procedure.
Hi, @Taifun@Kumaraswamy. Is it possible to store sms in firebase using Itoo and TyfunTexting1 extensions? When i try to do that it doesn't work. Please, help!
I only changed the bottom block, all other blocks are unchanged. Through these blocks, the complete messages of the phone will be stored in Firebase every five seconds. I am beginner in programming. It would be better if it was possible to store only the last message.
Is it possible, with additional parameters, to specify which devices running the notification background service, receive the notification, or can it only be done for all ?
Hi, do you mean sending notifications to a specific device/user? If yes, you would need to generate unique UUIDs for each device. The service would then only listen to a particular firebase tag associated with its UUID.
Thinking this through, the way I see it, is that the notification (which would contain a list of UUIDs, as well as the message) would be sent to all users, then filtered by the background task in the app to generate the notification for only those users whose UUID matches the ones in the list ? This would happen before the melonNotication is called in the notification procedure ?
I was wondering if someone might be able to help me. I've been trying to get the ChatGPT ChatBot to send me messages periodically (every 2 minutes, etc.), but I've come up trumps. This is my code:
Converse is a method, not an event, therefore it makes no sense to register the Converse event
If you want to call the Converse method every 2 minutes, you need a clock component and register the Clock1.Timer event, set timer interval to 120000 and call the Converse method inside the timer event handler
Do you want to ask always the same question? Or where are the questions coming from?
Also register a Chatbot1.GotResponse event
And remember, global variables do not exist in the background
Hi, it works to use createprocess and a timer and web component (every 10 seconds). With the store and fetch function, a word from the new response can be compared with the previous response. After restarting the tablet, the last response is still in memory, so it is stored in ROM. That's not necessary. Is there a better way than itoo.storeproperty and fetchproperty to temporarily remember the response from web.get? Possibly with local variables, but how do I go about that? Thanks, David.
Hi, while in Itoo, you may not use global variables (but you can use local variables tied to a procedure's scope). If you need an alternative to Store/Fetch property but while storing on RAM, then you may use this extension:
A reminder again: Memory space of background process is always parallel to that of main application. (They are not the same)