开发者

Adding alternative menu item to Browser

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