please use my locationservice extension as described in the documentation App Inventor Extensions: Location Service | Pura Vida Apps
there is no need to additionally store data manually in TinyDB, because the extension will do this automatically
to see the data, use the namespace TaifunLocationService
I did that. I have 5 screens, put the Location extension on 1st screen and 5th, put TinyDB component on each screen, set Namespace for each as "TaifunLocationService", set tag on 5th screen and try to get this tag with Itoo extension (and Tags later). The tag just absent.
before doing experiments together with the Itoo extension you first should make sure, that there is data in TinyDB available
use my extension as it is meant to be used and display the stored data in a label or a map (see the example projects)
if you got that running, create a simple example using only the Itoo extension to read something from TinyDB and display it in a notifier EDIT: you will have to use the NotificationStyle extension to do that, a simple Notifier will not work... you can find some examples here in this thread...
This error appears when CreateProcess block is used. (As well when CreateTask). The new project, no any extensions. Other components - label, two buttons, notifier
Yes. Tag exists as well data. Seems, Itoo extension does not read data properly from TinyDB.
Did that:
If starting this with any event from app - answer yes. If starting from Itoo - answer "no". Have no any idea how it possible. If I will get list of tags, Itoo procedure will show them. Will go kill myself....
Hi, Itoo uses a different mechanism to store and retrieve data, and you cannot access or set to a tiny db using Itoo. They are two different storage types.
The normal tiny db data cannot be always synced with the services.
So if you want to save data specifically and operate on them on the background, you have to use the Fetch and Store blocks respectively.
Also from newer Android versions, you cannot directly use location services in the background, it requires special things to be implemented... Taifun Location extension is one of the option
As I understand, no any way to get location data from Taifun's extension by Itoo extension, right?
Do you have any idea, why my test application on the Appinventor platform crashes? I have removed blocks related with TinyDB - it crashes anyway.
As Kumaraswamy said, Itoo extension unable to read TinyDB, so I'm trying to do this in another way. If everything works out I will post it here as a solution.
In this manner I can get list of coordinates, which saved in this tag.
Actually, we can get any TinyDB tag with this solution, just need to define needed Namespace.
Thanks a lot to @Juan_Antonio, for unique extension.
Thanks a lot to @Kumaraswamy , for the background tasks!
UPD. 16.06.23. This solution does not work with Location Service Extension by Taifun to get current coordinates. But, it will work with TinyDB, you can get data which written before app going to background. Here the working solution how to get coordinates with Location Service by Taifun.
@Kumaraswamy Can I create a process, using a Clock1.Timer trigger, to perform an API call and, based on the returned json, decide whether or not to display a notification?
Yes, this sounds doable
Read the entire thread, try the examples, play around with the extension.. then put together some blocks for your task... and if you got stuck, post a screenshot of your relevant blocks
Please, explain, how to kill the background process. I used the StopProcess method to stop. Notification of the process disappeared, but another notification, generated by Notification style extension continue to appear 1 per second (by Clock event). It continues some minutes after process stop. As I understand, it's a task, which can be killed by StopTask method. But how to define it's id?
I've solved this issue with another extension by @Juan_Antonio, KIO4_terminal.aix. It reads properly. I will edit my previous post about reading TinyDB.