I've created a simple (just text, no script) .htm file on a Windows
computer ("testhtm.htm") and transferred it to my Android tablet.
In My Files - Downloads it then appears as "testhtm.htm". Tapping it and
it opens with Chrome (my default browser) as "content:media/external/file/1000000383".
Long tap and select "Add to Home Screen" and an icon appears on the home screen titled "testhtm". And when tapping this it opens in Chrome.
If I now restart (reboot) the tablet and try to open the file by tapping
its icon on the home page it doesn't open and I receive the message:
"Chrome does not have access to the requested resource."
If I then go to My Files - Downloads I find I can open it from there.
And if I then go back to the home page it will now open from there as well.
Why is this?
I have links on my home page to .htm pages located on servers on the
internet which always open with no problems. But .htm files located on
my tablet seem to become inaccessible from the home page after a reboot
until opened from within My Files - Downloads.
Can someone with a better understanding of the Android OS than me
explain what's going on?
In the absence of an authoritative answer, and based on some
googling (I am not a developer of Android apps), I'll offer a
guess.
I suspect that for the content URI in the shortcut (which is a
pointer to a local resource, and AFAICS not the same as afile://
URI)
Malone <[email protected]> Wrote in message:
I've created a simple (just text, no script) .htm file on a Windows
computer ("testhtm.htm") and transferred it to my Android tablet.
In My Files - Downloads it then appears as "testhtm.htm". Tapping it and
it opens with Chrome (my default browser) as
"content:media/external/file/1000000383".
Long tap and select "Add to Home Screen" and an icon appears on the home
screen titled "testhtm". And when tapping this it opens in Chrome.
If I now restart (reboot) the tablet and try to open the file by tapping
its icon on the home page it doesn't open and I receive the message:
"Chrome does not have access to the requested resource."
If I then go to My Files - Downloads I find I can open it from there.
And if I then go back to the home page it will now open from there as well. >>
Why is this?
I have links on my home page to .htm pages located on servers on the
internet which always open with no problems. But .htm files located on
my tablet seem to become inaccessible from the home page after a reboot
until opened from within My Files - Downloads.
Can someone with a better understanding of the Android OS than me
explain what's going on?
In the absence of an authoritative answer, and based on some
googling (I am not a developer of Android apps), I'll offer a
guess.
I suspect that for the content URI in the shortcut (which is a
pointer to a local resource, and AFAICS not the same as a file://
URI) can only be accessed if Chrome has access to a Content
Provider and for some reason (maybe a bug) there isn't one after
a reboot. Perhaps accessing the content using My Files causes a
Content Provider to be established, which can the be used by
Chrome to access the content URI passed as a result of tapping
the shortcut.
<https://developer.android.com/guide/topics/providers/content-provider-basics>
I've created a simple (just text, no script) .htm file on a Windows
computer ("testhtm.htm") and transferred it to my Android tablet.
In My Files - Downloads it then appears as "testhtm.htm". Tapping it and
it opens with Chrome (my default browser) as "content:media/external/file/1000000383".
Long tap and select "Add to Home Screen" and an icon appears on the home screen titled "testhtm". And when tapping this it opens in Chrome.
If I now restart (reboot) the tablet and try to open the file by tapping
its icon on the home page it doesn't open and I receive the message:
"Chrome does not have access to the requested resource."
If I then go to My Files - Downloads I find I can open it from there.
And if I then go back to the home page it will now open from there as well.
Why is this?
Dave Royal wrote:
In the absence of an authoritative answer, and based on some
googling (I am not a developer of Android apps), I'll offer a
guess.
I suspect that for the content URI in the shortcut (which is a
pointer to a local resource, and AFAICS not the same as afile://
URI)
In a similar case, where we load a lot of documents (mixed .pdf and
.html) onto an android tablet for use in a vehicle, we ended up
installing a local web server on the tablet (and even paying the
developer for a few tweaks to it).
On Thu-25-Jul-2024 8:40 am, Dave Royal wrote:
Malone <[email protected]> Wrote in message:
I've created a simple (just text, no script) .htm file on a Windows
computer ("testhtm.htm") and transferred it to my Android tablet.
In My Files - Downloads it then appears as "testhtm.htm". Tapping it and >>> it opens with Chrome (my default browser) as
"content:media/external/file/1000000383".
Long tap and select "Add to Home Screen" and an icon appears on the home >>> screen titled "testhtm". And when tapping this it opens in Chrome.
If I now restart (reboot) the tablet and try to open the file by tapping >>> its icon on the home page it doesn't open and I receive the message:
"Chrome does not have access to the requested resource."
If I then go to My Files - Downloads I find I can open it from there.
And if I then go back to the home page it will now open from there as well. >>>
Why is this?
I have links on my home page to .htm pages located on servers on the
internet which always open with no problems. But .htm files located on
my tablet seem to become inaccessible from the home page after a reboot
until opened from within My Files - Downloads.
Can someone with a better understanding of the Android OS than me
explain what's going on?
In the absence of an authoritative answer, and based on some
googling (I am not a developer of Android apps), I'll offer a
guess.
I suspect that for the content URI in the shortcut (which is a
pointer to a local resource, and AFAICS not the same as a file://
URI) can only be accessed if Chrome has access to a Content
Provider and for some reason (maybe a bug) there isn't one after
a reboot. Perhaps accessing the content using My Files causes a
Content Provider to be established, which can the be used by
Chrome to access the content URI passed as a result of tapping
the shortcut.
<https://developer.android.com/guide/topics/providers/content-provider-basics>
Thanks for that Dave. It sounds plausible to me but it seems I'm still
going to have to go to My Files to reactive the shortcut after a reboot
Malone <[email protected]> Wrote in message:
On Thu-25-Jul-2024 8:40 am, Dave Royal wrote:
Malone <[email protected]> Wrote in message:
I've created a simple (just text, no script) .htm file on a Windows
computer ("testhtm.htm") and transferred it to my Android tablet.
In My Files - Downloads it then appears as "testhtm.htm". Tapping it and >>>> it opens with Chrome (my default browser) as
"content:media/external/file/1000000383".
Long tap and select "Add to Home Screen" and an icon appears on the home >>>> screen titled "testhtm". And when tapping this it opens in Chrome.
If I now restart (reboot) the tablet and try to open the file by tapping >>>> its icon on the home page it doesn't open and I receive the message:
"Chrome does not have access to the requested resource."
If I then go to My Files - Downloads I find I can open it from there.
And if I then go back to the home page it will now open from there as well.
Why is this?
I have links on my home page to .htm pages located on servers on the
internet which always open with no problems. But .htm files located on >>>> my tablet seem to become inaccessible from the home page after a reboot >>>> until opened from within My Files - Downloads.
Can someone with a better understanding of the Android OS than me
explain what's going on?
In the absence of an authoritative answer, and based on some
googling (I am not a developer of Android apps), I'll offer a
guess.
I suspect that for the content URI in the shortcut (which is a
pointer to a local resource, and AFAICS not the same as a file://
URI) can only be accessed if Chrome has access to a Content
Provider and for some reason (maybe a bug) there isn't one after
a reboot. Perhaps accessing the content using My Files causes a
Content Provider to be established, which can the be used by
Chrome to access the content URI passed as a result of tapping
the shortcut.
<https://developer.android.com/guide/topics/providers/content-provider-basics>
Thanks for that Dave. It sounds plausible to me but it seems I'm still
going to have to go to My Files to reactive the shortcut after a reboot
It was only a guess. I hoped an Android developer would confirm or
refute it. I would have thought that passing a usable html
shortcut to the the app that created it is the job of what in
Linux would be called a 'desktop manager': this Samsung tablet
uses 'One UI'. I've read that it's possible to use alternative
DMs on some devices - maybe you can.
On maybe you can open this file in Chrome using it's file location (file:///Internal storage/...) Firefox doesn't allow file:// URIs
any more - does chrome?
Opening local files in apps which did not create them (though in
the case of your desktop shortcut Chrome /did/ create it) is IME
the most baffling area of Android. I often want to open files (eg
.abc music files) in editors and players which Android doesn't
think I should and it's a constant battle.
Dave Royal <[email protected]> Wrote in message:
Malone <[email protected]> Wrote in message:
On Thu-25-Jul-2024 8:40 am, Dave Royal wrote:
Malone <[email protected]> Wrote in message:
I've created a simple (just text, no script) .htm file on a Windows
computer ("testhtm.htm") and transferred it to my Android tablet.
In My Files - Downloads it then appears as "testhtm.htm". Tapping it and >>>>> it opens with Chrome (my default browser) as
"content:media/external/file/1000000383".
Long tap and select "Add to Home Screen" and an icon appears on the home >>>>> screen titled "testhtm". And when tapping this it opens in Chrome.
If I now restart (reboot) the tablet and try to open the file by tapping >>>>> its icon on the home page it doesn't open and I receive the message: >>>>> "Chrome does not have access to the requested resource."
If I then go to My Files - Downloads I find I can open it from there. >>>>> And if I then go back to the home page it will now open from there as well.
Why is this?
I have links on my home page to .htm pages located on servers on the >>>>> internet which always open with no problems. But .htm files located on >>>>> my tablet seem to become inaccessible from the home page after a reboot >>>>> until opened from within My Files - Downloads.
Can someone with a better understanding of the Android OS than me
explain what's going on?
In the absence of an authoritative answer, and based on some
googling (I am not a developer of Android apps), I'll offer a
guess.
I suspect that for the content URI in the shortcut (which is a
pointer to a local resource, and AFAICS not the same as a file://
URI) can only be accessed if Chrome has access to a Content
Provider and for some reason (maybe a bug) there isn't one after
a reboot. Perhaps accessing the content using My Files causes a
Content Provider to be established, which can the be used by
Chrome to access the content URI passed as a result of tapping
the shortcut.
<https://developer.android.com/guide/topics/providers/content-provider-basics>
Thanks for that Dave. It sounds plausible to me but it seems I'm still
going to have to go to My Files to reactive the shortcut after a reboot
It was only a guess. I hoped an Android developer would confirm or
refute it. I would have thought that passing a usable html
shortcut to the the app that created it is the job of what in
Linux would be called a 'desktop manager': this Samsung tablet
uses 'One UI'. I've read that it's possible to use alternative
DMs on some devices - maybe you can.
On maybe you can open this file in Chrome using it's file location
(file:///Internal storage/...) Firefox doesn't allow file:// URIs
any more - does chrome?
Opening local files in apps which did not create them (though in
the case of your desktop shortcut Chrome /did/ create it) is IME
the most baffling area of Android. I often want to open files (eg
.abc music files) in editors and players which Android doesn't
think I should and it's a constant battle.
I tried to reproduce your case - Android 14 on a Samsung tablet.
I can send a local html file from the 'My Files' app to Chrome
(but not to Firefox) using 'Open with' and it displays as
content://media/external/file/1000015925. But I see no way to
'Add to home screen' in Chrome (which I can do for an ordinary
URL in both Chrome and Firefox).
But do see 'Add to home screen' in the 'My Files' app and the
shortcut appears with a 'My Files' sub-icon. I suppose that's
what you did. And that opens in Chrome, even though Firefox is my
default browser. So My Files owns that content, and it seems it
must open it first. I think my guess about it creating a Content
Provider is correct-ish.
Neither Firefox nor Chrome will open a file:/// URI (by design -
CVE-2015-7186).
Firefox will not open a content:// URI.
On Fri-26-Jul-2024 10:06 am, Dave Royal wrote:
Dave Royal <[email protected]> Wrote in message:
[long snip]
I tried to reproduce your case - Android 14 on a Samsung tablet.
I can send a local html file from the 'My Files' app to Chrome
(but not to Firefox) using 'Open with' and it displays as
content://media/external/file/1000015925. But I see no way to
'Add to home screen' in Chrome (which I can do for an ordinary
URL in both Chrome and Firefox).
But do see 'Add to home screen' in the 'My Files' app and the
shortcut appears with a 'My Files' sub-icon. I suppose that's
what you did. And that opens in Chrome, even though Firefox is my
default browser. So My Files owns that content, and it seems it
must open it first. I think my guess about it creating a Content
Provider is correct-ish.
Neither Firefox nor Chrome will open a file:/// URI (by design -
CVE-2015-7186).
Firefox will not open a content:// URI.
Yes, that's all consistent with what I experience. My Windows default
browser is Firefox and at the outset I put that on my tablet. But I had problems with it, for reasons I can't remember, so got rid of it on the
basis that Chrome was probably more Android-compatible although I
consider it spyware.
I've created a simple (just text, no script) .htm file on a Windows
computer ("testhtm.htm") and transferred it to my Android tablet.
In My Files - Downloads it then appears as "testhtm.htm". Tapping it and
it opens with Chrome (my default browser) as "content:media/external/file/1000000383".
Long tap and select "Add to Home Screen" and an icon appears on the home screen titled "testhtm". And when tapping this it opens in Chrome.
If I now restart (reboot) the tablet and try to open the file by tapping
its icon on the home page it doesn't open and I receive the message:
"Chrome does not have access to the requested resource."
If I then go to My Files - Downloads I find I can open it from there.
And if I then go back to the home page it will now open from there as well.
Why is this?
On 2024-07-23 07:31, Malone wrote:
I've created a simple (just text, no script) .htm file on a Windows
computer ("testhtm.htm") and transferred it to my Android tablet.
In My Files - Downloads it then appears as "testhtm.htm". Tapping it and
it opens with Chrome (my default browser) as
"content:media/external/file/1000000383".
Long tap and select "Add to Home Screen" and an icon appears on the home
screen titled "testhtm". And when tapping this it opens in Chrome.
If I now restart (reboot) the tablet and try to open the file by tapping
its icon on the home page it doesn't open and I receive the message:
"Chrome does not have access to the requested resource."
If I then go to My Files - Downloads I find I can open it from there.
And if I then go back to the home page it will now open from there as well. >>
Why is this?
I seem to recall old bug aka feature that file:/// would not work in
Android. Re firefox, probably.
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 714 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 141:49:46 |
| Calls: | 12,088 |
| Calls today: | 1 |
| Files: | 14,998 |
| Messages: | 6,517,448 |