[Android-development] How to access bundled assets?
BogDan
bog_dan_ro at yahoo.com
Mon Sep 29 13:04:46 CEST 2014
Hi,
You can't access assets using fopen, you must use QFile or to use the NDK/SDK APIs.
Cheers,
BogDan.
P.S. It's quiet because, well, it just works ;-)!
----- Original Message -----
From: Harri Pasanen <harri at mpaja.com>
To: "android-development at qt-project.org" <android-development at qt-project.org>
Cc:
Sent: Monday, September 29, 2014 1:58 PM
Subject: Re: [Android-development] How to access bundled assets?
On 29/09/2014 12:30, Harri Pasanen wrote:
> I need to add some files to the deployed package.
>
> https://community.kde.org/Necessitas/Assets
>
> Explains it nicely. (Note that I was unable to find this info in the
> official Qt docs.
> I looked at
> http://qt-project.org/doc/qtcreator-3.2/creator-deploying-android.html
> and http://qt-project.org/doc/qt-5/deployment-android.html)
>
> However, I have a need to open the deployed file with fopen();
>
> I thought that QUrl("assets:/data/myfile.dat").path()
>
> would give the path required for fopen(), but apparently not, hence
> this mail.
>
> Any advice?
>
> Thanks,
>
> Harri
Never mind, if I'm correct accessing asset files from native code is
difficult, so I'll find a workaround that can use QFile which should do
the difficult part for me.
Harri
PS. this list would be awfully quiet without me...
_______________________________________________
Android-development mailing list
Android-development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/android-development
More information about the Android-development
mailing list