You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an HTML file stearmingAssets/html/WidgetTemplate.html. This file includes some placeholder text that is set at runtime to cater to different users(e.g. {APP_TOKEN} and {USER_ID}
I set these values at runtime by taking all the content from the WidgetTemplate.html and replacing the placeholders with the respective value. I then create a new file widget.html with the new content.
The Problem
On iOS, the whole process works smoothly. I can Write/Read into/from the streamingAssets path.
But on Android, it seems that it's read only. So I cannot do that. I have to write the file into the persisitentData path. And unfortunately, this path is not accepted by Gpm.WebView.
The error thrown by Gpm.WebView due to not using streamingAssets path for Android.
- [GPM][WebView][Android][WebViewManager] The custom scheme should be started by 'file:///android_asset/'. (file:///storage/emulated/0/Android/data/com.bitburst.BitLabs/files/Widget.html)
- OnAsyncEvent : {"callback":0,"callbackType":0,"error":"{\"domain\":\"WebViewManager\",\"code\":\"INVALID_URL\",\"message\":\"Invalid file path.\"}","scheme":"gpmwebview://webViewCallback"}
- JsonException: Can't assign value 'INVALID_URL' (type System.String) to type System.Int32
Additional context
I can't use GpmWebView.ShowHtmlString either, because the HTML I am trying to render uses some CSS and Javascript resources with relative URLs, and thus I it needs a to launch with a Base URL. And as far as I know, GpmWebView doesn't support adding a base URL. (That is actually a good feature request as well).
The text was updated successfully, but these errors were encountered:
Service
Version
2.2.6
Summary
Context
I have an HTML file
stearmingAssets/html/WidgetTemplate.html
. This file includes some placeholder text that is set at runtime to cater to different users(e.g. {APP_TOKEN} and {USER_ID}I set these values at runtime by taking all the content from the
WidgetTemplate.html
and replacing the placeholders with the respective value. I then create a new filewidget.html
with the new content.The Problem
On iOS, the whole process works smoothly. I can Write/Read into/from the streamingAssets path.
But on Android, it seems that it's read only. So I cannot do that. I have to write the file into the persisitentData path. And unfortunately, this path is not accepted by Gpm.WebView.
Any way to fix that?
Screenshots/Code
The code I use to read the template file:
The code to write into a file and use with Gpm.
The error thrown by Gpm.WebView due to not using streamingAssets path for Android.
Additional context
I can't use GpmWebView.ShowHtmlString either, because the HTML I am trying to render uses some CSS and Javascript resources with relative URLs, and thus I it needs a to launch with a Base URL. And as far as I know, GpmWebView doesn't support adding a base URL. (That is actually a good feature request as well).
The text was updated successfully, but these errors were encountered: