Anybody has a clue on how to use the ExternalAccessory API on Xamarin.iOS?
My Xamarin Studio version is 4.0.12(build 3), Xamarin.Android version 4.8.1, Xamarin.iOS version 6.4.5.0 and Xcode is Version 5.0 (5A1413) and I tried target both 6.1 and 7.0 iPad/iPhone.
I've walked the internet and there is not much documentation. Even the MonoTouch docs have broken links.
What I want is, list the connected bluetooth devices, get one of then by name and then connect to it so I can open a socket and start sending data to it. It is a device that uses Serial communication and yes, it has the Apple external accessory protocol ID.
I've tried this:
var am = EAAccessoryManager.SharedAccessoryManager;
It just throws me an exception an InvaidCastException.
Any clues?
Thanks! I really appreciate the help.
PS: Xamarin Details
Xamarin Studio
Version 4.0.12 (build 3)
Installation UUID: 7348d641-ed6d-4c8a-b59a-116674e06dfd
Runtime:
Mono 3.2.0 ((no/7c7fcc7)
GTK 2.24.20
GTK# (2.12.0.0)
Package version: 302000000
[...]
Apple Developer Tools
Xcode 5.0 (3332.25)
Build 5A1413
[...]
Xamarin.iOS
Version: 6.4.5.0 (Trial Edition)
Hash: 1336a36
Branch:
Build date: 2013-10-09 11:14:45-0400
Build Information
Release ID: 400120003
Git revision: 593d7acb1cb78ceeeb482d5133cf1fe514467e39
Build date: 2013-08-07 20:30:53+0000
Xamarin addins: 25a0858b281923e666b09259ad4746b774e0a873
Operating System
Mac OS X 10.8.5
Darwin Gutembergs-MacBook-Pro.local 12.5.0 Darwin Kernel Version 12.5.0
Mon Jul 29 16:33:49 PDT 2013
root:xnu-2050.48.11~1/RELEASE_X86_64 x86_64
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…