Home | History | Annotate | Download | only in bin
      1 #!/bin/bash
      2 #
      3 # android_launch_app: Launches the skia Viewer app on the device.
      4 
      5 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
      6 source $SCRIPT_DIR/utils/android_setup.sh
      7 source $SCRIPT_DIR/utils/setup_adb.sh
      8 
      9 # TODO: check to ensure that the app exists on the device and prompt to install
     10 
     11 if [[ -n $RESOURCE_PATH ]]; then
     12   adb_push_if_needed "${SCRIPT_DIR}/../../../resources" $RESOURCE_PATH
     13 fi
     14 
     15 activity="org.skia.viewer/org.skia.viewer.ViewerActivity"
     16 $ADB ${DEVICE_SERIAL} shell "am start -S -n ${activity} --es cmdLineFlags \"${APP_ARGS[*]:1}\""
     17