PhoneGap Bluetooth Plugin On Android Device
I've been trying to get a bluetooth plugin for PhoneGap working but I can't seem to figure out where I'm going wrong. Firstly, my test device is a Galaxy S3 (GT-19305T) and the app
Solution 1:
I have recently experimented with the same example and was able to get it working. The main difference however is that I used Cordova CLI instead.
Note: You will need to have installed: Apache ANT, JAVA, Android SDK, GIT Command Line Tool. The first three also need to be set up correctly in your Environment Path.
These are the steps I performed:
- Download Node.JS (and then run the command prompt)
npm install -g cordova
npm install -g coffee-script
cd C:\
cordova create bluetooth com.example.bluetooth bluetooth
cd bluetooth
cordova platform add android
cordova plugin add https://github.com/tanelih/phonegap-bluetooth-plugin.git
- Download this
- Covert
main.coffee
tomain.js
usingcoffee --compile main.coffee
- Download the library files (jQuery, bootstrap, underscore, backbone) and place them in the correct directories
- Place all of the example documents in the correct directories, and edit index to have
<script src="cordova.js">
instead of<script src="phonegap.js">
cordova build android
Solution 2:
Maybe this article can help? This is more bluetooth connection with others specific then your question, but maybe it can help.I've used it in the past and it worked great with PhoneGap 3.0, only downside was that BlackBerry wasn't compatible anymore.
Post a Comment for "PhoneGap Bluetooth Plugin On Android Device"