http://localhost/ doesn’t work (at least not on Android 9).
Crash with Companion & APK :upside_down_face:.

1 Like

I try to calculate the total duration of many audio tracks (from the assets) using this script from @Taifun in → duration.html:

Unfortunately this does not work on Android 9.
Neither with http://localhost/ nor with https://android_asset/.

Calling an HTML (test.html) is not a problem on any Android version (regardless of whether http://localhost/ or http://android_asset/ is used, of course with the APK).

Does anyone have an idea where the problem could be?

what is the reason of the crash? use logcat to find it out…

Yes of course. But I’ve now copied both relevant files to the ASD and access them from there.
Now it works fine also on Android 9.

:upside_down_face: :upside_down_face: :upside_down_face:


Of course with Companion and the APK.

great that you found a workaround, however for the Niotron team it might be interesting to know, why you got that crash on Android 9 to better understand the issue and probably fix a bug…



Note: On some devices I have to use a full path (file:///...) to the ASD (e.g. on a Nexus 5X, Android 8.1).

That shouldn’t actually be a problem. But the WebViewer component then requests READ permission. :upside_down_face: This permission is neither required nor do I want to allow it (I always remove storage permissions for my app from the Manifest). So I had to do it differently again and copied the two relevant files (duration.html and jquery-…min.js) into the PrivateDir and accessed them from there.

Fortunately, no permission is requested for this path (PrivateDir). :pray: :wink: