开发者

How do I specify a different Intent when debugging an Android app in Eclipse?

When I click debug, the application is started with Intent action=MAIN;

I'd like to start it with VIEW, and specify 开发者_如何学运维a URI.


Found it by browsing the Eclipse ADT source in the Adroid SDK.

start a shell on the target device:

$ adb shell

Then use the Android application manager:

am -a android.intent.action.VIEW -c android.intent.category.DEFAULT -t "audio/x-mpegurl" -d "file:///mnt/sdcard/Audio/vocal.m3u"

This brings up the "complete action with" dialog.

Type 'am' to see all the options for specifying intents

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