Open leechaowen opened 2 years ago
you can using python code like this:
import android
droid=android.Android()
droid.mediaPlay('/sdcard/Download/1.mp3', 'beep', True)
(make sure the file 1.mp3 is in the sdcard... ^_^)
using android module,Functions like mediaPlay, mediaPlayPause, mediaPlayClose, mediaPlaySeek,mediaPlayStart and mediaPlaySetLooping are used to control the media player.
how to play sound in adilearning by command ? i had installed the packages termux-api in python to call the termux.Media.play function , no help. and try to install mpv, no helpful too. but , it could helpful in termux . run command to play sound in termux by mpv or termux-api,it's helpful.
my phone is Readmi K40, android 11.
pip install termux-api apt-get install mpv