Git Product home page Git Product logo

thali_cordovaplugin's Introduction

Thali Cordova Plugin

This project is a work in progress and not yet production-level quality.

The Thali Cordova Plugin is a Cordova plugin for building peer-to-peer (P2P) networking apps on Android and iOS.

The Thali Cordova Plugin is layered on the JXcore Cordova plugin, which uses JXcore to allow one to build mobile applications in JavaScript for Node.JS.

Prerequisites

Android

Download Android Studio

Make sure to set your ANDROID_HOME environment variable:

Mac OS X (put in your ~/.bash_profile file):

export ANDROID_HOME=~/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Linux (put in your ~/.bashrc file):

export ANDROID_HOME=/<installation location>/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Windows:

set ANDROID_HOME=C:\<installation location>\Android\sdk
set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools

iOS

Download Xcode 6, or later.

Getting Started

Install latest JXCore

Follow the instructions at http://jxcore.com/downloads/. When you're done, check that the installation worked:

$ jx -jxv
v 0.3.0.5

Install Cordova

(Check the Android Platform Guide and iOS Platform Guide for detailed instructions.)

$ sudo jx install -g cordova

Create a Cordova project

$ cordova create ThaliTest com.test.thalitest ThaliTest

Using the Thali Cordova Plugin

To use Thali in a Cordova project one must do the following:

  1. Make sure to add whatever platforms you are using in Cordova using cordova platform add (android | ios)
  2. Add a subfolder to www named jxcore (case sensitivity matters)
  3. Inside the jxcore folder create the app.js for your application
  4. Inside the jxcore folder create the package.json for your application
  • jx npm init provides an easy to use wizard that will create a basic package.json file
  1. Inside the jxcore folder run the command jx install thali --autoremove="*.gz" --save
  2. Make sure to run cordova build as this is critical to moving key files into place
  • Yes, an exception did get thrown during the build. No, it isn't harmful. No, we haven't quite figured out why it gets thrown, the verbose debug logs aren't saying anything useful.

Now you can run your app.

Note that Thali uses a subdirectory in your project called thaliDontCheckin to manage certain downloads. Per the name of the directory, please don't check it in to your repro.

If you want to upgrade to a newer version of Thali_CordovaPlugin all you have to do is just edit your package.json with the version you want and then run 'jx install'. This will automatically update the Javascript files as well as uninstall the old plugin and install the new plugin.

Documentation

The following API documentation is available for the Thali Cordova Plugin:

Contributing

If you see a mistake, find a bug, or you think there is a better way to do something, feel free to contribute. Email [email protected] to connect with other contributors and get started with Thali.

License

Copyright (c) 2015 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

thali_cordovaplugin's People

Contributors

mattpodwysocki avatar mpodwysocki avatar obastemur avatar softwarenerd avatar sreesharp avatar srichal avatar tobybrad avatar vjrantal avatar yaronyg avatar

Watchers

 avatar  avatar

Forkers

yaronyg

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.