2015-05-11 12:54:19 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2016-07-12 16:12:39 +00:00
|
|
|
# android_launch_app: Launches the skia Viewer app on the device.
|
2015-05-11 12:54:19 +00:00
|
|
|
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
2017-01-04 19:02:52 +00:00
|
|
|
source $SCRIPT_DIR/utils/android_setup.sh
|
2015-05-11 12:54:19 +00:00
|
|
|
source $SCRIPT_DIR/utils/setup_adb.sh
|
|
|
|
|
|
|
|
# TODO: check to ensure that the app exists on the device and prompt to install
|
|
|
|
|
|
|
|
if [[ -n $RESOURCE_PATH ]]; then
|
2017-01-05 16:39:04 +00:00
|
|
|
adb_push_if_needed "${SCRIPT_DIR}/../../../resources" $RESOURCE_PATH
|
2015-05-11 12:54:19 +00:00
|
|
|
fi
|
|
|
|
|
2016-07-12 16:12:39 +00:00
|
|
|
activity="org.skia.viewer/org.skia.viewer.ViewerActivity"
|
2016-01-14 14:07:40 +00:00
|
|
|
$ADB ${DEVICE_SERIAL} shell "am start -S -n ${activity} --es cmdLineFlags \"${APP_ARGS[*]:1}\""
|