shannah / DIYRemote

Create your own universal remote control using HTML
54 stars 4 forks source link

File not found error #5

Open Philippe3869 opened 3 years ago

Philippe3869 commented 3 years ago

Hello shannah,

Thanks for this app, it's a very great idea !

Unfortunately I can't give the correct location of my custom html page. I made an DCIM/IR.html page. File information give me : Uri : content://com.android.externalstorage.documents/document/primary%3ADCIM%2FIR.html Document id : primare:DCMI/IR.html I tried with these values, but it gives me net::ERR_FILE_NOT_FOUND and net::ERR_UNKNOWN_URL_SCHEME And with other path : file:///primary:DCMI/IR/html -> net::ERR_FILE_NOT_FOUND file:///DCMI/IR/html -> net::ERR_FILE_NOT_FOUND

Important point : I am using /e/ OS (https://e.foundation/, it is a fork of LineageOS) /e/ version 0.17 (Android 9 Pie, on Samsung Galaxy S5).

Is it possible to use local html file instead of web file ? Have you an idea for the correct path ? Or perhaps it is a limitation from /e/ ?

Thanks

Philippe

shannah commented 3 years ago

I haven't tested with file:// URLs. Only http:// urls. You need to post your template on a web server that can be referenced by http

Philippe3869 commented 3 years ago

Thanks for your quick answer. I don't really think the local file could be a problem, I think every browser can load local HTML file ? If it is one problem, it is blocking for my use case. Anyway I tested using a web server : whereas the page can be displayed in the default browser, DIYRemote display a blank screen, no error, and when I come back to settings, the path is empty. Is it possible for you to check using local file ? How can I help you to find why the screen is blank ?

shannah commented 3 years ago

Local files have added security constraints on them by and Android webview. Some APIs are unavailable.

Philippe3869 commented 3 years ago

I tested using a web server : whereas the page can be displayed in the default browser, DIYRemote display a blank screen, no error, and when I come back to settings, the path is empty. How can I help you to find why the screen is blank ?

shannah commented 3 years ago

What kind of URL? https://, http://, etc...

Philippe3869 commented 3 years ago

The URL I use is https://192.168.1.20/IR.html

shannah commented 3 years ago

It might be objecting to a self-signed certificate. Try using plain http://