為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Behavior of Intent.ACTION_VIEW with Browser.EXTRA_APPLICATION_ID changed

  • 8 回覆
  • 1 有這個問題
  • 15 次檢視
  • 最近回覆由 Paul

more options

This is regards to another application issuing startActivity Intent.ACTION_VIEW on Firefox of a URI with Browser.EXTRA_APPLICATION_ID set.

Previously, it worked so (the syntax is not to be taken literally). startActivity(ACTION_VIEW, uri="http://example.com/a.htm", app="MySpecialTab") -> opened a tab with a.htm startActivity(ACTION_VIEW, uri="http://example.com/b.htm", app="MySpecialTab") -> used same tab for b.htm startActivity(ACTION_VIEW, uri="http://example.com/b.htm", app="MySpecialTab") -> used same tab for b.htm and refreshed.

Now, with the most recent release: startActivity(ACTION_VIEW, uri="http://example.com/a.htm", app="MySpecialTab") -> opened a tab with a.htm startActivity(ACTION_VIEW, uri="http://example.com/b.htm", app="MySpecialTab") -> opened a new tab for b.htm startActivity(ACTION_VIEW, uri="http://example.com/b.htm", app="MySpecialTab") -> does not refresh.

I went looking for some config but couldn't find anything. The fact that I can't get it to refresh is a bigger deal-breaker than the fact that it opens more tabs.

This is regards to another application issuing startActivity Intent.ACTION_VIEW on Firefox of a URI with Browser.EXTRA_APPLICATION_ID set. Previously, it worked so (the syntax is not to be taken literally). startActivity(ACTION_VIEW, uri="http://example.com/a.htm", app="MySpecialTab") -> opened a tab with a.htm startActivity(ACTION_VIEW, uri="http://example.com/b.htm", app="MySpecialTab") -> used same tab for b.htm startActivity(ACTION_VIEW, uri="http://example.com/b.htm", app="MySpecialTab") -> used same tab for b.htm and refreshed. Now, with the most recent release: startActivity(ACTION_VIEW, uri="http://example.com/a.htm", app="MySpecialTab") -> opened a tab with a.htm startActivity(ACTION_VIEW, uri="http://example.com/b.htm", app="MySpecialTab") -> opened a new tab for b.htm startActivity(ACTION_VIEW, uri="http://example.com/b.htm", app="MySpecialTab") -> does not refresh. I went looking for some config but couldn't find anything. The fact that I can't get it to refresh is a bigger deal-breaker than the fact that it opens more tabs.

所有回覆 (8)

more options

Hi

I am sorry but I do not understand your question. What are you trying to do in Firefox for Android, what is the page that you are trying to view?

more options

I am using another application on Android to send an Intent to Firefox (on Android) to view a URI. It used to work fine, it does not work the same now. The specific URIs are irrelevant; they are reachable and they work.

I am speaking of the difference between different releases of Fenix (Firefox).

由 RenateUSB 於 修改

more options

What are you trying to send and from app are you trying to send it to Firefox for Android?

more options

So, here you go. It's not a question of it not working. It's a question of the behavior changed in the latest version of Firefox.

     Intent intent = new Intent();
     intent.setPackage("org.mozilla.firefox");
     intent.setAction(Intent.ACTION_VIEW);
     intent.setData(Uri.parse(link));
     intent.putExtra(Browser.EXTRA_APPLICATION_ID, tab);
     startActivity(intent);
more options

What is the address of the website that you are trying to open in Firefox for Android?

more options

Seriously, this has nothing to do with website addresses or connectivity. I can hit the URLs just fine. I can manually refresh using the little "arrows in a circle" refresh button on Firefox. The issue is that previously android.content.Intent used to always cause a refresh and now it doesn't. See the above code.

Let me show you the problem an equivalent way. In ADB shell (not even rooted).

   $ am start -a android.intent.action.VIEW -d https://httpstat.us/ -e com.android.browser.application_id MyTab

I can do this any number of times (on the older Firefox, 68.11.0) and it always goes to the same tab and it refreshes (the big X appears, the strip progresses, it refreshes the screen). On the newer Firefox, 96.1.1 it does not refresh on a new Intent. I am using URL which do not redirect as that complicates things. The example above does not redirect either.

So, somewhere between 68 and 96 something changed. I just thought somebody might know when and if there is a work around for this.

more options

Ok, this is clearly something that worked fine in Fennec and Fenix broke it/never implemented it. Where can I download Fennec 68.11.0?

Found it: https://download.mozilla.org/?product=fennec-latest&os=android&lang=multi

I filed a bug: https://github.com/mozilla-mobile/fenix/issues/23329

由 RenateUSB 於 修改

more options

Okay, thank you. Please follow the issue that you have raised for progress on this matter.