Porting Existing Android & Java Code into Creator
-
I searched but haven't found the post that answers my questions:
I have several Android App's and Java App's I developed using Eclipse (and some using Android Studio). I recently started using QtCreator and want to import existing code/etc but see nothing that makes it painless - especially having 'keys' /etc setup for posting to the Play Market.
I've collected and use several IDE's (like most programmers) and now want to pare it down to only QtCreator for C++, Java and Android (and Arduino for my electronic gizmo's. Yes, I can do Arduino in other IDE's but, I prefer Arduino IDE for gizmo's)
Many of my Android and Java have multiple class files/panels/menu's...
Question 1:
Can it be done?
How?Question 2:
Would it be better to start new Android (and Java) projects and Copy&Paste the code
(And frustrate myself trying to fix them)?Thanks
-
I searched but haven't found the post that answers my questions:
I have several Android App's and Java App's I developed using Eclipse (and some using Android Studio). I recently started using QtCreator and want to import existing code/etc but see nothing that makes it painless - especially having 'keys' /etc setup for posting to the Play Market.
I've collected and use several IDE's (like most programmers) and now want to pare it down to only QtCreator for C++, Java and Android (and Arduino for my electronic gizmo's. Yes, I can do Arduino in other IDE's but, I prefer Arduino IDE for gizmo's)
Many of my Android and Java have multiple class files/panels/menu's...
Question 1:
Can it be done?
How?Question 2:
Would it be better to start new Android (and Java) projects and Copy&Paste the code
(And frustrate myself trying to fix them)?Thanks
Hi @outwest ,
Are you already aware of the Qt documentation about Android Essentials ?
There are some useful links about Android development with Qt Creator, including Publishing to Google PlayIn addition to this, there is also the Notifier example which demonstrates how to display a native Android notification by calling Java from C++. That's very basic but also a good base for a project mixing Qt C++ code with Android Java code.
Anyway, importing a whole Java project from Android Studio or Eclipse looks quite complicated, especially the GUI, but it may be feasible. Actually Qt Creator uses the same compilation process than Android Studio (gradle, ant) to build and Android application. You will see in the doc and example that you can create an "Android Template" from Qt Creator, which reproduce some part of the Android project file hierarchy, including "Manifest.xml", "src", "res" folders, etc... So you may be able to replace or extends
org.qtproject.qt5.android.bindings.QtActivity
, as demonstrated in the Notifier example, to wrap your existing code.