I am trying to create a behavior where entering some string in any application will open my application.
I've tried looking around on how to listen for keyboard press or listening for text change, but I couldn't find my required behavior and I don't want to create a custom keyboard for this.
If this is not possible, what will be a good implementation for lunching my application as fast as possible while in the other application?
Asked
Active
Viewed 58 times
0

Alon Rew
- 75
- 1
- 1
- 8
-
not possible sorry – tyczj May 18 '16 at 16:32
-
May be this is the solution for your question http://stackoverflow.com/questions/15302093/developing-two-android-apps-and-communicating-between-two – iDevRoids May 18 '16 at 16:32
-
maybe one possible way will be service. – pouyan May 18 '16 at 16:32
-
If this was doable without a side-step such as the one provided in my answer, imagine how horrible the android ecosystem would me. Type youtube and it opens, ok.. but then random ads, apps, and weirdness would soon follow. I'm glad it's not. – Juan Cortés May 18 '16 at 16:40
1 Answers
0
Answered before the requirement to "don't want custom keyboard"
The only viable way that I can think of is if the user was using a custom keyboard written by you. Custom keyboards can and do act as key-loggers and therefor could detect any key combination, or written word and allow you to execute your code when your conditions are met.
Rerfer to Creating an input method docs
How to open my app as fast as possible from another application?
Press home, launch your app by clicking on the launcher icon
But assuming you mean without doing that, you'll still need to monitor some event, say volume keys pressed or device being shaken for instance, or have you app be running already in the foreground such as what Facebook messenger does (or used to do, I don't know)
Related questions:
- What APIs in Android is Facebook using to create Chat Heads?
- Listen to volume buttons in background service?
- How to detect shake event with android?
Demo of bubbles

Community
- 1
- 1

Juan Cortés
- 20,634
- 8
- 68
- 91