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?
Let me Explain from Start
- If User Turn on Switch then A 2 Second music will be Played When he will unlock His Phone
- If User Turn Off Switch then No Music will be Played When he Unlock his Phone
I want to Create App Something like this
https://play.google.com/store/apps/details?id=salah.rasoulallah.com
User Will Only Open App When He Wants Music to Play When He Unlocks Phone
Or Want to Disable it Remaining Work will be Done in Background.
If you Download The Link I Gave you link you will Understand what i want
Sorry, but I really don’t have the time to install an unfamiliar app and learn Arabic (?) In order to understand what you want (your steps).
Is it really that difficult to explain this clearly:
- Step 1: Do this …
- Step 2: Do that …
- …
Step 1: User Download App and Open it
Step 2 : User Enable Switch from app
Step 3 : User lock his Phone & when he unlock his phone A music is played once Step 4 : Music should be played every time he unlock his phone
Step 5 : When user Turn off Switch no music will be played when he will unlock his phone
Hope you understand what I want to say