Is there a way to play an audio file (mp3) on an Android+ device (also setting the volume)?
I found the 'sendintent' script command for playing a video file, could this also be used for audio?
Is there a way to play an audio file (mp3) on an Android+ device (also setting the volume)?
I found the 'sendintent' script command for playing a video file, could this also be used for audio?
Received the following answer from SOTI support, which worked for me (solved):
sendintent -a "intent:file:///sdcard/download/findme.mp3#Intent;type=audio;component=com.android.music;end"
Hi
Please see below that should play the particular file from the SD card just change name of file where NameOfFile is
Intent:file://%sdcard%NameOfFile#Intent;type=audio/mpeg;action=android.intent.action.VIEW;end
Thanks
Hi Ross,
Thanks for the response. Just tried it, but it's not supported:
Script command is not supported by device (intent:file:///storage/emulated/0/download/file.mp3#intent)
Device type: Zebra TC8000
OS: Android 5.1.1
Slightly modified the script to:
sendintent -a ":file://%sdcard%download/file.mp3#Intent;type=audio/mpeg;action=android.intent.action.VIEW;end"
Now it's accepted, but doesn't play the file.
Log:
Send action request (Send Script [ sendintent -a ":file://sdcard/download/file.mp3#Intent;type=audio/mpeg;action=android.intent.action.VIEW;end" ])
The mp3-file on itself works fine when selected locally on the device.