Can you provide more information about the "It was never connected" error? Did this error appear in a popup dialog? Or did you read this in DDMS? Did you get a full stack trace? Also, can you share any code snippets that I can try out here?
It has been a long time since I've looked at the Bluetooth module, but if you provide me with some more info, I can take a look. Steve On Mon, Mar 6, 2017 at 8:17 AM, <[email protected]> wrote: > If you are experiencing an issue please mention the full platform your > issue applies to: > IDE: NetBeans > Desktop OS: Mac > Simulator: none, due to Bluetooth usage which is not available on Simulator > Device: Android phone > Bluetooth device: pedometer > > It seems BLE support is unreliable. I turn on my Bluetooth device that I'm > trying to connect to (a pedometer), then on the phone I start scanning for > the device, and sometimes it picks up, sometimes not. If it does pick up, I > try to connect using the address, and I get a "Could not connect to > device". (incidentally, if I use isConnected(), it throws an exception > saying it was never connected. I assumed it would just return false) > I'm trying to duplicate a native iOS app, which has no issue connecting to > the pedometer every time. > > I've been searching for a "best practices" on BLE comms, but can not find > anything substantial. The link the Cordova docs are cumbersome due to > requiring translation into the Codename One lib. > > -- > You received this message because you are subscribed to the Google Groups > "CodenameOne Discussions" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > Visit this group at https://groups.google.com/ > group/codenameone-discussions. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/codenameone-discussions/f8c69b92-2ef5-44ca-b593- > 170f89fede80%40googlegroups.com > <https://groups.google.com/d/msgid/codenameone-discussions/f8c69b92-2ef5-44ca-b593-170f89fede80%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Steve Hannah Software Developer Codename One http://www.codenameone.com -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/CAGOYrKV6C7x0SNmK8jON_YwS-FTLhzdBSou%3DoLEpGakbWZCe2w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
