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 Member
smarkovik
Posts: 1
Registered: ‎01-15-2013
My Device: Blackberry 10
My Carrier: ++33651175354

Porting a an Android App which uses Native code to Blackberry

Hello guys, 

I am android dev who is getting interested in BB dev. 

My app is consisted of two parts: 

1. Java UI written with the standard java code using the android SDK.

2. Shared c/c++ code between all the platforms we use. 

3. precompiled shared libs which are used by the common code (openSSL, Curl, LibZ, SQLCipher, etc)

 

I am getting kind of lost in all of your documentation, and see that you kind of focus on porting Games, 

is there any documentation considering apps which follow the design path I described?

Could I convert the native libs (I doubt it but I have to ask)

or should (and how should) I recompile my native libs for the new Blackberry platform?

 

thanks in advance.. 

 

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Porting a an Android App which uses Native code to Blackberry

I know nothing about Java but your native libs written in C/C++ should be rebuild targeting BB10 device. Should be fairly easy to do. 

Please use plain text.
Developer
cycletronic
Posts: 113
Registered: ‎03-23-2011
My Device: Playbook, Z10
My Carrier: Platinumtel

Re: Porting a an Android App which uses Native code to Blackberry

Many open source C++ libs are already ported, but lots of things will compile without modification anyway.  See here for some: http://blackberry.github.com/  under the "Native Projects" category.

 

As for the java layer, I'm not sure what your best path is, as I'm primarily a game developer.  You do have the option of Qt (which I use for desktop apps), or Cascades (which is a specialized Qt with a nice visual layout designer) and several other frameworks in various languages.

 

Hopefully someone else can chime in with a better answer for the Java side of things.

----------------
WIP game: Melodaeum
My graphically bland but very useful Morse Code trainer: Speed CW
My graphically attractive but boring game: The Rainstorm
Please use plain text.
Developer
borceg
Posts: 670
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB
My Carrier: Vip

Re: Porting a an Android App which uses Native code to Blackberry

Porting your android app as it is(with native code and java/android specific ui) is not possible. As stated in android docs, apps that use native code are not supported. If it was pure java, you could just add bb nature to your android project and repackage the app.

So, you have few options. Going with pure ndk and inventing new ui for your app with some reuse of your existing c++ code. Your new UI will relly mostly on OpenGL(quite hard to do). Or, you can go with Cascades which provides ui components in same fashion as android plus your existing c++ code.
Please use plain text.