I want deploy app with Qt 4 or 5 libs (Core & GUI) in apk. Is it real? I use necessitas to create apps. google.com didn't help in this answer.
P.S.: sorry for my English, it's not my native language.
If you mean that you don't want to use Ministro, then it should be possible. The page below gives some directions how to:
http://community.kde.org/Necessitas/QuickStartDevelop
On March 1, 2013, the page above has the following:
Deploy Configurations
Also on the Run view you can set the Deploy Configurations, by selecting Details at the right hand side these are the different options you can choose between.
Use device's qt libs
Deploy local qt libs
Install Ministro system
The Use devices qt libs option depends also on the Use local qt libs option. When Use local qt libs is unchecked your application will need the Ministro package to run. However if Use local qt libs is checked, Qt Creator will pass special parameters to the application, forcing it to use Qt libraries from the /data/local/qt path on the device.
The Deploy local qt libs option makes Qt Creator deploy qt libs found in the Qt SDK chosen (e.g. android-lighthouse-4.8.0). This option is useful when you hack on the Qt framework to test it. This option automatically selects the Use local qt libs option. This option get automatically unchecked after Qt Creator pushes the Qt libs. This option can be checked every time you need to push your local Qt modifications.
Install Ministro system option installs the Ministro package (you must provide the apk yourself; download it from from here). It is useful when you try to test your application on Android Virtual Devices.
If you want to go with Ministro for the libraries, here are directions on how to get it set up:
https://play.google.com/store/apps/details?id=eu.licentia.necessitas.ministro
http://sourceforge.net/p/necessitas/home/necessitas/
What is Ministro ?
Necessitas is also the Home of Ministro, an Android application which provides a system wide downloader and installer of the LGPL Qt shared libraries. You can find Ministro on the Android Market or as direct download here.
EDIT: Some more links:
http://community.kde.org/Necessitas
http://necessitas.kde.org/
http://qt-project.org/wiki/How_to_Create_and_Run_Qt_Application_for_Android
Hope that helps.
Related
Am using Qt to build app on android, Qt Quick mainly its really nice, but my main problem is the start up size is around 27 MB which is huge for initial size.. is there a way to reduce this size ?
If you you don't want to use Ministro Service, you should include only the necessary Qt modules. Omitting the unnecessary modules will reduce the APK size significantly. This is a quote from BogDan Vatra the man who ported Qt to Android :
Qt files can go slightly over 40Mb/platform if you are going to use
all of Qt modules. Of course your application doesnt need all the
modules, so, if your application uses only Qt Quick Controls + Qt SVG
+ Qt Multimedia + Qt Sensors + Qt XML modules, Qt files (libs + plugins + additional files) are ~20Mb/platform and your APK will be
~10Mb.
You can see Choosing the right deploying system
Yes. You are most likely bundling Qt itself with your app. That's the default setting in Qt Creator. Go into your project settings (the Projects button to the left of the UI) and under Android/Run/Make Install, click on the Details button. There you can switch the Qt Deployment from Bundle to use Ministro Service.
This way your apk will be a lot smaller, but you need to install the Ministro Service from Play Store. Ministro contains Qt libraries that other apps can use.
Hope that helps...
What's the best way to choice (select/open) file using Qt in Android ?
I'm tried to use QFileDialog But did not get good result , Is there anyway to use android native open file dialog in Qt ?!
In Qt 5.3, the Qt Quick Controls look good but they don’t (yet) look the same as Android’s Java Controls. This is something that’s planned to be fixed for Qt 5.4.
You can use Ministro to have Native look in your app :
Switch to Projects mode
Select the Run Settings for Android
Open Deploy configurations Details
Select Use Ministro service to install Qt
Now the Qt Widgets will have a native Android look. But there is a big drawback: Your App has now a dependency to the Ministro App. The App will check on startup if Ministro is installed on your device. If it is not installed the user is forced to install it over the Android Play Store.
Is it possible? I mean, yeah, pyqtdeploy intro page said: "pyqtdeploy is a tool for deploying PyQt applications. It supports deployment to desktop platforms (Linux, Windows and OS/X) and to mobile platforms (iOS, Android and Windows RT)."
I've installed Qt 5.3.0 for Android and all it's prerequisites (SDK, NDK, etc.). Also I made test project with simple button and label in QtCreator for testing deployment. Everything is fine. Next step was trying pyqtdeploy for making Qt project, pretty simple. But when I'm trying to build this project, linker said that there is no QtCore, QtWidget libraries. As I can recognize it, I've no static-linked PyQt libraries and that they must be compiled for arm architecture. Is it right? But then I've realised, that python library itself also must be arm compiled. And can I build this libraries from source in Qt?
Search did nothing. If this is true, why no one (riverbank, python) have no compiled libraries for arm?
Maybe I'm missunderstood something. In this case I got more global question.
How to deploy PyQt5.3 Python 3.4 application to Android with pyqtdeploy and Qt 5.3.0 for Android?
Wait for the next release of pyqtdeploy, which will probably give better instructions or include cross-compiled libraries. The pyqtdeploy project is being actively developed. Yes, you can use it for Android now, but you are on your own for cross-compiling many static libraries.
I have a reasonably large Qt project which I don't want to rewrite in Java for Android. So I downloaded and installed Necessitas SDK and managed to compile the project as an apk file.
So far so good. It also executed successfully in emulator, but then I got stuck. First problem was that Necessitas Qt Creator always produces a "Debug" apk file, even though I set the project config to "Release". The second problem, it allows me to deploy the app to emulator only, but I want to install and test it on a real Android device.
How can I find and copy the necessary Qt libraries manually to the device?
Install Ministro from the Market to get the Qt libraries. Your app will dialog with Ministro to get the needed libraries from the net. See the How to write Qt apps for Android guides for more information.
Necessitas is still alpha, so the libraries are indeed debug ones (to get debug messages), but stripped of the symbols.
I just read this question about packaging for Android:
Android - Application (apk) Maximum size
Where it mentions that apk files have a maximum size for the market place:
http://www.google.com/support/androidmarket/developer/bin/answer.py?hl=en&answer=113469
When using the Qt for Android:
http://sourceforge.net/p/necessitas/home/necessitas/
How much space does that take up?
You don't have to include the Qt libraries in your application so the space of the app depends only on the application itself.
The guy behind necessitas has also created ministro which fetches the Qt libraries required by your application.
Ministro is a system wide Qt shared libraries installer/provider
service. It acts as a bridge between your apps and Qt libraries.
Ministro service is release under GPL v3+ license.
Have a look at this [QuickStart video] which demonstrates the process of writing/installing a Qt Application in Android
EDIT
Of course if you want you can select to use deploy local qt libs with your application instead of the device libs. In this case the extra space required depends on the Qt modules you use.