Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links aren't getting opened in prefered app. #69

Closed
soymadip opened this issue Apr 26, 2023 · 47 comments
Closed

Links aren't getting opened in prefered app. #69

soymadip opened this issue Apr 26, 2023 · 47 comments
Assignees

Comments

@soymadip
Copy link

soymadip commented Apr 26, 2023

If we select an app for a link as 'always', the link isn't opening in prefered app. (If preferred browser is set as always ask)

Instead app shows all eligible apps again.

Screen record:-

Record_2023-04-26-20-41-08.mp4
@soymadip soymadip changed the title Redirected links isn't got opened in prefered app. nks isn't getting opened in prefered app. Apr 26, 2023
@soymadip soymadip changed the title nks isn't getting opened in prefered app. Links isn't getting opened in prefered app. Apr 26, 2023
@1fexd
Copy link
Collaborator

1fexd commented Apr 28, 2023

Your screenrecording appears to be broken.

@soymadip
Copy link
Author

Your screenrecording appears to be broken.

Oh, sorry for inconvenience

Here's new one:-

record.mp4
  • If the video is not loading again then here's the steps to reproduce the bug:-

1.click on any link to open it
2.when linksheet opens, long press the app/browser you want to open the link in and select always.
3. Now click on the link again, the sheet will ask you to choose app/browser again instead of directly opening it in previously selected app.

@1fexd
Copy link
Collaborator

1fexd commented Apr 29, 2023

Your video is still broken. I can't reproduce the bug by following your steps.

@soymadip
Copy link
Author

Your video is still broken. I can't reproduce the bug by following your steps.

What? Did you tried the steps below the video?

So in your device if you select an app as 'always' for a link, it opens it automatically?

@soymadip
Copy link
Author

soymadip commented Apr 29, 2023

Your video is still broken. I can't reproduce the bug by following your steps.

And one thing i wanna ask,
The 'alws' button is to set a link to open in an app automatically right?
This one:-
IMG_20230430_011652.jpg

@soymadip soymadip changed the title Links isn't getting opened in prefered app. Links aren't getting opened in prefered app. Apr 30, 2023
@1fexd
Copy link
Collaborator

1fexd commented May 3, 2023

I have tried your steps, but I wasn't able to reproduce the bug. It works fine for me. Can you try to re-upload the video?

@soymadip
Copy link
Author

soymadip commented May 4, 2023

I have tried your steps, but I wasn't able to reproduce the bug. It works fine for me. Can you try to re-upload the video?

oh, sorry i should have been more clear😥.

  • Here is a more detailed information & steps:-

Android 12 has 'open links in app' option to by default open a app's supported deep link in the app when the link is pressed.

as example lets say for Github's mobile app, it supports https://github.com links.
now if we turn off the 'open links in app' from settings and click a link 'https://github.com', linksheet opens and shows the github app along with the browsers and if any other installed app which supports 'https://github.com'.

now if from popup, we select a app/browser to always open 'https://github.com' to that app by clicking always, thats where the bug is.
next time when we click 'https://github.com', linksheet again pops up the Url-App-Chooser page instead of automatically opening the link in previously selected app.

  • steps to reprodece:-

Lets say i have 1 browser and github mobile app's installed in my phone & i wanna open https://github.com/ links to the browser.
so first turn off 'open links in app' option from github mobile's settings
WhatsApp Image 2023-05-04 at 9 46 30 AM

now tap on 'https://github.com/' link from anywhere and linksheet opens Url-App-Chooser popup showing the browser and github mobile app.
WhatsApp Image 2023-05-04 at 10 05 17 AM

now long press the browser(in my case iceraven) and select the option 'alwa' from bottom-right corner. the link opens in browser.

now close browser and again click om 'https://github.com' and linksheet shoud open the link automatically in browser right?
but linksheet again shows the Url-App-Chooser popup.

i guess now the bug should be understandable

@soymadip soymadip closed this as completed May 4, 2023
@soymadip soymadip reopened this May 4, 2023
@soymadip
Copy link
Author

soymadip commented May 4, 2023

new recording (it should work in PC):-

tttWhatsApp.Video.2023-05-04.at.10.35.49.AM.mp4

@soymadip soymadip closed this as completed May 4, 2023
@soymadip soymadip reopened this May 4, 2023
@Joyogirl
Copy link

Joyogirl commented May 4, 2023

Yeah, this problem is happening to me too.
I am on Android 13.

If we turn of the 'open links in app' which is mandatory if we wanna use this option:-
Screenshot_2023-05-04-15-11-22-13_338d1168706d12c5c38fa9d3a60e24f4

And select some of the supported links' of an app, linksheet doesn't open the selected links automatically.......
Like for YouTube:-
Screenshot_2023-05-04-15-07-56-83_338d1168706d12c5c38fa9d3a60e24f4

Linksheet doesn't open www.youtube.com links automatically in YouTube app.

Is shows popup both for www.youtube.com (selected to automatically open) and m.youtube.com(not selected to automatically open in app) links.

