Giter VIP home page Giter VIP logo

android-app's Introduction

Spark Android App

This is the source repo for the official Spark app for Android, providing the Smart Config and Tinker features, and offering a starting point for your own Android apps to work with your Cores.

Building

  1. In Eclipse, go to File --> Import, and under the Android "folder", click "Existing Android Code into workspace", then click Next
  2. Click Browse, select the dir where you cloned the repo, and click OK
  3. You should now see two projects under the "Projects to Import" header: "SparkCore" and "Fontify". Click on Finish.
  4. In the SparkCore app, create the file res/values/local_build.xml with the following contents:
    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        <string name="spark_token_creation_credentials">spark:spark</string>
    </resources>

(You could actually put any valid HTTP Basic Auth string where it says spark:spark; these values aren't currently used, but they must be present.)

After this, you might also need to do a refresh and/or clean on the SparkCore project, because Eclipse. ;-)

Required Fonts

The Spark app distributed via Google Play uses several typefaces in the Gotham family. If you have a license to these, you can place the following 4 files in SparkCore/assets/fonts.

  • gotham_bold.otf
  • gotham_book.otf
  • gotham_light.otf
  • gotham_medium.otf

Otherwise, in order to build a working app, you will need to either modify the app not to look for the fonts or put some other fonts in their place.

Required TI SmartConfig Library

You must add smartconfiglib.jar to the SparkCore/libs directory.

To get the SmartConfig library, go to the CC3000 Wi-Fi Downloads page. Search the page for the Android SmartConfig Application. Download and unpack the app, which will require Windows. :-/ You can find smartconfiglib.jar in the libs directory of TI's app.

Key Classes

If you want to know where the action is in the app, look at:

  • SimpleSparkApiService: an IntentService which performs the actual HTTP calls to talk to the Spark Cloud
  • ApiFacade: A simple interface for making requests and handling responses from the Spark API. If you want to work with the Spark API from Android, this is the place to start. See examples below like nameCore(), digitalWrite(), etc, for templates to work from.
  • SparkCoreApp: There are a number of classes which rely on an initialization step during app startup. All of this happens in SparkCoreApp.onCreate().

Open Source Licenses

Original code in this repository is licensed by Spark Labs, Inc. under the Apache License, Version 2.0. See LICENSE for more information.

This app uses several Open Source libraries. See SparkCore/libs/licenses for more information.

android-app's People

Contributors

towynlin avatar

Watchers

 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.