How do I raise an Android Intent using Qt Necessitas SDK? - android

I'm developing an Android application using C++ and Qt Necessitas SDK.
My application should load/save files and I want to handle it using Android actions ( so that I can target Google Drive as well as Dropbox etc... )
The question is... how do I raise Intents ( and which Intent should I raise to share/import my files ) from C++ ?
Rationale: how do I load and save files ( either custom mimetype, or pdf ) using Qt Necessitas on Android?

I'm a complete newbie to java and I know nothing of JNI, but apparently this link will explain how to [use the JNI to] use intents in your QT for Android applications: http://community.kde.org/Necessitas/JNI
It looks pretty straightforward, but I'm afraid I don't yet understand what I'm reading enough to give you a better answer to your question.
Sources:
groups.google.com/forum/?fromgroups=#!topic/android-qt/U3eHis9mLrg
groups.google.com/forum/?fromgroups=#!topic/android-qt/UpgBRz8Imwo
Another option for a some things (opening websites, making phone calls, possibly opening local PDFs and images) would apparently be QDesktopServices::OpenURL() - although that seems to give open-only access (ie, opening the resource but not pulling any data back from it).
I'm interested in this so that I can use the barcode scanner app "ZXING", which has an intent-as-url at http://zxing.appspot.com/scan - I don't know what other little secrets are out there...
HTH until someone can give you a better answer
(2 links disabled due to insufficient reputation)

Related

Qt5 - QML : How to deploy an application on an Android device

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

Delphi: Extract resources under Android

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.

Compile AS3 text to executable code inside a Air App?

GOAL : I want to create a free educational tool that will allow you to write code and execute in the same app. ( preferably AS3 )
Essentially I want to be able to have a IDE written inside an Air Application and then run the code / execute inside the same application.
I'm not looking to create external files all i need is to run/execute the code from the text field. I was wondering if it's possible to use #mxmlc inside Air to do live coding.
Or perhaps any ANE's or native Android methods to archive the same goal. ( im assuming if it's possible to archive with android native code, then an ANE could be easily created )
Also i though maybe creating a limited library of all the essential Flash display library - so once i hit run in the Air app it will scan all the source code, and using a string search algorithm -> execute a list of precompiled classes inside the same app ( graphics API, display List, basic math logic, etc. ). I understand that method doesn't have to specifically target the AS3 language. But i would like to avoid creating my own language for that purpose.
Not familiar with mxmlc but i did read somewhere that it's possible to execute code on a server with maven. In that case would it be possible to send the user written source code to the server, receive back the compiled SWF file and upload it back to the app in the run-time ?
You could look at http://eval.hurlant.com/ http://eval.hurlant.com/demo/ but I'm not sure if it'll be working in Air / Android

Android Cross-Platforming

I want to know more about Cross-Platform. I'm currently working on my thesis and decided to make an Android Application but not all target users uses Android device. So, We've come up with an idea to Cross-Platform the android application.
I have read the same topic but it didn't get to me too well. iOS / Android cross platform development. I want to know if there is another way than using the frameworks discussed in the link.
I want know what is the best/shortest way to cross platform a Android Application?
Cross Platform tools are in my opinion not a good idea at all. Android is Java, and iOS is Objective C. Android can use NDK to use a C/C++ library so theoretically if you did most of your code in C/C+ it could be used on both sides. I think two natives is more in order. Study NDK to see what could run on both devices. Lets say you built your app as a C++ Library except for UI interactions. Then in theory the library should work on both sides. C/C++ a lot easier on iOS than android however.
Also it really depends on the dependencies your app will have. Lets say you want to use a library but its only available in Java or C++ how does this effect your decision.
You might also consider designing your app so that it just captures data on the devices and the actual processing of the data takes place in a web service.
Another way is use Mobile Web HTML5 Framework like Phonegapp, Sencha touch and more.
Although web technologies don’t perform as well as native, but it is a useful thing that you can try.
See Choosing Mobile Web HTML5 Framework and http://operationproject.com/2011/adventures-in-html5-part-one/
Android application are apk files that are basically zip file that contains dex/odex files and all other resources that you may wish to add.But I think you can use any coding language to develop as long as you have IDE that converts your code to apk and dex .And most important of all your programming language must support corresponding api or must have something similar to cross compile.The reason Google used Java for Android was they felt it is convenient to do it(read it during case Google v/s Oracle)
Personally I feel cross-platform is good since it increases the developers base and understanding of the System (here Android).And I think the same analogy would go with other Systems as well.

android, zxing, styling the response

alright so I've searched for quite sometime on this and I can't seem to find just the kind of answer that answers my questions...so here goes nothing! And mind you, I'm new to android dev soooo I may have stupid questions that some of you may get irritated at, but we all have to learn some how right?
I'm trying to develop an application that will allow users to scan in a QR code and then display the information that is encoded into it in a nice organized way.
It seems like ZXing doesn't like the idea of integrating their code with other applications e.g. you have to use their application from the market and point to it via intents... well if I do it this way, can I decode the contents so that I can have access to the content and do as I want with it?
What would I have to include in my project from the ZXing folder that I downloaded to make it all work? And would I have to build all of the objects with in that folder in order to use them in my project?
Any help would be greatly appreciated. Thanks!
I have decided to go other routes.
The "Android way" is to do everything via intents.. However, zxing is a special case. You can follow the intent route, or you can (as it's apache licensed), download the source code and adapt as necessary. We did that for the game Barcode Beasties ( mandatory self promoting download link here : https://market.android.com/details?id=com.fawepark.android.barcodebeasties ) and that meant we could also brand the scan page as well.
If you want use the software integrated, then just download the source and either compile it as a library or just include it in your source folder as another folder.

Categories

Resources