1

adb を使用して SMS を送信しています。次のコマンド ./adb shell am start -a android.intent.action.SENDTO -d sms:12345 --es sms_body "the body" --ez exit_on_sent true は、bash で入力および実行されますが、それは機能しますが、私の python スクリプトは呼び出し./adbのみのようです。

    ADB = './adb'
    def callSMScmd(msg, num):
        adbArgs = ('shell am start -a '
                +'android.intent.action.SENDTO -d sms:'+str(num)+' --es'
                +'sms_body "'+msg+'" --ez exit_on_sent true')
        call([ADB, adbArgs])

Starting: Intent { act=android.intent.action.SENDTO dat=sms:12345 (has extras) }残念ながら、このスクリプトは adb のバージョンと使用可能なすべてのオプションをリストします。警告もエラーもありません。助けてくれてありがとう

4

1 に答える 1