As a newcomer to the world of Android and Java, I greatly appreciate your patience in advance!
I'm currently faced with the challenge of passing a file path (which could be a simple string or integer) from an activity written in Java to a WebView that is rendering a static local html file running JS. The complexity arises due to my use of an AR SDK (Wikitude) which requires their own custom WebView (including a CameraSurfaceView) - control over this suite is managed by a JS file loaded by the html document.
I'm open to any solutions as I am unfamiliar with Android development and unsure where to start on this issue. Essentially, I want to select an option in one activity and relay that information to my JS file for loading/rendering assets. In a web app, you could use templating to insert dynamic variables into your html (e.g. erb in ruby or moustache in JS).
If there's no direct way to template Java into a JS file, my current idea involves writing a JSON object using JsonWriter in the activity and then loading that file in the JS. However, I'm struggling to understand how to manage internal/external storage in Android in relation to the assets folder of my app - any guidance on this would be much appreciated.
This explanation is kept intentionally broad, but I can provide code upon request.