开发者

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

开发者 https://www.devze.com 2023-03-27 22:29 出处:网络
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 SD

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

精彩评论

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

关注公众号