Search found 818 matches

by Ats
Wed May 14, 2025 5:19 pm
Forum: Bug reports
Topic: Problem with external file location on Android
Replies: 7
Views: 69

Re: Problem with external file location on Android

* Little sidequest * In order to test the read/save file behavior on Android, I started making a modification of the FileDemo to turn it into some paint program. It reads the TestFile.txt at loading, but I don't know how to save the drawing to that file once it has been modified. Can't we save plai...
by Ats
Wed May 14, 2025 8:32 am
Forum: Bug reports
Topic: Problem with external file location on Android
Replies: 7
Views: 69

Re: Problem with external file location on Android

Hahaha, it's not that simple :lol: After verification, this works nicely to obtain /data/user/0/com.mydomain.filedemo/files/TestFile.txt: String dataPath = context.getFilesDir().getAbsolutePath() + "/"; This is for /storage/emulated/0/Android/data/com.mydomain.filedemo/files/TestFile.txt: ...
by Ats
Tue May 13, 2025 5:21 pm
Forum: Bug reports
Topic: Problem with external file location on Android
Replies: 7
Views: 69

Re: Problem with external file location on Android

Here's the usage for internal path (config file...): https://developer.android.com/training/data-storage/app-specific#internal File file = new File(context.getFilesDir(), filename); And the same for external path (editable file...): https://developer.android.com/training/data-storage/app-specific#ex...
by Ats
Tue May 13, 2025 5:08 pm
Forum: Bug reports
Topic: Problem with external file location on Android
Replies: 7
Views: 69

Re: Problem with external file location on Android

So I think it is set in zgameeditor-master\Build\android\ZgeAndroid.pas: procedure Java_org_zgameeditor_Zge_NativeInit( env : PJNIEnv; thiz : jobject; ExtPath : jstring; DataPath : jstring; LibraryPath : jstring);cdecl; var P : PAnsiChar; begin P := env^.GetStringUTFChars(Env,ExtPath,nil); GetMem(An...
by Ats
Tue May 13, 2025 4:44 pm
Forum: Bug reports
Topic: [FIXED] Little problem with Application title for Android
Replies: 10
Views: 78

Re: [FIXED] Little problem with Application title for Android

There's still one little problem, as building the APK (debug) from ZGameEditor also creates run.bat, but with the $title$ name on the first line, instead of the $filename$: "C:\Android\android-sdk-windows\platform-tools\adb" install -r "C:\Dropbox\System\ZGameEditor\Projects\FileDemo\...
by Ats
Tue May 13, 2025 4:25 pm
Forum: Bug reports
Topic: Problem with external file location on Android
Replies: 7
Views: 69

Problem with external file location on Android

It's one problem after another :lol: So, in order to confirm that my code change regarding ReadAssetFile for Android 64 is working , I'm trying to run the FileDemo on Android. And surprise, it's looking for TestFile.txt in a folder that requires root access: /data/user/0/com.mydomain.filedemo/files/...
by Ats
Tue May 13, 2025 10:02 am
Forum: Bug reports
Topic: [FIXED] Little problem with Application title for Android
Replies: 10
Views: 78

Re: Little problem with Application title for Android

Perfect. Thanks!
Now I can continue with the fileDemo on Android :wink:
by Ats
Tue May 13, 2025 8:59 am
Forum: Bug reports
Topic: [FIXED] Little problem with Application title for Android
Replies: 10
Views: 78

Re: Little problem with Application title for Android

Almost. Now it exports the project name + the file extension: <project name="FileDemo.zgeproj" default="help"> So I think it should be: Lookups.Add('$filename$', ChangeFileExt(ExtractFileName(CurrentFileName), '') ); I hope it will suppress the whole .zproj extension, and not lea...
by Ats
Mon May 12, 2025 7:59 pm
Forum: Bug reports
Topic: [FIXED] Little problem with Application title for Android
Replies: 10
Views: 78

Re: Little problem with Application title for Android

You wrote this in frmEditor.pas: Section := 'Project: ' + ExtractFileName(CurrentFileName); so I guess CurrentFileName is the complete path and it should be Lookups.Add('$filename$', ExtractFileName(CurrentFileName) ); instead of Lookups.Add('$filename$', CurrentFileName ); ?? I tried to reinstall e...
by Ats
Mon May 12, 2025 4:54 pm
Forum: Bug reports
Topic: [FIXED] Little problem with Application title for Android
Replies: 10
Views: 78

Re: Little problem with Application title for Android

It wasn't Application.exename :lol:

Now I get
<project name="C:\Users\Ats\Desktop\ZGameEditor\ZGameEditor.exe" default="help">

Might be CurrentFileName, then?
by Ats
Mon May 12, 2025 4:12 pm
Forum: Bug reports
Topic: [FIXED] Little problem with Application title for Android
Replies: 10
Views: 78

Re: Little problem with Application title for Android

I've made the pull request.
It's just frmEditor.pas:
Lookups.Add('$filename$', Application.exename );
and build.xml:
<project name="$filename$" default="help">

can you build a new ZGameEditor.zip?
by Ats
Mon May 12, 2025 8:20 am
Forum: Bug reports
Topic: [FIXED] Little problem with Application title for Android
Replies: 10
Views: 78

[FIXED] Little problem with Application title for Android

I was trying to build the FileDemo for Android but got this error: BUILD FAILED C:\Android\android-sdk-windows\tools\ant\build.xml:1135: The following error occurred while executing this line: C:\Android\android-sdk-windows\tools\ant\build.xml:1147: Value for 'output' is not valid. It must resolve t...
by Ats
Tue Apr 22, 2025 10:24 pm
Forum: General discussion
Topic: How to use SampleImport ogg?
Replies: 1
Views: 183

How to use SampleImport ogg?

I've been trying to test ZPlatform_Android.pas ReadAssetFile on Android, but I'm stuck. ReadAssetFile is specific to Android and is called by Platform_ReadFile. Which is used by ZClasses.pas TZInputStream.CreateFromFile So in the end, I was trying to read an ogg file. And I'm a bit stuck. Is that ho...
by Ats
Tue Apr 22, 2025 9:22 pm
Forum: Bug reports
Topic: WebOpen OnResult not working on Android
Replies: 1
Views: 139

WebOpen OnResult not working on Android

I was trying out my modification of ZPlatform_Android.pas Platform_NetOpen , but I wave no way of telling if it's working, because WebOpen's OnResult doesn't seem to trigger. I tested YakYak Reader with both CallVoidMethodV and CallVoidMethodA on 32 and 64 bits sytems, but it's not able to retrieve ...
by Ats
Tue Apr 22, 2025 9:29 am
Forum: General discussion
Topic: Google Play New problem : 64bits
Replies: 273
Views: 96104

Re: Google Play New problem : 64bits

With the TRTLCriticalSection fix, the game can now run for several minutes. Sometimes it still crashes, not as frequently as before, but the crashes remain random. I’m not using Platform_NetOpen, but I assume reading an embedded 3DS file uses ReadAssetFile. Since we’ve already replaced all the other...