且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Android 将项目添加到全局上下文菜单

更新时间:2023-12-06 08:56:52

目前 Android 不支持此功能,如果特定 Activity 未实现您公开的意图或活动,则无法在系统级别全局覆盖或挂钩功能.即使在发布意图的情况下,除非正在运行的应用程序是消费者,否则这无关紧要……并且所有基本系统应用程序以及显然在您之前的所有应用程序都不会不更新要使用的应用程序.

Currently Android does not support this, you cannot override or hook functionality globally at the system level without the particular activity implementing an intent or activity that you expose. Even in the case of publishing an intent it wouldn't matter unless the application running is a consumer... and all the base system applications and obviously all applications prior to yours would not be without updating the app to consume.

基本上,这是不可能的.

Basically as it stands, this is not possible.

您究竟想用这个全局上下文菜单完成什么,某种通过您的应用程序运行的全局搜索"或发送到"功能?

What exactly are you trying to accomplish with this global context menu, some sort of global "Search For" or "Send To" functionality that runs through your application?