I
I
IvaToa102019-09-19 16:30:31
Android
IvaToa10, 2019-09-19 16:30:31

How to pass Enter character to Android by Intent?

Good afternoon!
1. The essence of the problem is as follows - there are two applications.
The first sends a string to the other via an Intent.
The second reads this line and displays it in the field.
If you then press Enter on the keyboard in this field, the desired action will occur.
The question is, is it possible and how to pass the Enter character in that line through the Intent so that the action occurs immediately and does not wait for the user to press the button?
The option to pass such a string (example - "abc\n") - does not work.
What can you advise?
The second application is not mine, so I can't change the code there.
2. Is it possible to somehow emulate a button press in another application?
For it to press Enter on the keyboard. Or there is a Button - pressed it.
Can this be done somehow? For example, through the background service Service? Or is it technically impossible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2019-09-19
@402d

no. Imagine the size of a security hole, if that's allowed.
Accessibility services for people with disabilities can afford this.
But with the publication in the market, I think you will not succeed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question