If "local URL" / "local html web" means files stored on the device itself, the more pressing problem will be that Fenix currently doesn't support opening local files _at all_ [3]. Depending on which Android OS version you're talking about, on more recent Android versions you might also run into problems due to Google's attempts of deprecating direct file system access and the problem that their official replacement method is absolutely and totally unsuitable [4] for things like HTML files which have other resources (images, style sheets, scripts, other HTML files) associated with them.

Jan

Am 09.09.2020 03:05, schrieb Michael Comella:

Hi Bob,

I believe that:

intent.component = ComponentName("org.mozilla.firefox", "org.mozilla.firefox.App")

Should change to:

intent.component = ComponentName("org.mozilla.firefox", "org.mozilla.fenix.IntentReceiverActivity")

Though I haven't tested this locally. We changed which activity receives VIEW intents which I believe is the cause of this change.

There may also be a less fragile way of sending intents to Firefox: rather than saying, "Have this Activity (which can be renamed) in Firefox open this VIEW intent", it'd be preferable to remove the Activity: "Have Firefox open this VIEW intent". Perhaps this can be done with `intent.package` [1] instead of `intent.component`. We are considering removing IntentReceiverActivity for performance reasons so heads up that that may become a breaking change for you in the future if you leave the code the same.

As you've probably seen, we did a major rewrite of Firefox that was recently released so it might be good to check that other functionality is also working as expected - sorry for any inconvenience it has caused.
- Mike (:mcomella)

On Mon, Sep 7, 2020 at 7:59 PM Bob Achgill <bobachg...@hotmail.com> wrote:

I need some advice.

I used to be able to start up FireFox Android from my Android code by passing an intent with local URL like in the code below... then could surf the local html web within Firefox. But as of sometime in August new updates to Firefox in Google Play this capability has broken. Version 68.11.0 worked OK but a version soon after that something changed in Firefox. With the later releases the startActivity(intent) will start up Firefox but not with the passed local url.

Is there something I'm missing that changed?

Here is my code...

val url = resilioPath + "HHRPickALanguage.html"

val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))

intent.component = ComponentName("org.mozilla.firefox", "org.mozilla.firefox.App")

this.startActivity(intent)

What can I do to get it working again? It is a pain to have to ask the user to turn off Google Play Auto app Update and install an old version of Firefox.

My users are children in developing countries using my app to learn to read their mother tongue while they cannot go to school due to the Covid-19. The change in Firefox Android could not have come at a worse time.

Thanks!
Bob Achgill
www.HisHandsReader.org [2] _______________________________________________
mobile-firefox-dev mailing list
mobile-firefox-dev@mozilla.org
https://mail.mozilla.org/listinfo/mobile-firefox-dev

_______________________________________________
mobile-firefox-dev mailing list
mobile-firefox-dev@mozilla.org
https://mail.mozilla.org/listinfo/mobile-firefox-dev



Links:
------
[1] https://developer.android.com/reference/android/content/Intent#setPackage(java.lang.String)
[2] http://www.HisHandsReader.org
[3] https://github.com/mozilla-mobile/fenix/issues/1327
[4] https://issuetracker.google.com/issues/150076643
_______________________________________________
mobile-firefox-dev mailing list
mobile-firefox-dev@mozilla.org
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to