It is just a Screen1 event issue, since there's no actual Screen in background, the extension thus fails.
Thanks,
Randal
Hey,
Question about the SaveProcessForBoot method
When called it would set the desired procedure to run each time the phone restarts or starts up, but after calling, would there be a way to negate the call? Stopping it from running at start up? And also would it continue running at start up until cache or data of the app is cleared by the user?
Currently not
It always will continue running at start up no matter of any clearings of cache or data
Taifun
Alright that's good to know, thanks a lot for informing me!
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.
Thanks in advance.
I would like to use the extension in my project including several global variables
Where exactly is the problem to use the StoreProperty/FetchProperty feature?
Example use Battery checker reminding you to unplug when fully charged
Taifun
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.
Use local variables where possible and use the StoreProperty/FetchProperty feature where not possible
And remember, in rhe background do not exist user interface components like labels and notifiers, use a notification instead
Melon Notification A rich library of various notification styles along with the combined power of Itoo Documentation Image resource Any image resource provided to this extension may be a full file path an asset name an URL starting with prefix url: an icon from the default Android Drawable collections it must start with the : prefix, for e.g. :ic_media_play only resources starting with ic_ are supported. If you intend to your custom icon, then please ensure the image is atleasβ¦
Taifun
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.
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.
Yes, you can use melon notification to post a new notification to the Id (123321
) from the background procedure.
Alright, that's good to know, thanks everybody a lot for the help!
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!
ItooFirebaseDBSms.aia (91.0 KB)
The eventhandler for the AfterReading event must have the same arguments as the event
And register the event in bgFirebase procedure
However the question is, why storing the complete inbox every 5 seconds?
Taifun
Hello @Free_Speech, it's nice that you got it working. Could you please also share your final blocks so others can benefit from it?
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.
With reference to this method:
[image] I am pleased to provide below a few examples of how you can use the excellent and remarkable itoo extension by @Kumaraswamy to generate push notifications for your apps, using dataChanged or timer events. These examples have all been tested on Android 15 (Google Pixel 8a) as compiled apps. Each example sticks very much to the basics, sending simple text notifications, and without any graphical enhancements, I will leave that up to your creativity. The examples are intended to show yoβ¦
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 ?
Thank you @Kumaraswamy
Got it working for the google sheets example:
I worked up a method here for the google sheets example, to send notifications to individual devices, based upon the uuid of the user. It is a basic example, but the same approach could possibly be applied to other methods in this topic.