Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
Posts: 7
Registered: ‎05-10-2012
My Device: blackberry playbook
My Carrier: blackberry
Accepted Solution

Is Bluetooth API available for development?

Hi,

 

Please suggest me the native Bluetooth API which can be user to connect , send and receive data from other device.

Developer
Posts: 107
Registered: ‎02-15-2012
My Device: Blackberry Playbook 32GB
My Carrier: Virgin Mobile

Re: Is Bluetooth API available for development?

I could do with knowing this too.
It seems strange that they wouldn't implement it.
Like the usb port on the playbook, it barely has any use except for syncing with pc and charging, no application use at all :/
New Contributor
Posts: 7
Registered: ‎05-10-2012
My Device: blackberry playbook
My Carrier: blackberry

Re: Is Bluetooth API available for development?

Hi,

 

It would be great if you please describe it a more..

BlackBerry Development Advisor (Retired)
Posts: 60
Registered: ‎05-10-2012
My Device: Blackberry 10 Alpha
My Carrier: none

Re: Is Bluetooth API available for development?

Hello,

 

Afaik, there isn't one exposed in the API at this time. See this thread

 

http://supportforums.blackberry.com/t5/Native-Development/BlueTooth-SPP-connection-data/td-p/1511249

 

Cheers

Selom

BlackBerry Development Advisor
Posts: 19
Registered: ‎03-18-2012
My Device: Blackberry Z10
My Carrier: Rogers

Re: Is Bluetooth API available for development?

Hello,

 

We don't have a bluetooth API in the current beta releases, but will plan on supporting an API for BB10.

Russell Andrade
Senior Product Manager, Native SDK
Twitter : @russell_andrade
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Is Bluetooth API available for development?

APIs have been added in Beta 2 of the NDK however we are still working to get documentation ready for them and they are subject to change a bit moving forward. If you would like to see what is available then you can find the header files here:

<yourNdkInstallDirectory>\target_10_0_6_378\qnx6\usr\include\btapi

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 33
Registered: ‎05-02-2012
My Device: playbook
My Carrier: bouyig

Re: Is Bluetooth API available for development?

[ Edited ]

hello

 

I try to use btspp.h
 I use bt_spp_init int ();
to  Initializes the library
when I build, I have the  error :
undefined reference to `bt_spp_init '

 

what must be done to cane use this library ???

 

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Is Bluetooth API available for development?

Could you post your code snippet?

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 33
Registered: ‎05-02-2012
My Device: playbook
My Carrier: bouyig

Re: Is Bluetooth API available for development?

#include "app.hpp"

#include <bb/cascades/Application>
#include <bb/cascades/QmlDocument>
#include <bb/cascades/AbstractPane>
//#include <btapi/btgatt.h>
//#include <btapi/btle.h>
#include <btapi\btspp.h>
#include "myBt.h"
using namespace bb::cascades;

App::App()
{


             int te	= bt_spp_init();

qWarning() << te ;



	//bt_spp_init();
    QmlDocument *qml = QmlDocument::create("main.qml");
    //-- setContextProperty expose C++ object in QML as an variable
    //-- uncomment next line to introduce 'this' object to QML name space as an 'app' variable
    //qml->setContextProperty("app", this);
    
    AbstractPane *root = qml->createRootNode<AbstractPane>();
    Application::setScene(root);
}

 

Contributor
Posts: 33
Registered: ‎05-02-2012
My Device: playbook
My Carrier: bouyig

Re: Is Bluetooth API available for development?

I think that the problem is that the library does not compile libbtapi.so


because in the makefile I Have

 

LIBS          = $(SUBLIBS)  -L$(QNX_TARGET)/armle-v7/lib -L$(QNX_TARGET)/armle-v7/usr/lib -L$(QNX_TARGET)/armle-v7/usr/lib/qt4/lib -LC:/bbndk2/target_10_0_6_384/qnx6/usr/lib/qt4/lib -lm -lbps -lbb -lbbcascades -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lQtXmlPatterns -lQtXml -lQtGui -lQtNetwork -lQtCore

 I do not know how fair to compile the  library  libbtapi.so