var
SaveStream: TStream;
I: Int32;
begin
SaveStream := URLSaveStream(ApplicationConfig(‘mysave.bin’));
try
I := 666;
SaveStream.WriteBuffer(I, SizeOf(I));
finally FreeAndNil(SaveStream) end;
end;
- The above example shows an error on Android
var
SaveStream: TStream;
I: Int32;
begin
SaveStream := URLSaveStream(ApplicationConfig(‘mysave.bin’));
try
I := 666;
SaveStream.WriteBuffer(I, SizeOf(I));
finally FreeAndNil(SaveStream) end;
end;
That’s a bit weird, since ApplicationConfig
shall never be castle-android-assets:...
. It is initialized on Android to point to internal directory on Android where we can store files.
The castle-android-assets:...
, which on Android equals ApplicationData
and castle-data:/...
, is indeed read-only.
Did you maybe customize the ApplicationConfigOverride
to point to castle-data:/
or such? If yes → don’t do this, ApplicationConfigOverride
has to be a URL that is writeable. If you didn’t, please submit a complete testcase to reproduce the problem.