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 Developer
craigpinto97
Posts: 15
Registered: ‎02-23-2014
My Device: Z10 STL100-1

Converting Android Java Code to BlackBerry Native (QML) Code

Well....its exactly as the subject says.....is it even possible?

Developer
BBSJdev
Posts: 6,118
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30

Re: Converting Android Java Code to BlackBerry Native (QML) Code

This has been asked a few times in the forums, Java and C++ are fairly close to each other for programming if you understand one then you should be able to get to grips with the differences in the other.

 

If you have seperated your UI from your app logic then changing this part shouldn't be too tricky either.

 

Having said all that it's a lot of work still and since Android apps run on BB10 anyway the question is is it worth doing?

 


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Developer
superdirt
Posts: 541
Registered: ‎05-17-2009
My Device: Not Specified

Re: Converting Android Java Code to BlackBerry Native (QML) Code

It's possible to build most Android apps in BB native, excluding features such as Google Play services, Google maps etc. In BB, QML is similar to Android XML except QML allows for the definition of javascript style functions. The BB QT C++ layer is similar to Android's Java layer. You mention only QML in your subject line - QML is just one element of BB native programming. While you can write apps made primarly in QML, you will not get the freedom and power that you would get with Android Java and QT C++.

 

There is no class in BB Native that's similar to an Android Activity. To keep my code clean, I usually use a view controller class which I have built myself that contains a root VisualNode.

 

 

New Developer
Bourne11
Posts: 10
Registered: ‎06-23-2014
My Device: Z10

Re: Converting Android Java Code to BlackBerry Native (QML) Code

Personally, I build an app with either one and once I have the basic logic/flow of the app figured out, I write it manually in both environements.

 

This way, I get the benefit of working on the app again and noticing potential improvements!