Deploying PyQt5 application to Android via pyqtdeploy and Qt5 - android

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.

Related

Installing NDK (arm-linux-androideabi-gcc) on Android (Remix OS)

I'm trying to install some python packages (pillow) for QPython on Remix however I get the error that arm-linux-androideabi-gcc does not exist.
I googled and I think I need NDK, however looking at the website (https://developer.android.com/ndk/downloads/index.html) I couldn't find a way to do this on android.
Any help is much appreciated, thank you!
Installing the NDK on Android? As in running the NDK compilers on an Android device? We don't support Android as a host OS for the NDK.
Check out AIDE android ide from the Google playstore
Despite Dan's answer, which I respect. It's not entirely accurate. The Android ndk build system doesn't allow for for host to be set to the $TARGET_ARCH, but building it manually in much the same way you would for any custom toolchain is entirely possible.
I should note that I have only done this for gcc, and have not attempted to do so with clang.
From Googles ndk toolchain repo just take the essentials needed, gcc, binutils, gmp, mpfr, etc and set your host and target to the ndk toolchain gcc. Use the ndk sysroot as build-sysroot, and then just add your compiler flags and with a little fiddling you should get it.
Id be happy to post more, it's been a project of mine to build Android on Android, also i highly recommend adding static versions of the ndk libs, as the android system doesn't have a c++ lib, and a few others. You may have to build some manually using aosp build system
I built it with stage-one flags so that the binaries would be static, as you never know when android might remove a lib that your toolchain depends on.
I encourage you to try, as an added benefit you will then he able to build many useful android native binaries that usually aren't available without editing the aosp source. Also having the ability to build binaries on the fly is very useful

Which is the easiest way to migrate a C++ application for Android and iOS?

I have a C++ application that uses Qt 4.8 and OpenCV 2.4.2. It is developped using Visual Studio. I have to migrate this application for Android and iOS.
Which is the plan to follow? I should make the minimal change to the existing code.
Unfortunately, there’s no easy answer to this. The fact that you’re using Qt is a great start, and using it as much as possible will go a long way towards making your code portable from Windows to other OSes.
I would look at upgrading first to Qt 5, as Qt introduced great support for both iOS and Android.
After that, the build chain is going to be your next obstacle. It looks like the Qt Visual Studio Add-in has an option to export a .pri file from the VC++ project, which would be a very handy starting point. Generate the .pri file and compare it to the project file created by QtCreator for an Android and iOS app, and try to copy the mobile-specific parts into your generated .pri file.
Other potential pitfalls are:
Visual C++ is a much more permissive compiler than gcc (Android) or Clang (iOS and Android)
Your app's dependencies must all be cross-platform as well. I’m sure OpenCV is, but it’s something to keep in mind
On iOS, all libraries must be linked statically

Is it possible to generate a dll with android ndk for testing purposes?

I am developing an app which uses a native library. I would like to test it using a non-android dependent framework like Robolectric.
The problem is, that the native functionality cannot be loaded using
System.loadLibrary("mylib");
because on Windows it looks for "mylib.dll", and I am only able to build libmylib.so which is not compatible with windows.
Is there a way to build a dll (it would be only used for testing purposes ofc)?
If you want to test your application on windows, then you need a *.dll. *.so files are unix "shared libraries" - same functionality as windows' dll.
You have to build your C++ sources with an IDE like Visual Studio, Code Blocks, or anything else that can build sources for windows.
In fact, when building with "ndk-build" for android, you are cross-compiling for an Unix system with an ARM architecture mostly.
When running on windows, you'll probably be on x86 / x86_64.

Move the code from Qt to AndroidSDK

I got used with programming in Nokia's QtSDK (C++) and published a few simple apps in the Nokia's Store. I want to move to Android platform now but am quite confused how to do it in a simple and natural way.
I have a nice working (desktop) app which would perfectly fit for tablet devices. It was written in C++. I have difficulties in understanding how to move that code to Android platform and publish the app in Google's Play Store.
The question is: can it be compiled in QtCreator and would fulfill publish requirements or should it be moved to AndroidSDK? I want to avoid Necessitas plugin.
Thanks.
Qt targets Android, so you don't need to abandon Qt at all. Simply download Qt for Android, add it to available Qt versions and Qt kits in Qt Creator, and follow the documentation to tweak your project to run on Android !

Deploying SWIG dependent dll's with Android Application

I would like to use a .jar file generated by SWIG in an Android application. What is the best way to deploy all of the underlying dll's with the Android application?
In a desktop environment, my PATH variable includes the folder containing these dll's.
DLL is a Windows technology. Android is not Windows. Android is based on Linux. You would be looking for .so libraries. More accurately, you will be looking for the C/C++ source code behind those libraries, so you can cross-compile them for Android chipsets (e.g., ARM). That will be accomplished via the Native Development Kit.

Categories

Resources