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
Trusted Contributor
AllSystemGo
Posts: 140
Registered: ‎11-23-2010
My Device: Torch 9800

New to the NDK

Hello all,

 

  Before anyone kick me in the chin for all my stupid questions let me just tell you that I'm new to the whole NDK and that my c++ coding is far back in high school and that I'm pretty rusty on all the concepts. But still I'm trying to develop for the playbook cause I think that it's a great platform and I wish I could shut the trap on all the bad press on the playbook. So on that here are my questions.

 

  1. I was playing around in the led.h under bps and I was trying to implement a simple led_request_color("a", LED_COLOR_BLUE, 10) the "a" is a id I don't know if I'm suppose to pass anything else here! But when the app starts it closes back down with a : unknown symbol: led_request_color - ldd:FATAL: Could not resolve all symbols. I don't know if it has something to do with the : access_led_control that I don't know how to implement.
  2. I would like some more info on the :  int sensor_info(sensor_type_t type, sensor_info_t **info); Right now I manage to make it work but I don't understand how to get the info out of there

 

 

Thank you for your time and help.

 

If anyone could point me out on a good website on the c++ development to get me going on the playbook ndk development I would appreciate.

Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course

Re: New to the NDK

Here's a good C++ tutorial, though not PB-specific:

http://www.cplusplus.com/doc/tutorial/

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Trusted Contributor
AllSystemGo
Posts: 140
Registered: ‎11-23-2010
My Device: Torch 9800

Re: New to the NDK

Thank you for the web site. I'll look into it!

 

BTW do you have a clue why the led is not working?

BlackBerry Development Advisor
smcveigh
Posts: 668
Registered: ‎11-29-2011
My Device: developer

Re: New to the NDK

Hi,

You have missing symbols because you did not pull the appropriate library into your project.  Add libraries under project->properties->C/C++ Build->Settings->QCC Linker->Libraries.  Make sure "bps" is added.  However, I do not believe led access is currently available to user applications at this time.

 

Regarding sensor info.. I'm not sure how documented this is just yet.  What exactly are you attempting?

 

Cheers,

Sean

 

 

Super Contributor
lyon819
Posts: 253
Registered: ‎08-19-2010
My Device: BB10, Playbook, 9900, 9800, 9700, 9550, 9530, 9500, 8700.

Re: New to the NDK

The code can help you to get sensor information.

 

sensor_info_t *info = NULL;

sensor_info(SENSOR_TYPE_ACCELEROMETER, &info);

if (info){
information = sensor_info_get_range_maximum(info);
fprintf(f,"%7.3f\n", information);
}

 

Enjoy playbook development.

 

:Batman:

-Fight with BB10