Giter VIP home page Giter VIP logo

air-draw-demo's Introduction

Air Draw

Local Dev

Run the web server:

./gradlew -t :server:run

Run the web asset server:

./gradlew -t :web:run

Visit: http://localhost:8080

Run the client:

  1. Download Android Command Line Tools:

  2. 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
    
  3. Add the following to your ~/.bashrc

    export ANDROID_SDK_ROOT=PATH_TO_SDK/android-sdk
    
  4. Source the new profile:

    source ~/.bashrc
    
  5. Run the build from this project's dir:

    ./gradlew :android:build
    
  6. For a physical device, setup adb

  7. Run on a device using an external server:

    ./gradlew android:installDebug -PdrawUrl=https://YOUR_URL/draw
    
  8. 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:

  1. Go to: https://console.cloud.google.com/apis/library/vision.googleapis.com

  2. Enable the Vision API

  3. Click "Create Credentials"

  4. Select "Cloud Vision API" at the API you are using

  5. Select "No, Iโ€™m not using them"

  6. Click "What Credentials do I need"

  7. Give the Service Account a name

  8. Select a role, like Project Editor

  9. Leave the JSON option selected and press "Continue"

  10. A JSON file will be downloaded to your machine

  11. Go to: https://console.cloud.google.com/cloudpubsub/topicList

  12. Create a topic named air-draw

  13. Create a subscription named air-draw

  14. Select "Never Expire"

  15. Press "Create"

  16. 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

air-draw-demo's People

Contributors

jamesward avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.