2013-08-22 2 views
2

카테고리 및 데이터 URI를 명령 줄에서 활동을우리는 우리가 follwing을 명령 행 문자열을 사용하여 활동을 호출 할 수 있다는 사실을 알고

adb shell am 
usage: am [start|instrument] 
     am start [-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>] 
       [-c <CATEGORY> [-c <CATEGORY>] ...] 
       [-e <EXTRA_KEY> <EXTRA_VALUE> [-e <EXTRA_KEY> <EXTRA_VALUE> ...] 
       [-n <COMPONENT>] [-D] [<URI>] 

내가 알고 싶은 것은 내가 데이터 URI에 대한 필드를 설정하는 방법입니다 호출 및 카테고리,이 같은 의도 필터 활동 클래스,

<intent-filter android:label="@string/resolve_edit"> 
    <action android:name="android.intent.action.VIEW" /> 
    <action android:name="android.intent.action.EDIT" /> 
    <action android:name="com.android.notepad.action.EDIT_NOTE" /> 
    <category android:name="android.intent.category.DEFAULT" /> 
    <data android:mimeType="vnd.android.cursor.item/vnd.google.note" /> 
</intent-filter> 

가 어떻게 매개 변수로 데이터 URI 및 카테고리 이름과 마임으로 활동을 호출 할 경우, 예를 들어 ? 그냥 샘플 명령 줄 문자열을 주면 활동이 있다고 가정 해 보겠습니다. com.test.test1/.Main

감사합니다.

답변

0

이미 시도한 명령은 무엇입니까?

이 해결겠습니까 :

ADB 쉘 오전 시작 -a android.intent.action.VIEW -c android.intent.category.DEFAULT -t vnd.android.cursor.item/vnd.google .note -n com.test.test1/.Main -d "file : ///storage/removable/sdcard1/testFile.txt"

관련 문제