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.
Related
I've developed a SQLite wrapper for React Native using C++. The easiest way to get it working was to include the SQLite amalgamation in the sources. This however increases the bundle size significantly. So I want to give the users the option to use the phone's embedded SQLite version.
The iOS version is working (I exclude the sources if an environment flag is present). Android seems a lot more complicated though. Most of the answers I find on google recommend using the amalgamation path. It seems however it is possible to use the phone's SQLite version (it comes by default with the NDK).
I'm currently compiling the amalgamation via CMake.
I'm an Android noobie, would someone explain it like I'm 5 how can I link/access the SQLite headers from my NDK C++ code? Maybe I should just leave the sqlite.h header file and it will link with the phone's version?
EDIT 1: It seems leaving the header file only, does not work. I've also ran into this Hacker News thread. Some of the comments seem to suggest it is not really possible to access things like curl/sqlite/etc from the NDK code. Any thoughts?
Thanks a lot!
Edit 2: I found a link that might work https://blog.katastros.com/a?ID=00200-fd6cd935-b779-4f44-9b4c-efad582167e1
After much fumbling around I've come to the conclusion there is no way to achieve linking the phones sqlite via c++. It is also probably best so, old android versions have outdated versions, vendors also modify the running sqlite versions and they are full of old bugs and broken stuff.
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
I have built an interactive taxonomic key and the output is a java applet. I want to covert it onto an app that can be used locally ie on phone for example with no connection to the internet (its important as people on project are working in remote locations).
My question is can I edit the java applet in Android studio? Willing to learn just want to know what the best approach is. later would need to work on it being available on IOS devices too.
Thanks, Amanda
Java applets and Android apps have nothing in common with each other, other than language. The UI and input frameworks are totally different. You could share some of the logic of the app if you put it into a jar file, but you won't be able to share anything else. And Java doesn't run on iOS, so that's totally out.
Also, not sure why you tagged this javascript. Java and javascript are totally different languages. A Java applet has nothing to do with javascript.
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.
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)