长按图像后在浏览器的上下文菜单上添加操作? [英] Add action on the Browser's context menu after an image long press?
问题描述
希望您可以为我提供以下帮助:
Hope you can help me with the following:
我需要在上下文菜单中添加一个动作,该动作在按住
长按后会弹出浏览器中的图片(具有保存图片,复制图片,查看图片,设置为墙纸等的图片)
I need to add an action in the Context Menu that pops up after a Long Press of an image in the Browser (the one that has 'Save Image', 'Copy Image', 'View Image', 'Set as a wallpaper', etc. )
选择操作的结果,它应该调用我的服务和
等...。
我不希望我的应用覆盖浏览器
的所有上下文菜单,而只添加一个操作对它。
我没有找到任何有关此操作的信息。可能吗?
谢谢!
As a result of choosing my action it should call my service and etc.... I don't want my app to overwrite all the context menu of the browser but only add an action to it. I haven't found any information on how to do this. Is it possible? Thanks!
推荐答案
总之,您不能这样做。浏览器只是像您一样的应用程序。如果您正在开发浏览器,如何从浏览器应用程序中公开此类功能?
In short, you can't do this. The browser is just an application like yours. If you were developing the browser, how you would expose such functionality from within your browser application?
Android大师:我在这里遗漏了什么吗?
Android gurus: Am I missing anything here?
作为旁注,您可以从中最接近地定义Intent.ACTION_VIEW和资源,并希望浏览器使用 IntentChooser
,在这种情况下,您的应用(以及其他应用)将会显示。
As a side note, the closest you can come from doing that is define Intent.ACTION_VIEW and on resources and hope that the browser uses an IntentChooser
, in which case, your app (along with others) would show up.
常规操作由Android Intent系统(http://developer.android.com/reference/android/content/Intent.html)定义。
General actions are defined by the Android Intent system (http://developer.android.com/reference/android/content/Intent.html).
这篇关于长按图像后在浏览器的上下文菜单上添加操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!