Open open.lbry.com links on Android app #957

Closed
opened 2020-07-07 15:05:24 +02:00 by kekkyojin · 9 comments
kekkyojin commented 2020-07-07 15:05:24 +02:00 (Migrated from github.com)

The Issue

Steps to reproduce

  1. Click on any open.lbry.com link on a chat in Discord Content channel.
    1a. Browsing -writing- directly through the navigation bar to a open.lbry.com link will redirect you to lbry.tv
  2. See where the link is opened

Expected behaviour

LBRY installed app should show the content or allow itself to be chosen at least

Actual behaviour

Content is always shown on lbry.tv

System Configuration

  • Device: N/A
  • Android version: N/A

Anything Else

Android app is currently being opened for lbry:// links. This bug report is about opening those links which could be shared on the outside world.

I am already adding code to add this new-feature. A PR will be posted when ready. I am oopening this report so there could be a place where the discussion could be held in case this is not a desirable feature.

Screenshots

Internal Use

Acceptance Criteria

Definition of Done

  • Tested against acceptance criteria
  • Tested against the assumptions of the user story
  • The project builds without errors
  • Unit tests are written and passing
  • Tests on devices/browsers listed in the issue have passed
  • QA performed & issues resolved
  • Refactoring completed
  • Any configuration or build changes documented
  • Documentation updated
  • Peer Code Review performed
<!-- Thanks for reporting an issue to LBRY and helping us improve! To make it possible for us to help you, please fill out below information carefully. Before reporting any issues, please make sure that you're using the latest version. We are also available on live chat at https://chat.lbry.com --> ## The Issue ### Steps to reproduce 1. Click on any open.lbry.com link on a chat in Discord Content channel. 1a. Browsing -writing- directly through the navigation bar to a open.lbry.com link will redirect you to lbry.tv 2. See where the link is opened ### Expected behaviour LBRY installed app should show the content or allow itself to be chosen at least ### Actual behaviour Content is always shown on lbry.tv ## System Configuration - Device: N/A - Android version: N/A ## Anything Else <!-- Include anything else that does not fit into the above sections --> Android app is currently being opened for lbry:// links. This bug report is about opening those links which could be shared on the outside world. I am already adding code to add this new-feature. A PR will be posted when ready. I am oopening this report so there could be a place where the discussion could be held in case this is not a desirable feature. ## Screenshots <!-- If a screenshot would help explain the bug, please include one or two here --> ## Internal Use ### Acceptance Criteria 1. 2. 3. ### Definition of Done - [ ] Tested against acceptance criteria - [ ] Tested against the assumptions of the user story - [ ] The project builds without errors - [ ] Unit tests are written and passing - [ ] Tests on devices/browsers listed in the issue have passed - [ ] QA performed & issues resolved - [ ] Refactoring completed - [ ] Any configuration or build changes documented - [ ] Documentation updated - [ ] Peer Code Review performed
tzarebczan commented 2020-07-07 23:29:14 +02:00 (Migrated from github.com)

Thanks for filing! This code will most likely have to reside on the lbry-desktop repo. I'm not sure if there's a good way to detect if the app is installed..for desktop, we check if they have a desktop installation for the user - but this won't work if you are not signed into lbry.tv. Looking forward to seeing what you think.

Thanks for filing! This code will most likely have to reside on the lbry-desktop repo. I'm not sure if there's a good way to detect if the app is installed..for desktop, we check if they have a desktop installation for the user - but this won't work if you are not signed into lbry.tv. Looking forward to seeing what you think.
kekkyojin commented 2020-07-08 00:05:53 +02:00 (Migrated from github.com)

LBRY Desktop is run on desktop -or laptop- devices. LBRY Android is executed on devices running Android operating system. Unless there is any shared source code between both of them, the change needed for this to work must be on lbry-android.

Currently LBRY Android is able to show content with the "lbry://" protocol handler. The code I have just been able to test on my device adds a filter for "https://open.lbry.com/". It works, also for unregistered users. Android operaring system allows it; apps need to register the protocol and the host and any clicked link conforming to that schema can be opened by LBRY Android.

People are still able to choose which app is going to open that specific link. They can still go to that link, which will redirect them to lbry.tv and they can even set that setting as the default one for those links. All of that at the operating system level.

Those are my thoughts, @tzarebczan.

LBRY Desktop is run on desktop -or laptop- devices. LBRY Android is executed on devices running Android operating system. Unless there is any shared source code between both of them, the change needed for this to work must be on lbry-android. Currently LBRY Android is able to show content with the "lbry://" protocol handler. The code I have just been able to test on my device adds a filter for "https://open.lbry.com/". It works, also for unregistered users. Android operaring system allows it; apps need to register the protocol and the host and any clicked link conforming to that schema can be opened by LBRY Android. People are still able to choose which app is going to open that specific link. They can still go to that link, which will redirect them to lbry.tv and they can even set that setting as the default one for those links. All of that at the operating system level. Those are my thoughts, @tzarebczan.
kauffj commented 2020-07-08 00:24:19 +02:00 (Migrated from github.com)

