Load JSON files in Debug APK problem

0 favourites
  • 11 posts
From the Asset Store
Source File, music and art pack for Android Negotiator
  • Hello.

    I have a problem with loading JSON into an array when loading the application.

    I use the usual method, as in the examples. Everything works fine on the preview in the browser, but I try to export the Debug APK to look at it on the phone and when starting the arrays just remain empty.

    Why is there such a difference in work? It seems that I did not have such problems before and the arrays were regularly filled, and I have been suffering with this problem for the last week.

    I use r257 beta release.

  • I'm using 3 files/arrays on a released project.

    In this project I'm using files/array as on your image BUT I saw that it sometimes takes more time to load the file/array than to draw the layout, as workaround I'm loading it on my first layout for example.. if you have a menu layout, load your files there..

    Or:

    Create a common event sheet and have on it:

    On start of Layout:

    Is ARRAY X empty? If yes, Request File X

    Is ARRAY Y empty? If yes, Request File Y

    And add this event sheet on your layouts.. so every layout with this event sheet will check on start if your arrays are empty or not.

  • In this project I'm using files/array as on your image BUT I saw that it sometimes takes more time to load the file/array than to draw the layout

    I created a button that loads JSON into an array when touched. To make sure of this version, but, the problem remains the same.

    I also tried the option with a separate event sheet. On the preview, everything works, on the android device no...

  • Can you share your project?

    And how are you debugging it on android?

  • Hi, it's actually an Android worker mode bug. It cannot make AJAX requests currently.

  • Hi, it's actually an Android worker mode bug. It cannot make AJAX requests currently.

    Mine is working.

  • > Hi, it's actually an Android worker mode bug. It cannot make AJAX requests currently.

    Mine is working.

    Congratulations, now try it on an actual Android device.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can try to reproduce the issue by exporting as debug.apk, then using Chrome Android debugging feature.

    Here's the event:

    Here's the error, with Construct 3 worker mode on Android.

    I'll try to help by reporting this issue on the Construct 3 bug tracker.

  • You can try to reproduce the issue by exporting as debug.apk, then using Chrome Android debugging feature.

    Here's the event:

    Here's the error, with Construct 3 worker mode on Android.

    I'll try to help by reporting this issue on the Construct 3 bug tracker.

    Yes, you are right.

    Even not using third-party addons and worker mode set to yes, when debugging it say: "reversed to DOM", so you areright I was not testing using Worker mode.

    My apologies. Next time will make sure before answer.

  • I've finished the bug report.

    Hey klabundee, don't worry about it. 🙂

  • So, this is a bug, right?

    Thank you guys for your attention!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)