Giter Site home page Giter Site logo

connect-sdk-cordova-plugin's Introduction

Connect SDK Cordova/PhoneGap Plugin

Connect SDK is an open source framework that unifies device discovery and connectivity by providing one set of methods that work across multiple television platforms and protocols.

For more information, visit our website.

Dependencies

These steps assume you have a basic working knowledge of development for Android, iOS and Cordova/PhoneGap. For these steps to work, you will need the following:

  • Cordova/PhoneGap 2.x or 3.x
  • Xcode
  • Xcode command line tools
  • Android Developer Tools (Eclipse)
  • Android's tools & platform-tools folders in your PATH

If you are only developing for one platform, feel free to ignore the steps & requirements for the irrelevant platform.

Installation for Cordova/PhoneGap 3.x

1. Create a new Cordova app (optional)

cordova create sample_app com.example.sample_app SampleApp
cd sample_app
cordova platform add ios
cordova platform add android

2. Add plugin to app

cordova plugins add https://github.com/ConnectSDK/Connect-SDK-Cordova-Plugin.git#master

3. Setup projects

Run the following command to create Xcode and Eclipse projects:

cordova prepare

The projects will be located in platforms/ios and platforms/android respectively.

Next, follow the README.md from the Connect SDK iOS and Android source repositories:

Installation for Cordova/PhoneGap 2.x

1. Create a new app (optional)

# iOS
/path/to/cordova-ios/bin/create /path/to/my_new_cordova_project com.example.cordova_project_name

# Android
/path/to/cordova-android/bin/create /path/to/my_new_cordova_project com.example.cordova_project_name

2. Add plugin files to your project

  1. Download the files located at https://github.com/ConnectSDK/Connect-SDK-Cordova-Plugin
  2. Copy www/ConnectSDK.js to your project's www/js folder
  3. Copy the contents of the src folder to your project. For Android, the files should go in src/com/connectsdk/cordova

3. Modify Cordova/PhoneGap config files

# add to www/index.html
<script src="js/ConnectSDK.js" type="text/javascript"></script>

# add plugin to www/config.xml

## iOS
<plugins>
    <plugin name="ConnectSDK" value="ConnectSDKCordova" />
</plugins>

## Android
<plugins>
    <plugin name="ConnectSDK" value="com.connectsdk.cordova.ConnectSDKCordova" />
</plugins>

4. Setup projects

Next, follow the README.md from the Connect SDK iOS and Android source repositories:

Contact

Troubleshooting

  • If the plugin doesn't load on iOS, check if the *.m files are in the project's "Compile Sources" list in "Build Phases".

License

Copyright (c) 2013-2014 LG Electronics.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

connect-sdk-cordova-plugin's People

Watchers

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