FORUMS
Remove All Ads from XDA

play current track when launching audio player

313 posts
Thanks Meter: 8
 
By Eggstones, Senior Member on 13th September 2019, 03:28 PM
Post Reply Email Thread
I've managed to make a profile that switches MortPlayer on when I connect my Bluetooth headphones but I can't get it to start playing the current track. Tried to do it using send intent copied from a Spotify profile I found but I only get an error message.

The action I use is this: MortPlayer.ui.widget.PLAY but it doesn't work. Can't remember the full Spotify line I based that on.

Edit realised that using media-media control-play (simultaneously)-app did the trick!
14th September 2019, 08:29 PM |#2  
OP Senior Member
Thanks Meter: 8
 
More
The profile works but only if I have unlocked the phone. It launches but Doesn't play.
15th September 2019, 02:29 AM |#3  
ktmom's Avatar
Senior Member
Thanks Meter: 2,214
 
More
This is a wild stab at the problem... Try adding a pop-up action (alert -> pop-up) with just a brief timeout to wake the screen before the play action.

It might also be due to the restrictions Android had built in as to what app may do with the screen locked.



"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
The Following User Says Thank You to ktmom For This Useful Post: [ View ] Gift ktmom Ad-Free
15th September 2019, 10:27 PM |#4  
OP Senior Member
Thanks Meter: 8
 
More
Thanks I'll try that.
17th September 2019, 01:34 PM |#5  
OP Senior Member
Thanks Meter: 8
 
More
Quote:
Originally Posted by ktmom

This is a wild stab at the problem... Try adding a pop-up action (alert -> pop-up) with just a brief timeout to wake the screen before the play action.

It might also be due to the restrictions Android had built in as to what app may do with the screen locked.



"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini

Tried this with a 5 second delay but no luck. The profile activates fine but can't execute the final step. Don't see the alert pop up either in the screen.
17th September 2019, 01:46 PM |#6  
ktmom's Avatar
Senior Member
Thanks Meter: 2,214
 
More
It might be easier to help if we could see the problem task description.
17th September 2019, 04:18 PM |#7  
OP Senior Member
Thanks Meter: 8
 
More
Launch (16)
A1: Launch App [ App:MortPlayer Audio Books Data: Exclude From Recent Apps: off Always Start New Copy: off ]
A2: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A3: Popup [ Title: Text:Play Background Image: Layout:Popup Timeout (Seconds):5 Show Over Keyguard: on ]
A4: Media Control [ Cmd:Play [Simulated Only] Simulate Media Button: on App:MortPlayer Audio Books Use Notification If Available: off ]
17th September 2019, 04:20 PM |#8  
OP Senior Member
Thanks Meter: 8
 
More
The sequence works fine when the screen is on and unlocked It also works fine without the alert with the screen on and unkocked
17th September 2019, 05:55 PM |#9  
ktmom's Avatar
Senior Member
Thanks Meter: 2,214
 
More
Ok, I don't know (remember) your device and OS version. But, maybe the AutoInput unlock screen action will help where just waking the screen with the pop-up action didn't. In android 7+, the screen can be unlocked only if there is a non-secure lock screen or the smart unlock is active.
17th September 2019, 11:39 PM |#10  
OP Senior Member
Thanks Meter: 8
 
More
It's a OnePlus 3t OS 9.0.5 not rooted.
18th September 2019, 01:05 AM |#11  
ktmom's Avatar
Senior Member
Thanks Meter: 2,214
 
More
If the previous idea doesn't help you, then you may have to search out a OnePlus solution. Oxygen OS does it's own thing and I'm not particularly familiar with it's peculiarities.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes