Image save
Moderator: Martin
Image save
Hi there
Is there anyone who can explain how to build a Flow with which, whenever I share an image from any application, it would take that image and save it to a specific folder (I would declare the path in the Flow itself)?
Is there anyone who can explain how to build a Flow with which, whenever I share an image from any application, it would take that image and save it to a specific folder (I would declare the path in the Flow itself)?
Re: Image save
There is a share option "Store as file".
Re: Image save
Hi, not all programs have this option and my request is just a part of a more complex Flow, so I want to do other things on the file. What I don't know is how to receive the image share action with automagic and how to save the image received
Re: Image save
When you share an image or file then there is 2 option by Automagic provided. One Send/Share Intent and Store as file.
If you use first one then you have to use send/Share Intent Received as trigger and then query Content Provider action or java script.
If you use first one then you have to use send/Share Intent Received as trigger and then query Content Provider action or java script.
Re: Image save
Thanks, it seems exactly what I need. Is there any detailed guide to do it?
Re: Image save
Edit: New flow http://automagic4android.com/forum/view ... 5c5#p24596
Here is one i have created for myself. Use debug dialog and check variables
file_name, file_type, file_path.
Later you can use copy file action.
Here is one i have created for myself. Use debug dialog and check variables
file_name, file_type, file_path.
Later you can use copy file action.
- Attachments
-
- flow_Get_file_name_file_type_file_path_20190228_143342.xml
- (6.5 KiB) Downloaded 884 times
Last edited by anuraag on 12 Jul 2019 01:54, edited 2 times in total.
Re: Image save
@anuraag : Oh, I am completely stuck on those java.
Some app started to use content provider to share the file. Whatsapp, MiXplorer and many more. Afaik we can use the built-in action query content provider to do it, but I still can't get it right.
Some app started to use content provider to share the file. Whatsapp, MiXplorer and many more. Afaik we can use the built-in action query content provider to do it, but I still can't get it right.
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Image save
GREAT! Thank you very much... I'm sorry because i thought it would be easier, I don't know if I'll be able to get the meaning of all that code. Anyway it does what I need.anuraag wrote:Here is one i have created for myself. Use debug dialog and check variables
file_name, file_type, file_path.
Later you can use copy file action.
Would you tell, without entering into much detail if you don't want, what does all that code do?
Re: Image save
@Desmanto you are correct. We can use built-in action query content provider to get infos. But we can't get file path from all apps like web browser. We can't get real file path. In my case i am not getting file path from whatsapp also.
And for MediaProvider(content://com.android.providers.media.documents/), DownloadsProvider(content://com.android.providers.downloads.documents/), ExternalStorageProvider (content://com.android.externalstorage.documents/) we have to use multiple query Content Provider action. When using multiple action there is always chance we lose the stream_uri connection.
So above flow uses multiple query Content Provider and gets real path of those and when its unable get path (browsers or other apps) then file will be copied to "Android/data/ch.gridvision.ppam.androidautomagic/cache/tmp" and give temp file path.
Above action can also be used after Automagic's action start activity (build-in example pick file) to get file path.
I have created it using help from stackoverflow codes.
@zeotempa let me know if above isn't enough?
And for MediaProvider(content://com.android.providers.media.documents/), DownloadsProvider(content://com.android.providers.downloads.documents/), ExternalStorageProvider (content://com.android.externalstorage.documents/) we have to use multiple query Content Provider action. When using multiple action there is always chance we lose the stream_uri connection.
So above flow uses multiple query Content Provider and gets real path of those and when its unable get path (browsers or other apps) then file will be copied to "Android/data/ch.gridvision.ppam.androidautomagic/cache/tmp" and give temp file path.
Above action can also be used after Automagic's action start activity (build-in example pick file) to get file path.
I have created it using help from stackoverflow codes.
@zeotempa let me know if above isn't enough?
Re: Image save
Thank you, for now it's enough. It works flawlessly!