Issue with android 9 call Java method

Post your questions and help other users.

Moderator: Martin

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Issue with android 9 call Java method

Post by anuraag » 22 Apr 2019 07:44

There is no other flow with "Send/Share Intent Received" trigger active?

ziotempa
Posts: 55
Joined: 30 Nov 2018 08:54

Re: Issue with android 9 call Java method

Post by ziotempa » 22 Apr 2019 08:33

No, I disabled the other one (there's only one) and closed automagic from the multitasking before trying :|

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Issue with android 9 call Java method

Post by anuraag » 22 Apr 2019 10:34

I believe stream_uri is getting lost in Android 9 faster than 8. Send/Share Intent Received should provide temp/real file path by default. Hope Martin will add it one day. We may need to create a feature request topic for it.

If you want to buy and use a plugin then AutoShare gives temp/real path variable by default.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Issue with android 9 call Java method

Post by Desmanto » 22 Apr 2019 11:06

@anuraag : Same error here on Pie 9.0. MiXplorer share is fine though, but it is copied to temporary directory first.

I found out that I can use Query content provider to directly get the real path from MiXplorer. But the same flow only get the file name from Whatsapp. I can match with the extra received and test the file existence in whatsapp folder. But the script won't work universally. Tested from CamScanner, it provided a full path using file:/// format, so not need extra query content. It is very complicated to create each handler for each app method.

But so far I only share mostly from these 3 apps, so maybe I will modify my flow to suit to those. Prefer not to use additional app if the workaround exists.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Issue with android 9 call Java method

Post by anuraag » 22 Apr 2019 11:35

Desmanto wrote:
22 Apr 2019 11:06
@anuraag : Same error here on Pie 9.0. MiXplorer share is fine though, but it is copied to temporary directory first.
I have provided temp flow to check that input stream error. So Mixplorer gives correct path with my previous script.
Desmanto wrote:
22 Apr 2019 11:06
But the script won't work universally. Tested from CamScanner, it provided a full path using file:/// format, so not need extra query content. It is very complicated to create each handler for each app method.
There aren't many formats (only 3 as per documentation - android.resource, content and file). I haven't came across file:/// format. Most apps uses content:/// format. And these 2 are used for files. So it is easy to add a line for file:/// format in script.
Desmanto wrote:
22 Apr 2019 11:06
Prefer not to use additional app if the workaround exists.
Same here. Not yet purchased any plugins.

ziotempa
Posts: 55
Joined: 30 Nov 2018 08:54

Re: Issue with android 9 call Java method

Post by ziotempa » 22 Apr 2019 13:23

Ok then.... I'll wait for... for... for what?
I understood correctly that there is a different format for each app? As for me I use only whatsapp and quickpic (which works with the first version of the script)

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Issue with android 9 call Java method

Post by Desmanto » 22 Apr 2019 15:41

@anuraag : I will try to create the handlers for those 3 app first. Let's see how it works out. Will compare to your java call method and see the difference.

@ziotempa : which quickpic version do you use? the old one from xda? I will try to check the way it share the file too.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

ziotempa
Posts: 55
Joined: 30 Nov 2018 08:54

Re: Issue with android 9 call Java method

Post by ziotempa » 22 Apr 2019 15:54

Quickpic 3.5, not the xda version

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Issue with android 9 call Java method

Post by anuraag » 29 Apr 2019 22:00

Martin has added a workaround in latest EAP which is working.

Here is a modified flow to support for uri starting with "file://"
Attachments
flow_Get_file_name_file_type_file_path_20190707_124407.xml
Fixed getting path for external sdcards.
(5.6 KiB) Downloaded 950 times
Last edited by anuraag on 07 Jul 2019 07:16, edited 3 times in total.

ziotempa
Posts: 55
Joined: 30 Nov 2018 08:54

Re: Issue with android 9 call Java method

Post by ziotempa » 30 Apr 2019 01:00

Sorry, what EAP stands for? Because I imported this flow and it still doesn't work when I share the image from whatsapp

Post Reply