no touch when using local file:// and pull-to-refresh
Describe the bug
when unsing "$pull": { "type": "$reload" } in an action and the background is an html with url of file://... the app loses touch
Example Jasonette Document URL
{
"$jason": {
"head": {
"title": "Some Title",
"actions": {
"$foreground": { "type": "$reload" },
"$show": { "type": "$render" },
"$pull": { "type": "$reload" }
}
},
"body": {
"background": {
"type": "html",
"url": "file://index.html",
"style": { "background": "#111111", "progress": "#fd4f00" },
"action": {
"type": "$default"
}
}
}
}
}
for index.html, you can curl -o index.html this
To Reproduce Steps to reproduce the behavior:
- set the hello.json to the above
- get the index.html in the file/ area
- run
- try to move around the page or tap
then change the url from index.html to the url. it will allow touch and run just fine
Smartphone (please complete the following information):
- Device: Pixel
- OS: Android 6, 7 8, 9, 10
Compilation:
- master and develop branches
In the meanwhile, you can try whitout $pull action, and the touch should work, but, you would't have $pull. Im working on a solution
Hello, i have similar issue. Have you found solution?
Ok we will have this issue revised so we can find out why this is happening and if can be solved
Thanks a lot) And one more problem but offtop)
When i build APK with Webview, i want to use html5 camera on my website.
When i test application on usb connected phone through android studio, all is fine, permissions for camera works and camera swithes on.
But when i build apk file, download it to my phone and install it, application doesnt require any permissions, and camera doent work, till i manually set permission through phone settings -> applications.
How can i switch camera permissions during installing? In AndroidManifest i use 22 SDK version/
Thank you =)
Please check latest version in develop new permissions were added to the manifest :)
No results, unfortunately, i`ve got new develop version, but there are no permissions
In AndroidManifest added rules:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
I`ve added to JasonAgentService.java:363 rows:
agent.setWebChromeClient(new WebChromeClient() {
@Override public void onPermissionRequest(final PermissionRequest request) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
request.grant(request.getResources());
}
}
And got error when trying acces to camera:
E/cr_VideoCapture: allocate: manager.openCamera:
java.lang.SecurityException: validateClientPermissionsLocked:1066: Caller "com.jasonette" (PID 10229, UID 25387) cannot open camera "1" without camera permission
at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:747)
at android.hardware.camera2.CameraManager.openCameraDeviceUserAsync(CameraManager.java:405)
at android.hardware.camera2.CameraManager.openCameraForUid(CameraManager.java:567)
at android.hardware.camera2.CameraManager.openCamera(CameraManager.java:495)
at fQ3.startCaptureMaybeAsync(chromium-Monochrome.aab-stable-443006623:11)
Caused by: android.os.ServiceSpecificException: validateClientPermissionsLocked:1066: Caller "com.jasonette" (PID 10229, UID 25387) cannot open camera "1" without camera permission (code 1)
at android.os.Parcel.createException(Parcel.java:1967)
at android.os.Parcel.readException(Parcel.java:1921)
at android.os.Parcel.readException(Parcel.java:1871)
at android.hardware.ICameraService$Stub$Proxy.connectDevice(ICameraService.java:343)
at android.hardware.camera2.CameraManager.openCameraDeviceUserAsync(CameraManager.java:369)
at android.hardware.camera2.CameraManager.openCameraForUid(CameraManager.java:567)
at android.hardware.camera2.CameraManager.openCamera(CameraManager.java:495)
at fQ3.startCaptureMaybeAsync(chromium-Monochrome.aab-stable-443006623:11)
I tested with this json on iOS and it seems it needs at least an empty sections property before the backgroundproperty.
I havent tested on Android yet but maybe this would work.
{
"$jason": {
"head": {
"title": "Reload webpage on pull",
"actions": {
"$pull": {
"type": "$agent.request",
"options": {
"id": "$webcontainer",
"method": "(() => window.location.reload())",
"params": []
}
}
}
},
"body": {
"sections": [{"items": [{}]}],
"background": {
"type": "html",
"url": "file://web.html",
"action": {
"type": "$default"
}
}
}
}
}
I tested with this json on iOS and it seems it needs at least an empty
sectionsproperty before thebackgroundproperty.I havent tested on Android yet but maybe this would work.
{ "$jason": { "head": { "title": "Reload webpage on pull", "actions": { "$pull": { "type": "$agent.request", "options": { "id": "$webcontainer", "method": "(() => window.location.reload())", "params": [] } } } }, "body": { "sections": [{"items": [{}]}], "background": { "type": "html", "url": "file://web.html", "action": { "type": "$default" } } } } }
Not working on Android ((
HAve somebody solved issue ?