0

Is it possible to have a console application initialize or start up the lifecycle of an android application? Or at least initialize the application on the android device and then let the user start the application?

M. Chris
  • 161
  • 2
  • 14

1 Answers1

0

As long as you have the Android SDK installed on the machine, it's possible. It contains a command-line tool called ADB.exe (Android Debug Bridge) which lets you list currently connected devices, subscribe to connect/disconnect events, manage applications and much more.

For example, to install an application to the currently connected device, you'd run the following command:

adb install com.your.app

Once this is done, the user will see the application on the device and can launch it manually. If you also want to launch the app after installing, you can use the ADB shell command am start like described in the following answer:

How to start an application using android ADB tools?

If you want to run these commands from your C# console application, I'd use SharpAdbClient (open source) to do it.

Timo Salomäki
  • 7,099
  • 3
  • 25
  • 40