1

I have a service that shows an always-on-top clickable floating button on screen irrespective of the context. (User can switch apps and the floating button will always show)(already implemented)

I want to implement such that, whenever user clicks on an EditText, in ANY app, and click the floating button, it should put some text in that EditText.

First I want to know if this is possible atleast? If yes, How!

Let me know if the above para is not enough to make sense what I meant.

Any help will be appreciated.

Community
  • 1
  • 1
Srujan Barai
  • 2,295
  • 4
  • 29
  • 52
  • I think you've to elaborate your question clearly. What app you mean. .how do you show FAB from service. .etc – cgr Nov 21 '15 at 07:53
  • @cgr as shown here:http://stackoverflow.com/questions/4481226/creating-a-system-overlay-window-always-on-top – Srujan Barai Nov 21 '15 at 07:57

2 Answers2

2

The only way to do this is create a service that works as an input service, say a custom keyboard. You need to take permission android.permission.BIND_INPUT_METHOD to do so.

Srujan Barai
  • 2,295
  • 4
  • 29
  • 52
1

Actually, you do not have rights to do so. But there is a way of doing which is by creating an input service. InputMethodService | Android Developers