[fpc-pascal] Android porting ideas

Michalis Kamburelis michalis.kambi at gmail.com
Mon Feb 22 02:38:30 CET 2016


2016-02-21 23:00 GMT+01:00 Sven Barth <pascaldragon at googlemail.com>:
> Am 21.02.2016 19:36 schrieb "Michalis Kamburelis"
> <michalis.kambi at gmail.com>:
>> >
>> > 1) All the file I/O in the FPC RTL is not available so what possible
>> > work arounds are there for loading data from files?
>>
>> Actually, all the IO in FPC works perfectly. You can read / write
>> files just like on any other Unix (although you need to declare
>> appropriate permissions in the AndroidManifest.xml first ---
>> READ_EXTERNAL_STORAGE , WRITE_EXTERNAL_STORAGE, otherwise access to
>> "/sdcard/..." files will be restricted). For example, config files are
>> just normal files on Android. You only use a special function to get
>> the proper config file location, but this is done for you by CGE, you
>> just use CastleFilesUtils.ApplicationConfig:)
>
> I think he means on FPC's JVM target. There file I/O using Write/Read is
> indeed not implemented.
>

Oh, OK. My comments were indeed about the native target (Android+Arm
communicating through JNI), not JVM. Well, at least I can confirm that
I/O works cool there:)

Regards,
Michalis



More information about the fpc-pascal mailing list