質問

I have my android app which gets all installed applications via - queryIntentActivities .

and I need to be able to add my own activity to this list, so I can start it, when this activity is picked, How can I do it?

Thank you on advance.

役に立ちましたか?

解決

Implement an <intent-filter> on your <activity> which matches the Intent that you are creating. Something akin to:

        <intent-filter>
            <action android:name="android.intent.action.SEND"/>
            <action android:name="android.intent.action.SEND_MULTIPLE"/>
            <data android:mimeType="???"/>
            <category android:name="android.intent.category.DEFAULT"/>
        </intent-filter>

(where ??? would be replaced by whatever APP_DEFALUT_MIME_TYPE is, I guess)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top