Testing Android app

  Options

Testing Android app

Procedure 4. Testing Android app

  1. Execute following command and make an Emulator :

    $ /path/to/my_new_cordova_project/cordova/emulate

    on windows

    $ path\to\my_new_cordova_project\cordova\emulate.bat

    Or otherwise use :

    $ android avd

    Note

    Make sure you have created at least one Android Virtual Device. If you did not it will ask you to create one with the android command. If you have multiple AVDs, it will prompt you to select an AVD. When You are creating an Emulator, make sure the its platform version is compatible with your application.

  2. After create an Emulator, then run it. To install created Android app, go to the output directory of app and then also for 'bin' directory inside it.

    $ /path/to/my_new_cordova_project/cordova launch

    Or

    $ adb install path/to/.apk

    Ex: If you are in xsl/mobile directory,

    $ adb install \
    path/to/proj/bin/MobileAppActivity-debug.apk

  3. Logging

    $ /path/to/my_new_cordova_project/cordova/log

    on windows

    $ path\to\my_new_cordova_project\cordova\log.bat

  4. Cleaning

    $ /path/to/my_new_cordova_project/cordova/clean

    on windows

    $ path\to\my_new_cordova_project\cordova\clean.bat

  5. Clean, build, deploy and launch

    $ /path/to/my_new_cordova_project/cordova/BOOM

    on windows

    $ path\to\my_new_cordova_project\cordova\BOOM.bat

    Note

    Make sure you have an emulator or a device connected.

  6. If you already installed current app that you want to install, then you can reinstall it by:

    $ adb install [-r] path/to/.apk

    Ex: If you are in xsl/mobile directory,

    $ adb install -r 
    path/to/proj/bin/MobileAppActivity-debug.apk