0

This question was asked years ago here but there was no real solution back then. I want to have a button "Save" in that (Copy, Paste, SelectAll, Share) bar which appears, when you highlight a text in android.

When someone clicks on that button, it should simply just save the highlighted text to my DB. I But I dont want to have it on one specific app, it should appear everywhere, where the normal bar appears too. Does anyone have an idea how to do that?

  • 1
    Yeah, that question was posted a bit before that functionality became available, methinks. Have a look at these: https://stackoverflow.com/q/51632908, https://stackoverflow.com/q/30518089. – Mike M. Oct 24 '22 at 18:22

1 Answers1

0

You can't use the custom app in all the apps on the uses' devices. Because it is register as an activity in your app, and the lifecyle of it also attach to your app.

In addition, you will find that when you select the text in the different apps, it will show different styles of bars (Copy, Paste, SelectAll, Share). Becasue most of the app will have their own actions when the user selects the text in their app. You can not use the action in your app to cover it.

There a conflict between the requirement and the google's user's data security policy, because this means that you can access all the app's text content.

Liyun Zhang - MSFT
  • 8,271
  • 1
  • 2
  • 14