Bluetooth Plugin 0.1 for PhoneGap 0.9.6 (Android)

1,112 views
Skip to first unread message

Daniel

unread,
Aug 1, 2011, 9:19:01 AM8/1/11
to phonegap
Hey guys,

I have developed a bluetooth plugin for PhoneGap 0.9.6 (Android) and I
want to share it with you. You can get it here:

http://www.megaupload.com/?d=R2WDDS7D

I have incluided a dummy application for try the plugin, but the
plugin itself is just the class BluetoothPlugin.java and the
javascript bluetooth.js.

It's my first plugin for PhoneGap, so feedback is welcome!

Shazron Abdullah

unread,
Aug 1, 2011, 4:19:22 PM8/1/11
to phon...@googlegroups.com
Thanks Daniel,
If you want, you can also fork and contribute it to http://github.com/phonegap/phonegap-plugins
(don't forget to attach a license).

> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com

Daniel

unread,
Aug 2, 2011, 8:25:07 AM8/2/11
to phonegap
Ok Shazron,
I have already forked it and attached a license (Apache License 2.0).
You can find it here:

https://github.com/DanielTizon/phonegap-plugins/tree/master/Android/Bluetooth





On 1 ago, 22:19, Shazron Abdullah <shazron.abdul...@nitobi.com> wrote:
> Thanks Daniel,
> If you want, you can also fork and contribute it tohttp://github.com/phonegap/phonegap-plugins

Shazron Abdullah

unread,
Aug 2, 2011, 11:52:54 AM8/2/11
to phon...@googlegroups.com
Send a pull-request, that would ease integration.
Should be a button on your repo toolbar somewhere.

Viras

unread,
Aug 2, 2011, 1:34:15 PM8/2/11
to phon...@googlegroups.com
Can't wait to see this in action - Bluetooth was one of the next items
on my list!

Once you pushed it into the phonegap-plugin tree I will give it a go!

Best,
Viras

--
GOFG - Get On Fat Guy
http://www.gofg.at/ - powered by PhoneGap

Daniel

unread,
Aug 3, 2011, 2:49:46 AM8/3/11
to phonegap
Done! I already sent a pull-request.

It's still a first version of the plugin, but I have already included
the next functions, and everything have been tested:


isBTEnabled: true: enabled / false: disabled

enableBT: true: success / false: error

disableBT: true: success / false: error

getBoundDevices: returns a json array with all the bound devices to
your mobile (including name and mac address for each device)

getDevicesFound: returns a json array with all the bluetooth devices
found (including name and mac address for each device)

pair: you must pass the mac address of the bluetooth device with which
you want to pair your mobile

isBound: you must pass the mac address of the bluetooth device with
which you want to know if your mobile is paired





On 2 ago, 19:34, Viras <vi...@users.sourceforge.net> wrote:
> Can't wait to see this in action - Bluetooth was one of the next items
> on my list!
>
> Once you pushed it into the phonegap-plugin tree I will give it a go!
>
> Best,
> Viras
>
> Am 02.08.2011 14:25, schrieb Daniel:
>
>
>
> > Ok Shazron,
> > I have already forked it and attached a license (Apache License 2.0).
> > You can find it here:
>
> >https://github.com/DanielTizon/phonegap-plugins/tree/master/Android/B...
Reply all
Reply to author
Forward
0 new messages