[fpc-pascal] Android porting ideas

Michalis Kamburelis michalis.kambi at gmail.com
Tue Feb 23 07:16:45 CET 2016


>  

>

> This will probably make more sense when I learn about the asset manager
more. I think I read there is a format like asset:// for file URL’s.

  

Remember that the "asset:/..." URL is just implemented in Castle Game Engine
(see http://castle-engine.sourceforge.net/tutorial_network.php ). It's not
something recognized by other APIs (Android or not). Although Qt has analogous
concept (http://doc.qt.io/qt-5/platform-notes-android.html#assets-file-
system).

  

If you want to do it yourself: the AssetManager functions are part of
CastleAndroidInternalAssetManager , which are bindings for C API documented as
part of Android NDK here:
http://developer.android.com/ndk/reference/group___asset.html . These are the
gory details to access assets:)

  

The unit CastleAndroidInternalAssetStream wraps Android assets into a Pascal
TStream, and converts URL (more-or-less strips/adds the "asset:/..." prefix)
by URIToAssetPath / AssetPathToURI functions.

  

Regards,

Michalis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160222/22cfdf49/attachment.html>


More information about the fpc-pascal mailing list