Skip to content Skip to sidebar Skip to footer

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:

  1. Download Node.JS (and then run the command prompt)
  2. npm install -g cordova
  3. npm install -g coffee-script
  4. cd C:\
  5. cordova create bluetooth com.example.bluetooth bluetooth
  6. cd bluetooth
  7. cordova platform add android
  8. cordova plugin add https://github.com/tanelih/phonegap-bluetooth-plugin.git
  9. Download this
  10. Covert main.coffee to main.js using coffee --compile main.coffee
  11. Download the library files (jQuery, bootstrap, underscore, backbone) and place them in the correct directories
  12. 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">
  13. 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"