@Joyogirl
Copy link

Joyogirl commented May 4, 2023

@1fexd please fix this

@1fexd 1fexd added todo and removed needs feedback labels May 4, 2023
@1fexd 1fexd self-assigned this May 4, 2023
@soymadip
Copy link
Author

soymadip commented May 4, 2023

@1fexd sorry to ping but i see you changed the label, so did you understand what i was sayiing?😅

@1fexd
Copy link
Collaborator

1fexd commented May 4, 2023

Yes

@soymadip
Copy link
Author

soymadip commented May 4, 2023

Yes

🙃finally.

@1fexd
Copy link
Collaborator

1fexd commented May 4, 2023

Just tested on the latest dev version, looks like this is not an issue anymore. Going to release a new version later.

@1fexd 1fexd closed this as completed May 4, 2023
@soymadip
Copy link
Author

soymadip commented May 4, 2023

Just tested on the latest dev version, looks like this is not an issue anymore. Going to release a new version later.

Thanks a lost sir, please release the fix version asap🙏

@soymadip
Copy link
Author

soymadip commented May 5, 2023

@1fexd the 'always' button is still not working, if we turn off 'open links in app' and use the linksheet popup to select a app/browser to always, it still again is displaying the app chooser sheet

@1fexd
Copy link
Collaborator

1fexd commented May 5, 2023

Very strange, still can't reproduce this. Gonna send you a debug build later.

@1fexd
Copy link
Collaborator

1fexd commented May 7, 2023

No pressure. Also if you want you can describe why it's not working on your PC and maybe I can tell you what's wrong.

@soymadip
Copy link
Author

soymadip commented May 7, 2023

No pressure. Also if you want you can describe why it's not working on your PC and maybe I can tell you what's wrong.

Please tell me🥲

@soymadip
Copy link
Author

soymadip commented May 8, 2023

No pressure. Also if you want you can describe why it's not working on your PC and maybe I can tell you what's wrong.

how to generate log file? its showing logs in terminal though

i copied the log and manually created a log.txt
LogCat.txt

There's problem with the 'preferred app' thing i guess

@1fexd
Copy link
Collaborator

1fexd commented May 8, 2023

You need to click a link, not open the settings.

@soymadip
Copy link
Author

soymadip commented May 9, 2023

You need to click a link, not open the settings.
Actually, i mistakenly went to settings..

I did go through the link opening after that....

@soymadip
Copy link
Author

soymadip commented May 9, 2023

I will record again tonight then

@soymadip
Copy link
Author

You need to click a link, not open the settings.

there you go:-
LogCat.txt

hope this one's good

@soymadip
Copy link
Author

and i guess the pachage name would be fe.linksheet.debug(hope i wrote correct one cause in the comment it was fe.linkshet)

@1fexd
Copy link
Collaborator

1fexd commented May 10, 2023

I have attempted to fix the bug. You can download the new debug release here. Please check if it works, and if not, please provide another logcat. Thanks.

@soymadip
Copy link
Author

I have attempted to fix the bug. You can download the new debug release here. Please check if it works, and if not, please provide another logcat. Thanks.

I don't know if i was able to explain the problem correctly 😅

Please sir if you don't mind can you send me a screen record of you doing the process?

I just wanna know if it's my phone's problem

@soymadip
Copy link
Author

soymadip commented May 11, 2023

I have attempted to fix the bug. You can download the new debug release here. Please check if it works, and if not, please provide another logcat. Thanks.

Just installed one of your old releases [V 0.0.21].

It is working in that version

rtrtrtrtrtrt.mp4

EDIT:- After trying all releases, i got that untill version 0.0.27-debug it's working and from 0.0.28-debug the feature is broken and no longer works....

logcat of that version;-
LogCat-OLD.txt

@1fexd
Copy link
Collaborator

1fexd commented May 11, 2023

In 0.0.28-debug the toggle Never show "last picked app" section was introduced in the Bottom sheet settings section - this seems to break the Always button - you probably have that feature enabled, right?

1fexd added a commit that referenced this issue May 11, 2023
@soymadip
Copy link
Author

soymadip commented May 11, 2023

In 0.0.28-debug the toggle Never show "last picked app" section was introduced in the Bottom sheet settings section - this seems to break the Always button - you probably have that feature enabled, right?

Ohhh I guess that's right.

I didn't find the 'never show the last picked section' in earlier builds. I do use that feature as I find the 'last used app' section quite annoying

@soymadip
Copy link
Author

I hope that's fixed.
Closing this one then.

@Dhyfer1
Copy link

Dhyfer1 commented Jun 3, 2023

@soymadip Has your problem already been solved? I have the same problem when using linksheet with Revanced.

If you have already solved your problem, what did you do to do it? What version of linksheet are you using now?

@soymadip
Copy link
Author

soymadip commented Jun 3, 2023

@soymadip Has your problem already been solved? I have the same problem when using linksheet with Revanced.

If you have already solved your problem, what did you do to do it? What version of linksheet are you using now?

