Android: share to Joplin with null

Hi. I recently realized there’s Joplin in the Android standard “share” menu. Great.
I tried storing a website that way and it works, but there’s “null” value in the 1st line of body. What’s supposed to be there? See attached.
OP6 on Pie.
shretoJo

Thanks for putting to my attention to the "Share" button. I had not seen that :slight_smile:

Works fine for me. No "null", just the URL on the first line of the new note & cursor is blinking in the empty title field.

Tested on Firefox and Chrome on Android 6.0.

I don’t see that null value either. I’m also on Pie. Which version of Joplin are you using? I’m using the latest version from the Playstore.

Correct, the latest official version.
So it looks like the null is provided by the sourcing app, not Jo. No issue then! :wink:

Ha, wait. That depends.

Do you see this on every page you share to, or only on one specific page? Maybe there’s something on this page that confuses the share functionality. In either case, it could be useful to open a github ticket or post the link to the page that gives you trouble here (that is if the page is not confidential).

Then others could try to reproduce the issue. If it is reproducible we should open a github issue as something to investigate.

The original problem was not caused by a browser, but by an app the serves news feeds. And yes, it seems that in some cases there should be an article title instead of null. For whatever reason it doesn’t always happen.
Everything is fine when sharing via firefox, chrome or reddit; so I’m assuming it’s not Jo issue per-se. I’ll open a github ticket if I see it somewhere else.

Ok, it looks like Joplin prints null in case there’s no title. I assume Joplin does not guard this properly.
IMO it should not print anything, if there’s no title. Well, it’s rather an edge case, but still.

But maybe it’s also a bug in the react-native-share-to module. In that case they should handle the case of an empty title.

It’s an issue with your news feed app. I got an answer from Caleb, who added the share-to functionality to Joplin:

On android the share object only has 2 fields, a mime type and a value. In the case of a url or any other plain text the mime type is text/plain and the value is some plain text generated by the sharing application. For an image or a general file the value is an internal uri where the image or file can be found.

In the example from the forums it looks like the sharing app is adding a title and a “shared via” bit of text to this share value. This is a bug with that specific news app and unfortunately can’t be guarded against on our end.

As expected. Thank you for following up!