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

Mobile (iOS/Android) implement external-links/x-callback-url #9204

Closed
fatflyingpigs opened this issue Nov 3, 2023 · 10 comments
Closed

Mobile (iOS/Android) implement external-links/x-callback-url #9204

fatflyingpigs opened this issue Nov 3, 2023 · 10 comments
Labels
backlog We'll get to it... eventually... enhancement Feature requests and code enhancements mobile All mobile platforms

Comments

@fatflyingpigs
Copy link

fatflyingpigs commented Nov 3, 2023

Making an issue for the mobile part of #5168. To my knowledge this has not yet been implemented on any mobile platform. It seems there are a number of other bug reports that mention this, without a successful fix. https://github.com/laurent22/joplin/issues?q=is%3Aissue+x-callback & https://discourse.joplinapp.org/search?q=x-callback

Implementing this feature allows for NFC tags to be used on mobile devices with Joplin.

Environment

Joplin version: Latest (iOS 12.12.3)
Platforms: iOS 17.0.3 and iOS 15.7.1 (and Android from what I've read, but I haven't tested).

Steps to reproduce (iOS)

  1. In app, copy the markdown link for the note. eg: [My Test Note](:/1586e8e9da1e495eb08c7b4cdf1a6f50)
  2. Modify it to a proper external link and copy. eg: joplin://x-callback-url/openNote?id=1586e8e9da1e495eb08c7b4cdf1a6f50
  3. Switch to a different note
  4. [Optional] Close the app
  5. Paste the external link into safari or other browser
  6. Joplin launches, but not to the correct note

Describe what you expected to happen

Step 6 above should launch to the correct note.
Extra: UI entry to copy the external link, similar to the markdown link in the app. Currently desktop app has this

Logfile

No relevant entries in the logfile

Relevant

https://reactnative.dev/docs/linking?syntax=ios

@fatflyingpigs fatflyingpigs added the bug It's a bug label Nov 3, 2023
@fatflyingpigs fatflyingpigs changed the title Mobile (iOS/Android) implement x-callback-url Mobile (iOS/Android) implement external-links/x-callback-url Nov 3, 2023
Copy link
Contributor

github-actions bot commented Dec 3, 2023

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Dec 3, 2023
@personalizedrefrigerator
Copy link
Collaborator

Still an issue.

Note: This feature has also been requested on Discord and the Joplin Forum.

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Dec 4, 2023
Copy link
Contributor

github-actions bot commented Jan 3, 2024

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Jan 3, 2024
@personalizedrefrigerator personalizedrefrigerator added enhancement Feature requests and code enhancements mobile All mobile platforms backlog We'll get to it... eventually... and removed bug It's a bug stale An issue that hasn't been active for a while... labels Jan 3, 2024
@brandondasilva
Copy link

It would be great if this was a feature on mobile. I use the external links all the time but not being able to open to a note directly on my Android phone and iPad slows me down a lot.

@GonzRon
Copy link

GonzRon commented Oct 28, 2024

hi @laurent22 and @tiberiusteng I am the developer of NoteNFC, I just finished updating the app to make deep links to notes via NFC tags. Unfortunately, I ran into this issue, if joplin is running, scanning the NFC tag launches the joplin x-callback URL and opens the correct note. If joplin is not running, or is not in the background, the joplin app opens, but does not open the deep link to the correct joplin note. It seems like the callback URL in the intent is lost when the app is not running, but works if the app is running even in the background.

@tiberiusteng
Copy link
Contributor

@GonzRon I've reproduced the issue, will create a new PR if I figure out how to fix it.

@GonzRon
Copy link

GonzRon commented Oct 28, 2024

@GonzRon I've reproduced the issue, will create a new PR if I figure out how to fix it.
@tiberiusteng -> I suspect (but could 100% be wrong), that it has to do with the Android lifecycle management of the process, here's another issue that seemingly could also stem from the same root cause:

#11264
and
#11197

It does it without biometric lock too. When I switch the phone back on, the note is displayed for a short time then it disappear and this blank screen + header is displayed instead. It's just a massive [sic] issue though, since it's possible to go back to the note by pressing the back arrow and selecting the note again

/// The following is my pure speculation, so not verified or vetted, but maybe you are already starting to suspect similar issue?

it would appear that perhaps upon cold start, the app lifecycle management is maybe starting twice (or some such similar behavior)? The first "startup" the data is present, but the second time (or suspected reload), the data goes missing and therefore you end up with a missing x-callback-url as is the case for this issue. Or as is the case for the other issues, you simply just end up on a blank screen, as the inner react UI framework was unable to figure out where to go (data lost or not received). So there must be some interaction between the android wrapper (in terms of app lifecycle management and passing state data), and the inner react framework.

@tiberiusteng
Copy link
Contributor

@GonzRon I think it's a different issue. React-Native have two different code path to handle incoming URLs when app is already open or causing app launch, and previously I only handled it when app is already open. I've created a PR handling app starting case (#11280).

@GonzRon
Copy link

GonzRon commented Oct 28, 2024

@tiberiusteng I'm almost 100% you are correct and I was wrong! Similar symptoms but different root cause. You nailed it sir! TY!!!!

@GonzRon
Copy link

GonzRon commented Nov 10, 2024

@tiberiusteng I can confirm 3.2.1 android issue is fixed :) 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We'll get to it... eventually... enhancement Feature requests and code enhancements mobile All mobile platforms
Projects
None yet
Development

No branches or pull requests

5 participants