I want to Create an App so that When ever User unlock His Phone a music plays (Like welcome etc) but i cant figure it out How it will Work.
It will be glad if someone help me with it.
Kindly share an extension (if required)
Or Is it Possible In Kodular?
Yes sure you can you particles extension and inbiuilt exo player component + phase extension to greet users with animation
You will need a background extension to keep it running all time if the app is closed.
Maybe it is possible to listen to the event when the user unlocks the phone.
Can You Show me Some Blocks How it will Be used for Playing Music on unlocking Phone.
I am New Here So please HELP
xyz.kumaraswamy.lockinfo.aix (5.1 KB)
You can use my extension to listen to events when the phone is locked and unlocked.
Else you can also use the below extension to dynamically register any custom intent action.
xyz.kumaraswamy.activitylistener.aix (5.3 KB)
Both of them should be tested in a compiled app.
I tired it and I am getting a runtime error Receiver not registered: xyz.kumaraswamy.activitylisner.ActivityReceiver@9805899
That should not happen unless you are testing in a companion.
Where exactly it doesn’t work?
I just checked it.
The error only raises when you are calling the block two times as the receiver is already unregistered.
This should work fine:
O yeah It’s working Now
1 last Problem I am Facing Is that This only Works When App is running in Background (Recent apps) when i clear it from Their it Doesn’t work Any Solution.
Yeah this is possible, you just have to make them work with this extension:
A repeated mode will be needed to do it.
your background extension just flew above my head it’s to difficult to understand.
Can u just tell me which blocks should I use for my App
Which we discussed above just want to play music when user unlock his phone and I want that it should still work when user remove app from background(recent apps)
Sorry to hijack the topic, but I never saw those 2 extensions. Are they still in beta phase or are they available for anyone to use normally?
@Xoma please create a new thread for each of these extensions in category #extensions and add a short documentation and how to use them etc… so everyone will be able to find the extensions later again when they are needed
thank you
Taifun
Those were quick extensions created by me.
Okay, do I need to create a new topic?
I used your Method with some changes
1)Instead of button I used Switch which is working fine
2)Instead of Loop i only want music to play when user unlocks screen and Music should be played once Don’t want loop but it’s keep Looping can u find the mistake
See in the Designer settings (Player: loop
). Disable it.
I disable it but it’s still looping
What exactly is to be achieved:
- open app
- Music is playing / not playing?
- The app goes to the background and / or the screen is locked
- Music is playing / not playing?
- The app comes to the foreground and / or the screen is unlocked
…
What is the purpose of the switch?