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.

Posts: 425
Registered: ‎03-17-2011
My Device: Developer
My Carrier: Telus
Accepted Solution

Where can I find code snippets examples?

Can anyone tell me if there's a place where I can find snippets and samples demonstrating aspects of using the NDK APIs? In particular is there a demo app using orientation API events.


I am attempting to create a ActionScriopt Native Extension and to this end I have implemented a HelloWorld extention. I have located the appropriate API docs for orientation events but I need some help in shortening my learning curve - so some concrete examples would be very helpful.

In the dark and need a sky map?
Discover What's up at App World.
Follow What's up on Facebook

Posts: 19
Registered: ‎01-21-2012
My Device: PlayBook
My Carrier: none

Re: Where can I find code snippets examples?

Looking for the same, with Android there is a ton of sample apps. Seems to be lacking for the PB native NDK.


However, for orientation you should check out the "FallingBlocks" example. It has all the API you need.


If someone can help with an example for getting Location (GPS) data, I would really appreciate it.


Posts: 20
Registered: ‎10-27-2010
My Device: Bold 9800

Re: Where can I find code snippets examples?

There are many samples available at http://blackberry.github.com/ndk/samples.html (including geolocation)

Posts: 19
Registered: ‎01-21-2012
My Device: PlayBook
My Carrier: none

Re: Where can I find code snippets examples?

thanks David, exactly what I was looking for !!

Posts: 25
Registered: ‎01-21-2012
My Device: curve 8530
My Carrier: boost

Re: Where can I find code snippets examples?

Exactly what i was looking For as well.  I'm trying to figure out how to send information between my laptop and blackberry phone.  There are java samples in my eclipse on how to do this. However they are in Java which I don't exactly understand yet or care that much.  My idea is to learn how to this in the Tablet in C++.  And once I can do it there, I will be better prepared to do it on the smartphone in java.   


I know c++ very well.  But some of the API commands are so hard to understand.  Can I get an opensource browser on my blackberry smart phone?  Or is the current blackberry browser that I run on it closed?  How can I get into the JavaScript that I know runs in the web pages of my smartphone browser? I just basically whant to do something like monitoring a RSS feed on a website.  And depending on the feed update, send an alert to my phone.