开发者

Adding alternative menu item to Browser

开发者 https://www.devze.com 2023-03-14 17:07 出处:网络
I want to add a custom menu item to Browser. I want to launch my activity on click of the custom menu item.

I want to add a custom menu item to Browser. I want to launch my activity on click of the custom menu item. Is it possible to do so.

i could add my custom开发者_高级运维 menu item to contacts and gallery (under share). I want to achieve the same for Browser. I am unable to match the correct action and mime type. Please help me.


I want to add a custom menu item to Browser. I want to launch my activity on click of the custom menu item. Is it possible to do so.

No, sorry.

i could add my custom menu item to contacts and gallery (under share). I want to achieve the same for Browser.

If you want to be part of the Share menu item in the browser, implement an activity for ACTION_SEND and a MIME type of text/plain:

<activity android:name="URLTagger" android:label="@string/app_name">
        <intent-filter android:label="@string/app_name">
            <action android:name="android.intent.action.SEND" />
            <data android:mimeType="text/plain" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
</activity>
0

精彩评论

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