[Android-development] How to access bundled assets?

Harri Pasanen harri at mpaja.com
Mon Sep 29 12:58:55 CEST 2014


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...




More information about the Android-development mailing list