BT Accessory

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ncmac
Posts: 31
Joined: Thu Apr 27, 2006 10:29 pm

BT Accessory

Post by ncmac » Sun Feb 26, 2012 7:15 pm

Is it possible to detect if a Bluetooth accessory is paired to an iOS device - specifically a keyboard?

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: BT Accessory

Post by Jellicle » Mon Feb 27, 2012 2:31 am

Nope.

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

gpb01
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Sat Jun 04, 2011 5:41 pm

Re: BT Accessory

Post by gpb01 » Mon Feb 27, 2012 11:28 am

ncmac wrote:Is it possible to detect if a Bluetooth accessory is paired to an iOS device - specifically a keyboard?
Mmm ... probably YES, but you have to write an 'External' to use the 'EAAccessoryManager' class and, in particular, the 'EAAccessoryManager.connectedAccessories' property which return the list of currently connected accessories.

Guglielmo

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: BT Accessory

Post by Jellicle » Tue Feb 28, 2012 8:12 am

Oh ok then...yes :)

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

peter786723
Posts: 2
Joined: Mon Mar 05, 2012 9:12 pm

Re: BT Accessory

Post by peter786723 » Mon Mar 05, 2012 9:29 pm

Do you have a example of a external for blue tooth communication or any tips for where to begin

Peter

gpb01
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Sat Jun 04, 2011 5:41 pm

Re: BT Accessory

Post by gpb01 » Mon Mar 05, 2012 11:16 pm

peter786723 wrote:Do you have a example of a external for blue tooth communication or any tips for where to begin
Peter
Hi Peter,

unfortunately not, but you can start here : https://developer.apple.com/library/ios ... rence.html for the 'EAAccessoryManager' class, and here : http://www.runrev.com/developers/docume ... rnals-sdk/ for how to write Externals.

Please remember that you can just use the Bluetooth devices made for iOS (... or recognized by iOS) and NOT all the bluetooth devices :(

Guglielmo

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: BT Accessory

Post by monte » Mon Mar 05, 2012 11:55 pm

Can you give some more info on your use case? Are we talking about modifying your UI based on if the keypad shows on screen or not? If that's your use case then there are notifications for that. You could write an external that sends a message to the card every time the keypad is shown.

Cheers

Monte

PS I do half price development for externals I can include in mergExt and this would be a good candidate. You could also add it as an idea in the Ideas topic on the mergExt forum and then vote on it in the poll when it comes up. See mergext.com for more details.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: BT Accessory

Post by monte » Mon Mar 05, 2012 11:59 pm

LOL, it's already in the engine ;-)

See the keyboardActivated message. You shouldn't get that message if they user touches in a field and you have a keyboard connected.

Cheers

Monte
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

prasannamsv
Posts: 1
Joined: Fri Apr 27, 2012 9:20 am

Re: BT Accessory

Post by prasannamsv » Fri Apr 27, 2012 9:28 am

@gpb01 Is it possible to pair a MFI licensed bluetooth device programaticcaly. Currently i have a MFI device and i can pair it with my ipad(ios 5.1) in settings-General-Bluetooth. But i dono how to do it via code. External Accesory framework only shows devices that are already paired, is it possible to pair the accesories with my ipad programatically?? Please help...

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: BT Accessory

Post by monte » Fri Apr 27, 2012 11:46 am

No the user must pair the devices. Once paired you can get notifications for connection and disconnection. I have an external coming quite soon that covers the external accessory framework.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

gpb01
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Sat Jun 04, 2011 5:41 pm

Re: BT Accessory

Post by gpb01 » Fri Apr 27, 2012 12:50 pm

... one of the many limitations imposed by strongs Apple security rules :twisted:

Guglielmo

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: BT Accessory

Post by monte » Wed May 02, 2012 9:21 am

Just announced mergAccessory! Check it out at http://mergExt.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Post Reply