Re: viewing local htm files on Android device

Liste des GroupesRevenir à cm android 
Sujet : Re: viewing local htm files on Android device
De : dave (at) *nospam* dave123royal.com (Dave Royal)
Groupes : comp.mobile.android
Date : 24. Jul 2024, 21:40:00
Autres entêtes
Organisation : news.eternal-september.org
Message-ID : <v7ror3$1t3ob$1@dont-email.me>
References : 1
User-Agent : Mod.PiaoHong.Usenet.Client:2.02.M16
Malone <mslone@nospam.uk> 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>
--
Remove numerics from my email address.

Date Sujet#  Auteur
23 Jul 24 * viewing local htm files on Android device12Malone
24 Jul 24 +* Re: viewing local htm files on Android device8Dave Royal
24 Jul 24 i+* Re: viewing local htm files on Android device2Andy Burns
25 Jul 24 ii`- Re: viewing local htm files on Android device1Malone
25 Jul 24 i`* Re: viewing local htm files on Android device5Malone
25 Jul 24 i `* Re: viewing local htm files on Android device4Dave Royal
25 Jul 24 i  `* Re: viewing local htm files on Android device3Dave Royal
26 Jul 24 i   `* Re: viewing local htm files on Android device2Malone
26 Jul 24 i    `- Re: Firefox on Android [was: viewing local htm files on Android device]1Dave Royal
25 Jul 24 +* Re: viewing local htm files on Android device2Carlos E. R.
26 Jul 24 i`- Re: viewing local htm files on Android device1Arno Welzel
26 Jul 24 `- Re: viewing local htm files on Android device1Arno Welzel

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal