アプリ内からAndroidシェルへの呼び出しを追加する作業をしています。私はシェルスクリプトまたは基本的なシェルコマンドを非常にうまく呼び出すことができましたが、今私は電子メールを送信しようとしています(主に私ができるかどうかを知るために)そして奇妙なエラーに遭遇しています:
11-06 16:14:43.449: D/AndroidRuntime(28655): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
11-06 16:14:43.449: D/AndroidRuntime(28655): CheckJNI is OFF
11-06 16:14:43.629: D/AndroidRuntime(28655): Calling main entry com.android.commands.am.Am
11-06 16:14:43.639: D/AndroidRuntime(28655): Shutting down VM
11-06 16:14:43.639: I/ActivityManager(204): START {act=android.intent.action.SENDTO typ="text/plain" flg=0x10000000 pkg=Goes (has extras)} from pid 28655
11-06 16:14:43.649: D/dalvikvm(28655): GC_CONCURRENT freed 104K, 81% free 495K/2560K, paused 0ms+1ms
11-06 16:14:43.649: D/dalvikvm(28655): Debugger has detached; object registry had 1 entries
11-06 16:14:43.649: I/AndroidRuntime(28655): NOTE: attach of thread 'Binder Thread #2' failed
私のシェルによって実行されるコードはこれです:
am start -a android.intent.action.SENDTO -t "text/plain" --es android.intent.extra.EMAIL "myaddress@example.com" --es android.intent.extra.TEXT "Message Goes here" --es android.intent.extra.SUBJECT "this is the subject"
何が問題になっていますか、どうすれば修正できますか?使用する必要のある別のツール(以外am
)はありますか?