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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


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..

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

Retired
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);
}

 

Highlighted
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