Activity & Lock listener

xyz.kumaraswamy.activitylistener.aix (5.3 KB)

A simple extension to listen to any activities like (battery, connectivity changed).
(Note: extra values which may contain info may not be passed)

InitialiseListsner: Initialises the listener with the given intent filters.
UnregisterListsner: Stops the listener, double calling the block may result in an error.
ActionRaised: When any activity/intent is received with the action name.


xyz.kumaraswamy.lockinfo.aix (5.1 KB)

Lock info extension to listen to the two events (phone locked and unlocked).

Screenshot 2021-07-30 at 13-01-27 Kodular Creator

Action: Raised when the phone is locked or unlocked with the boolean (true/false) value.


The Extension is a solution to a question here → Do a Specific Task After Screen Unlock

15 Likes

Really helpful extension @Xoma amazing :clap:

Awesome :clap: :clap:

Another simple and valuable extension from @Xoma

full list please add)

1 Like

You can find them from Android Docs!
I don’t know why you linked to the app inventor topic because it’s not related :thinking:


Nope, that’s not possible with the extension.

is there any extension is made by someone ??? i google it but didn’t any thing

This should do the same:

1 Like

How can an extension be so simple and still so much useful?
Thanks once again Xoma for your great contribution.

You are certainly in the way to the top of best contributors of app inventor and Kodular community.

1 Like

@Xoma Thanks i was just searching for this :heart:

Does this extension allow me to hear music control activities such as play and pause from the headphones?

I try to listen Calendar events, so i write this code:


but nothing happen…
(of course i have calensar permissions)

is someone could help ?

BroadcastReceiver.aia (48.7 KB)

You can’t copy a file to the root directory of the emulated sdcard…
Use shared storage… for example /Download or /Documents

Taifun

hello. taifun,
you talk about the use of your extension where i copy the file on ile://storage…
of course it works ! I use it on other programs without any problem…
i just added this here because i didn’t saw texdialog and then i can have the history of what i received…

My problem today is not here, the problem is that i can’t receive event reminder !

I probably should have said

on newer devices wirhou declaring manage external storage permission, see alos How to request and grant MANAGE_EXTERNAL_STORAGE permission

Which Android version are you using for your tests?
Build rhe app and try the apk file!.
Taifun

yes you’re rigth i added it, i just post my aia before this …sorry.

EMUI 12.0.0

yes i built it I’m not used to using companion.