I am using Ubuntu 19.04 as OS, and I developed a small application using Qt5 and QML.
I have been researching a way to transfer what I built so far into my Android phone Note10 but also on additional Android devices a little bit older.
I found really a lot of tutorials on line (YouTube) but every tutorial has a different way to do that. I have never done it before and am looking for a super basic standard procedure.
I went on the official documentation but the link goes nowhere.
How can I easily and using a step-by-step procedure deploy a basic application on my Android given the OS I am using and the fact that I programmed it in Qt5 and QML?
Things to note: In my application I implemented the smtp library that is possible to find [here]
(https://github.com/bluetiger9/SmtpClient-for-Qt) and wanted to understand if there are any other things I should do since I used that external package.
I simply copied and pasted the .h and .cpp files inside my Sources and Headers folder together with the other files of the application.
Also I found this very old post and was wondering
if the procedure is still the same or if there is an additional step-by-step to follow.
Thank you very much for pointing in the right direction on this matter
Related
I've been developing an Android application with Android Studio and now I need to be able to open it with Xamarin.forms in Visual Studio (it's a task that my teacher gave me, and it's because a classmate has been creating the iOS version and now we will combine them into one project).
I have to say that I'm pretty much a noob and been looking a few tutorials that talk about Dependency Service and other stuff, but don't seem to quite cover what I'm looking for (or, at least, not clearly enough).
If you have a precise video that explains simply how to do this, I would be grateful if you share it with me.
I thank you for your time and wish you a great day :)
It is impossible at even now in current version of Visual Srudio .
Every file in Xamain is different with Native Android . The Java code can not be directly copyed to use in Xamarin , you should translate them to C#.
Having a look at this document: Porting Java to C# for Xamarin.Android .
There are two ways to port Java code to C#. The first way is to port the code manually. ..The second porting methodology is to try and automate the process by using a code converter...There is often a non-trivial amount of work involved with bootstrapping an automated code conversion tool, and this may prove to be a barrier to use. In many cases, it may be simpler and easier to port Java to C# by hand.
I'm about to port a Delphi Windows app to Android, for the first time ever, so please forgive if the question is stupid.
The app has an embedded database file (well, technically, it's jus an Excel workbook, but that's not the main problem). The problem is that the previous code
var
ResStream: TResourceStream;
begin
ResStream := TResourceStream.Create(HINSTANCE, 'ID_GCDB', RT_RCDATA);
...
end;
does not compile. RT_RCDATA is defined in the unit Windows which the mobile compiler, not exactly surprising, never heard of. Is there a way to extract resources in Delphi under Android and if yes, is there portable way to do that, meaning one that just works on Android and Windows?
The documentation explains what you need to do:
Resource files are only supported for desktop platforms. In mobile platforms, the OS does not accept loading from resource files. To load files to a mobile device use a different approach, by loading the files externally.
The same documentation topic linked to above then gives step by step details of how to use the deployment manager to make sure your asserts are deployed with your app. The documentation topic then goes on to provide a simple code sample demonstrating how to locate the asserts.
I posted this question previously on G+ Android community, but no answer so far.
It's about downloading and loading native libraries.
I've been reading around and what I learned it that, it is in theory possible to download a ".so" file, and load it from using System.load method.
But I also read the following here (https://groups.google.com/forum/#!topic/android-ndk/0uY4qgam1Ws) : "Also you should not be able to load an .so off the SDCARD on an ARM system by normal means, as ARM supports non-executable pages and android's implementation of mmap() refuses to map executable pages backed by a noexec file system."
It is a bit confusing for me to fair (a lot confusing actually).
So here is my question : is it or is it not possible, on a production device, to download a library, stick it somewhere on the phone, and load it then use it with JNI.
And if so, are we sure that it will still work in the future with new versions of Android?
Like, what is the official recommandation of Google about this?
Yes, this works on production devices. But it doesn't work on all devices if you put it in /sdcard, you should use the app private/internal folders (that correspond to /data/data/com.example.app/something) for this. You might need to do the equivalent of chmod +x on the file after creating/downloading it though.
I'm not sure if there's any official Google recommendations about it though, but the post you linked pretty clearly indicates that this is intended to work and there's no plans to break it.
Well I've been coding in qt for about 6 months now and I have a pretty good grasp of QWidget and c++ coding for desktop apps but I run a small company and we are developing phone apps and desktop apps for a project that we are doing and as the project manager I fell that qt is the answer for not having to have separate teams coding for android and iPhone.
So the solution is coding in qt. but I'm a little confused about a few things. I see that a lot of the event handling of button clicks and things are handled actually in qt quick but as our apps would be quite complex in the bg we would have to be able to code in c++ the QWidget conventional way. So my question is:
Which is better QWidget or Qt quick better for developing our apps which should be compatible across most platforms, mostly tablet and smart phones.
If we go the qt Quick way then can you simultaneously use qt quick for most of the visual and then link up these files to c++ files (the engine of your app)? m if so any examples of how I might get started on learning how to do this.
Is there any really good resources on how to develop these phone apps, tutorials and things like that, as I'm a little worried about the lack of resources for learning.
Am I correct in thinking that if we did go with qt quick that these apps would also be compatible with Ubuntu phone?
I've developed applications for maemo and meego, and I'd say that QtQuick is better and much easier.
I'd say that QML and C++ qt-backend introduces an MVC pattern where QML is View and C++ is model and controller. QML is not just a script you can run. You need an object of QDeclarativeScript in C++ and pass main qml file to it to be able to start. So, anyway you will run C++ application first, which will parse QML script. To the last part of question: you may create C++ classes to export into QML and use it there. It is very simple, you may read official guides of QtQuick, it is goodly explained there.
Here is nothing special. Simply import files into qml-project and just use controls, containers and etc. Each project, be it ubuntu phone or sailfish, have a tutorials, guides and wiki. More, I'm KDE contributor and developed plasma widgets on QML - the same thing here, - all you need is to import and just use.
Of course. Why not? But you need to have a toolchain for QtCreator to be able to compile your project for target architecture and be able to run it there.
I want to use Android for a system I have in order to use it as an embedded system that would run a specific application (which runs in chrome browser). However, this will not use Android in ordinary way, but rather hack around it so that libraries like OpenCV and packages like Chromium can be installed on the Android's Linux kernel. In addition, I would also need to figure out a way that would allow a USB camera to be supported.
I have done some research on this, but I am getting nowhere. Would somebody recommend resources that are relevant to this issue, or suggestions on how to approach it? Your feedback would be much appreciated.
Edit1: I am not intending for this question to be too broad. I only want to get more ideas on how you add libraries like OpenCV to Android, and whether there is a way to install the chrome browser as well.
Edit2: the Android system is on the Snapdragon platform.
Both Chromium and OpenCV can be built on Linux, have you tried compiling them from source on Android and failed? What error did you get? Here's a link for cross-compiling Chrome for ARM processors:
http://code.google.com/p/chromium/wiki/LinuxChromiumArm
I would use http://www.android-x86.org/ first and see if it works there before trying to run it on ARM so that you can fail faster if it doesn't work.
You might want to spend some time with ROM hackers to get more insight. Ideally, you want to find some people who are doing something similar so you can work with them. Take a look at:
http://forum.cyanogenmod.com/
http://forum.xda-developers.com/
A lot of what those guys are doing does not apply to what you are looking for, but they do get much deeper into the OS than most programmers. You might get lucky, and not have to modify the Android source code yourself as thinksteep mentions.