Fantastic idea @kekkyojin!

Fantastic idea @kekkyojin!
kekkyojin commented 2020-07-28 13:15:09 +02:00 (Migrated from github.com)

This comment is to add a link for testing

Link to test

I will be adding some tests -both unit and instrumentation type- in a future PR.

This comment is to add a link for testing [Link to test](https://open.lbry.com/@cryptomining:0/the-only-way-is-up-i-surpassed-dollar:0) I will be adding some tests -both unit and instrumentation type- in a future PR.
e4drcf commented 2020-08-02 00:50:50 +02:00 (Migrated from github.com)

that's weird.
when I'm following open.lbry.com link it's opening in the browser.
but for all my friends it's opening a native app

that's weird. when I'm following [open.lbry.com](https://open.lbry.com/@e4drcf:9/waterJump:8?r=GpgFHKmSvzT396vhYhicnUhrNCt1NqK3) link it's opening in the browser. but for all my friends it's opening a native app
kekkyojin commented 2020-08-02 01:17:09 +02:00 (Migrated from github.com)

It is possible you configured your browser to always open that kind of links. To check it, search your browser on Settings/Apps and Clear Defaults. Then test it again.

If it doesn't work, provide the LBRY version you are using and the Android version on your device on a new comment, please @e4drcf

It is possible you configured your browser to always open that kind of links. To check it, search your browser on Settings/Apps and Clear Defaults. Then test it again. If it doesn't work, provide the LBRY version you are using and the Android version on your device on a new comment, please @e4drcf
e4drcf commented 2020-08-02 01:44:41 +02:00 (Migrated from github.com)

@kekkyojin

some man from telegram writes:
App version 0.15.16,
Android version 9.
To be clear. Whether a person clicks an open.lbry link or just a lbry.rv link it should by default play in the lbry app if the user has it installed on their phone, like YouTube.

and my comment:
App version: 0.15.12
Android version 9

@kekkyojin some man from telegram writes: App version 0.15.16, Android version 9. To be clear. Whether a person clicks an open.lbry link or just a lbry.rv link it should by default play in the lbry app if the user has it installed on their phone, like YouTube. and my comment: App version: 0.15.12 Android version 9
kekkyojin commented 2020-08-02 02:12:59 +02:00 (Migrated from github.com)

@kekkyojin

some man from telegram writes:
App version 0.15.16,
Android version 9.

Is that person also having the problem? Has it also tried to restore defaults on its browser app?

To be clear. Whether a person clicks an open.lbry link or just a lbry.rv link it should by default play in the lbry app if the user has it installed on their phone, like YouTube.

I "softly" disagree on it. There are two ways an app can tell the system it desires to open certain kind of links. The one YouTube could be using is the one which will force user to use their app. ´LBRY Android users could choose to always open those kinds with the app, and then it will never be asked again, until the app is uninstalled or defaults are cleared.

I am not in charge of the app and I am neither the person making decissions on how the app should behave, but when I wrote this code I thought it would be better to let users choosing what to do instead of forcing them into opening those links with LBRY Android app.

and my comment:
App version: 0.15.12
Android version 9

This feature was added on LBRY Android 0.15.14. If you are using 0.15.12, then LBRY will never be offered to open those links, as code to manage them was not yet created.

> @kekkyojin > > some man from telegram writes: > App version 0.15.16, > Android version 9. Is that person also having the problem? Has it also tried to restore defaults on its browser app? > To be clear. Whether a person clicks an open.lbry link or just a lbry.rv link it should by default play in the lbry app if the user has it installed on their phone, like YouTube. > I "softly" disagree on it. There are two ways an app can tell the system it desires to open certain kind of links. The one YouTube could be using is the one which will force user to use their app. ´LBRY Android users could choose to always open those kinds with the app, and then it will never be asked again, until the app is uninstalled or defaults are cleared. I am not in charge of the app and I am neither the person making decissions on how the app should behave, but when I wrote this code I thought it would be better to let users choosing what to do instead of forcing them into opening those links with LBRY Android app. > and my comment: > App version: 0.15.12 > Android version 9 This feature was added on LBRY Android 0.15.14. If you are using 0.15.12, then LBRY will never be offered to open those links, as code to manage them was not yet created.
e4drcf commented 2020-08-02 10:51:48 +02:00 (Migrated from github.com)

yes, we both had this issue, now for me it works fine. I've suggested to change settings to this guy from telegram.
Thank you 👍

yes, we both had this issue, now for me it works fine. I've suggested to change settings to this guy from telegram. Thank you 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LBRYCommunity/lbry-android#957
No description provided.