Sixmoraltales

Results 11 comments of Sixmoraltales

I'm sharing the URL from a mobile browser chrome for example. Would the webpage title be in Intent.Extra_Subject? Or do I need to parse the title and put it in...

So something like this? if (Intent.ACTION_SEND.equals(action) && type != null) { if ("text/plain".equals(type)) { String input = intent.getStringExtra(Intent.EXTRA_TEXT); String title = intent.getStringExtra(Intent.EXTRA_SUBJECT); successCallback.invoke(input, title);

Any recommendations on how I would ensure it's not mandatory?

With this adaptation of the .getSharedText function, the value of "title" is undefined after share action from browser (but perhaps there's something wrong with the way I added "title: string"...

Is there a way to get the title of the webpage? In javascript this is quite simple. It must be possible on Android!

Oh, but this will create delay in the display of the webpage title. So it will be necessary to pass the URL to a view that invisibly loads the page...

Thank a lot for your help! I can't believe Chrome doesn't provide the webpage title to the share action. Sheesh.

Hmm. According to this, the title should be included by Chrome: https://paul.kinlan.me/parsing-screenshot-from-chrome-for-android-send-intent/

Ok, so it does grab the title and the URL. I just can't get both through the callback with successCallback.invoke(input, title). Any suggestions on how to get two values through...