Well @1fexd fixed it, but hasn't released it.

But for now as a workover, disable the 'never show the last picked section'..

@Dhyfer1
Copy link

Dhyfer1 commented Jun 3, 2023

Well @1fexd fixed it, but hasn't released it.

But for now as a workover, disable the 'never show the last picked section'..

Thank you so much. I have disabled that option and a link to YouTube now opens directly in Revanced, (before, the link was opened first in the browser)

But it works when I click a Youtube video link in Google search results, but not when I click a Youtube video link from Google Discover 🙄

@1fexd Can you fix it?

@1fexd
Copy link
Collaborator

1fexd commented Jun 3, 2023

But it works when I click a Youtube video link in Google search results, but not when I click a Youtube video link from Google Discover roll_eyes

  • What's Google Discover?
  • What happens when you click a Youtube link there?
  • Can you grab the latest nightly build from here (can be installed side by side with the release build) and test if the issue is still present?

@1fexd 1fexd reopened this Jun 3, 2023
@soymadip
Copy link
Author

soymadip commented Jun 3, 2023

But it works when I click a Youtube video link in Google search results, but not when I click a Youtube video link from Google Discover roll_eyes

  • What's Google Discover?
  • What happens when you click a Youtube link there?
  • Can you grab the latest nightly build from here (can be installed side by side with the release build) and test if the issue is still present?

Google discover is the news page when you swipe right in pixel devices....

@soymadip
Copy link
Author

soymadip commented Jun 3, 2023

And @Dhyfer1 it's designed to open links in Google app or Chrome custom tabs...

As long as I know it cannot be changed

@Dhyfer1
Copy link

Dhyfer1 commented Jun 6, 2023

  • What's Google Discover?
  • What happens when you click a Youtube link there?
  • Can you grab the latest nightly build from here (can be installed side by side with the release build) and test if the issue is still present?
  • Google Discover is a section within the new tab page in Chrome, where you can see any content: news, videos, articles etc, as shown in the video
  • When I click on a link supported by Youtube, the link just opens a new Chrome tab, as shown in the video, instead of opening in Revanced.
  • The problem in my case is still present, I used the last build you told me but there is no result. Maybe I'm using wrong linksheet? You need to explain in the readme how to use your app.

I couldn't upload the video to my message because of its size, so you can see the video I'm talking about here And here is another video where if I click on a link to a youtube video in the search results, then the video does open in Revanced

As you can see, my problem is similar to @soymadip. Is there anything that can be done about it?

@1fexd
Copy link
Collaborator

1fexd commented Jun 6, 2023

What happens if you install the normal Youtube app? Do Youtube links clicked in "Discover" automatically open in the normal Youtube app? If not, this is a issue with Chrome, not LinkSheet (looks like Chrome does not send a intent (which, in simple terms, is just a request to the Android system to open something in another app) when the link is clicked in Discover).

You need to explain in the readme how to use your app.

I plan to include an app-intro and a detailed setup guide in the next release.

@Dhyfer1
Copy link

Dhyfer1 commented Jun 6, 2023

What happens if you install the normal Youtube app? Do Youtube links clicked in "Discover" automatically open in the normal Youtube app? If not, this is a issue with Chrome, not LinkSheet

Hmm. The same thing happens with the normal YouTube app. If I click on a Youtube link from Discover, it just opens the video in a new tab, it's weird because within the settings for the YouTube app, the m.youtube.com link should automatically open on Youtube app, as it happens in the second video where if it does the job.

So it's a problem that only happens with YouTube links in Discover, but not with YouTube links in search results. Is it possible to force linksheet to open YouTube links from Discover in the YouTube or Revanced app?

Could you test on your side if the same thing happens?

I plan to include an app-intro and a detailed setup guide in the next release.

Great. I look forward to the new version soon.

@1fexd
Copy link
Collaborator

1fexd commented Jun 6, 2023

So it's a problem that only happens with YouTube links in Discover, but not with YouTube links in search results. Is it possible to force linksheet to open YouTube links from Discover in the YouTube or Revanced app?

As already mentioned, LinkSheet is only started when an app explicitly sends an Intent to the system requesting that the content be opened in another app. Looks like Chrome doesn't do that when a link is clicked in Discover, so sadly, there's nothing I can do about that.

Great. I look forward to the new version

Btw, you are very welcome to test the nightly builds (new build on each commit) and report bugs ;)

@Dhyfer1
Copy link

Dhyfer1 commented Jun 6, 2023

As already mentioned, LinkSheet is only started when an app explicitly sends an Intent to the system requesting that the content be opened in another app. Looks like Chrome doesn't do that when a link is clicked in Discover, so sadly, there's nothing I can do about that.

It's okay, I understand. No problem

Btw, you are very welcome to test the nightly builds (new build on each commit) and report bugs ;)

Yes, thanks for the help. By the way, I hope the next stable version will have the app-intro and detailed setup you're talking about. ;)

@1fexd 1fexd closed this as completed Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants