Is it possible to start a regular app – with a GUI – in the background, without displaying its UI? Also, it needs to be launched from the shell terminal, not from java.

What I'm using currently:

am start -n com.nolanlawson.android.simpletalker/.MainActivity -e text "Sample text for TTS."
  • What is the final objective? – Firelord Aug 17 '15 at 4:27
  • 1
    Apps can run services in the background, but activities are for UI; it doesn't really make sense to run an activity without displaying it. If the app has useful stuff that it can do when it's not in the foreground, it should do it in a service. – Wyzard Aug 17 '15 at 4:40
  • 1
    It makes sense to me. Consider a TTS app which allows to be launched from console with a parameter for the text it has to speech. I need this app's UI to stay in the background while speaking, and I'm taking the compiled app as-is, without modifying its source. The same should probably be achieved best in Java, rather than console, it seems. – davide Aug 17 '15 at 9:50

I don't believe you can, however you could try using the StandOut library to achieve your goal. The StandOut library allows you to have floating windows on the screen. StandOut Library: https://github.com/pingpongboss/StandOut

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.