[FREE] Background Tasks: Itoo

I changed the sensor name to orientation.


I changed it up how you said and I don't know what I did wrong. Do you see anything I am missing?

I would not rename the components/events...
Taifun

gotcha

Done, here is what it looks like now.

For me the blocks look fine

If you do not get anything, try to send a notification in method changeBrightness, see several examples how to do it in this thread

Also check logcat

Taifun

Just one more thing, add this block at the start of the programStart procedure, since it is not possible to directly register an event without touching the component.

1 Like

In my, Create with trigger is missing @Kumaraswamy

Yes, you are right, I had to remove the CreateTrigger block, you should find other ways to replace that block.

@Jo_g12 Let us know if that has worked for you.

That was the fix thanks a bunch

1 Like

Does the extension compatible with Location Service by Taifun?

I have such test app:

Buttons works fine. But, after move app to the background there are error message appeared ("Error in the app, Close the app").
This does not depends where I'm starting the background process - on Screen initialize or by another event. Also does not depends - am I using Notifier or Notification extension. Process does not start or Error in the application.

In the Kodular both extensions works (looks like). But in my Kodular's app Taifun's extension doesn't write a data in the TinyDB, so I'm not sure if it works as needed.

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
Unbenannt2
see also the example projects

Taifun

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.

1 Like

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...

Then continue with more advanced experiments

Taifun

UPD: Error appears even if Itoo extension the only one extension in the app.

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:
blocks(2)

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

1 Like

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.

What about providing a screenshot of your blocks?

Taifun