Run the web server:
./gradlew -t :server:run
Run the web asset server:
./gradlew -t :web:run
Visit: http://localhost:8080
Run the client:
-
Install the SDK:
mkdir android-sdk cd android-sdk unzip PATH_TO_SDK_ZIP/sdk-tools-linux-VERSION.zip tools/bin/sdkmanager --update tools/bin/sdkmanager "platforms;android-30" "build-tools;30.0.2" "extras;google;m2repository" "extras;android;m2repository" tools/bin/sdkmanager --licenses
-
Add the following to your ~/.bashrc
export ANDROID_SDK_ROOT=PATH_TO_SDK/android-sdk
-
Source the new profile:
source ~/.bashrc
-
Run the build from this project's dir:
./gradlew :android:build
-
For a physical device, setup adb
-
Run on a device using an external server:
./gradlew android:installDebug -PdrawUrl=https://YOUR_URL/draw
-
Or to run from Android Studio / IntelliJ, create a
gradle.properties
file in your root project directory containing:drawUrl=http://YOUR_DRAW_SERVER:8080/draw
And setup the activity to first run Gradle-aware Make with a task of
:android:assembleDebug
Use GCP for Pub/Sub & Vision API:
-
Go to: https://console.cloud.google.com/apis/library/vision.googleapis.com
-
Enable the Vision API
-
Click "Create Credentials"
-
Select "Cloud Vision API" at the API you are using
-
Select "No, I’m not using them"
-
Click "What Credentials do I need"
-
Give the Service Account a name
-
Select a role, like Project Editor
-
Leave the JSON option selected and press "Continue"
-
A JSON file will be downloaded to your machine
-
Go to: https://console.cloud.google.com/cloudpubsub/topicList
-
Create a topic named
air-draw
-
Create a subscription named
air-draw
-
Select "Never Expire"
-
Press "Create"
-
Run the app locally connecting to Pub/Sub and the Vision API:
GOOGLE_APPLICATION_CREDENTIALS=YOUR_CREDS.json ./gradlew -t run
Build and Deploy manually:
gcloud config set run/region us-central1
gcloud services enable run.googleapis.com
gcloud builds submit --tag=gcr.io/$(gcloud config get-value project)/air-draw
gcloud beta run deploy air-draw --image gcr.io/$(gcloud config get-value project)/air-draw --allow-unauthenticated --memory=512Mi