Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android add item to global context menu

When you long press on something in Android, a context menu comes up. I want to add something to this context menu for all TextViews in the system.

For example, the system does this with Copy and Paste. I would want to add my own, and have it appear in every application.

like image 400
Isaac Waller Avatar asked Feb 18 '09 00:02

Isaac Waller


1 Answers

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?

like image 182
Quintin Robinson Avatar answered Sep 30 '22 04:09

Quintin Robinson