Giter Site home page Giter Site logo

processingwearos's Introduction

ProcessingWearOS

A simple example of using Processing with Wear OS in Android Studio.

Learn more about Processing for Android here.

Why?

Including the Processing library in an Android Studio project gives you a canvas to sketch on. You can also take advantage of Instant Run this way to see your updates in a Wear OS emulator in < 1 second (pushing code to a paired watch takes a bit longer).

If you want to try something similar, but using Kotlin rather than Java, checkout this project. It's for Android phones, but could be adapted to work for Wear OS devices as well.

How?

You can clone this repo, or if you want to start from a new Wear OS project, follow these steps:

  1. Start a new Wear OS Android Studio project (use API 25 or newer).
  2. Add the following to your gradle dependencies: org.p5android:processing-core:4.0.1
  3. Add a styles.xml file to res/values/ and copy the contents from this repo.
  4. Update android:theme in AndroidManifest.xml to: android:theme="@style/AppTheme">
  5. Update activity_main.xml to match the same file in this repo.
  6. Update the contents of MainActivity.java to match MainActivity.java in this repo (updating the package name if necessary).
  7. Copy Sketch.java from this repo (and update the package name if necessary).

You should now be able to build. Using the Emulator is recommended as you iterate because it's super fast with Instant Run (hit the lightning bolt rather than the play button after your first build).

Tip: To get rid of the Toast that appears when using Instant Run, go to the Preferences menu, search "Instant", then in the Instant Run settings, uncheck "Show toasts in the running app when changes are applied".

processingwearos's People

Contributors

soundanalogous avatar

Stargazers

MUHAMMAD MANNIR AHMAD avatar

Watchers

 avatar James Cloos 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.