Items shared to Android not saved

Running Joplin 1.3.13 on Android 10

If I share to Joplin from another app, using Android's standard system share feature, a new Joplin note opens and is populated.

If I tap the back button, the note is saved. If I use the left-arrow at to top of the Joplin note, the data is lost.

Can anyone replicate this?

1 Like

Can confirm this, and it seems quite urgent (same version, android public)

Though for me, the note simply doesn't save unless the text is edited. Clicking android back, or the back arrow in joplin, both fail to save the note. Same thing if I just switch apps and close the note window

Reddit thread about the same: https://www.reddit.com/r/joplinapp/comments/ju7epp/android_sharing_doesnt_work_as_intended/

I looked at github, but all the old issues for this seem quite dated and talking more about gsoc and react native libs. I imagine all those issues are kinda stale, since share was re-enabled

Anyway, seems like it should be an easy fix (unless it's something really hard like implementing a background service for Joplin). Though you'd think clicking the back arrow in the UI would force a save before the app closes itself

1 Like

I didn't test thoroughly... I suspect I missed the root cause and had edited the note that saved, since I usually change the note's notebook at least.

This issue seems to have been fixed and to be included in the next update.

Nice! Good find

This is still broken. Joplin updated for me today.

I can't reproduce this on Joplin 1.5.1. It works as it is supposed to.

It appears to fail with the Android back gesture, but works with the Joplin back button. Does it save for you in both cases?

Ah, ok. I'm on Android 10 and I use those 3 buttons at the bottom. I don't have the back gesture, so I can't tell you.

But it is quite possible that there's a difference, even though IMO there shouldn't be one. Back should be back, no matter how it is invoked.

P.S.: maybe @roman_r_m has an idea about this. He's very knowledgeable about Android development.

Just tried this on 1.5.1 with all three methods and the note saved for me each time (android 10).

Ok, it works for me sometimes but not others. If I had Joplin open recently, the note will save. If I haven't, it doesn't work. At least that's what I believe I'm seeing. If I make a change to the note before saving, it saves every time as it did before the bug fix.

It reminds me of this issue, with how behavior changes apparently depending on whether Joplin is in memory or not:

Do you mind trying on a fresh phone reboot or after force closing Joplin?

So, without Joplin recently opened: share a link to Joplin from the browser, don't change the note at all, then use the back gesture to exit the note. Reopen Joplin and see if it's there.

Gave it a go and still can't replicate it unfortunately

  • Changed navigation back to gestures instead of navigation buttons & rebooted phone
  • Opened Firefox, pressed 'share' icon, selected Joplin
  • Without touching anything else, swiped from left to right to go back (app closes, focus back on Firefox)
  • Opened Joplin - Note is present in list

  • Rebooted phone
  • Opened Firefox, navigated to a different webpage (to make sure no funny business happening with note history), pressed 'share' icon, selected Joplin
  • Without touching anything else, pressed 'back' arrow in top left of app (app closes, focus back on Firefox)
  • Opened Joplin - Note is present in list

(I then went back and repeated the first test with a different webpage - again to make sure no funny business with the history - same thing happened).

Thanks for the testing and detailed info! I need to have a think and see if I can figure anything out about why it might not be working on mine. Just curious, do you use the "New Note" shortcut functionality I mentioned at the link above? Does it also work for you every time?

Have to admit I didn't know it was a feature. I rebooted my phone and it worked fine, straight into a new note.

Maybe try again? That one seemed to work the other way around: only after using the app recently did the shortcut stop working.

You are correct, I did it the other way around and it didn't work:

  • rebooted phone
  • long press icon->new note
  • new note is made, clicked back to exit new note creation (joplin displaying notes list)
  • long press icon->new note
  • Joplin displays note list, not creating a new note

I can reliably reproduce this on a stock Samsung Galaxy S9 running Android 10.

If you force-stop Joplin, then share to Joplin from Firefox, don't edit the note, and use any of Android's back button, Android's back gesture or Joplin's back arrow, the note won't save.

If we repeat the above, but hit the Joplin edit button before returning to Firefox, the note will save.

If Joplin has recently been open, the note saves as expected, but I can't tell how recently it needs to have been used - I guess that's down to Android's application management mechanism.

Hopefully this might help track down the problem? If there's any more details or logs I can supply, please shout! :slightly_smiling_face:

2 Likes

Just tried this again with the latest Joplin, and it works for me. Might be something specific to Android 10 as I am on 9. In this case I am unlikely to be able to help as I do not have an Android 10 device to debug.

I can also replicate using @timf 's method. I'm also on Android 10.

@Daeraxa are you on Android 10?