0

I try to make auto-tests with some new AVDs on Java. In my case i must create AVD for every APK run, and delete AVD after it. And i can not find a solution or library for it.

Only cli call "avdmanager create....". But this is discomfort decision because i must write in stdin answers on questions. If i want create custom AVD - its impossible (many fields to write to stdin).

In past "android create" was good decision, but now it deprecated and this command run avdmanager.

I found information about com.android.sdklib with class AVDManager, but i can not find documentation or some examples. Is it real - make new AVD devices from code?

Anton K.
  • 31
  • 6

1 Answers1

0

There's CLI commands to do it. Just write a class with functions like createAVD that call the CLI command and waits for it to finish. There's no reason a Java app can't call other apps.

Gabe Sechan
  • 90,003
  • 9
  • 87
  • 127
  • Sorry, i did not described this variant. It impossible now, to create custom AVD. Only default with one "no" answer. Updated my first post. – Anton K. Sep 20 '19 at 17:15