How do I save an image from URI???

Post your questions and help other users.

Moderator: Martin

Post Reply
maxxyypoo
Posts: 23
Joined: 28 Jan 2015 08:47

How do I save an image from URI???

Post by maxxyypoo » 08 Feb 2017 19:16

When a new notification comes in, some of them have backgrounds (images, ex: Instagram notifications) A notification displayed trigger: one of the variables that it gives is background picture URI. Now how can I take that and extract the image and save that picture as a file???? I can't figure out pleaseeeeeee help!!!!! (:

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: How do I save an image from URI???

Post by Martin » 08 Feb 2017 20:52

Hi,

Please try to use action Init Variable Image File and use the uri in the file path. You can then use action Save Variable in Image File to store the image in a file.

Regards,
Martin

maxxyypoo
Posts: 23
Joined: 28 Jan 2015 08:47

Re: How do I save an image from URI???

Post by maxxyypoo » 08 Feb 2017 22:57

I just tried that and it failed and said no such file or directory. :/
Any more ideas? Really want this to work :/
Attachments
Screenshot_20170208-145259.png
Here it shows u the output and that's I had a notification from IG with a photo in it.
Screenshot_20170208-145259.png (971.12 KiB) Viewed 15336 times
TheFlow.xml
Here is the flow I used.
(4.11 KiB) Downloaded 795 times

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: How do I save an image from URI???

Post by Martin » 10 Feb 2017 21:26

Maybe the variable notification_background_image_uri was not set so Automagic could not load the image.
Could you please add a condition Debug Dialog to the flow (directly after the trigger), wait for the next notification and then check if the variable notification_background_image_uri is set?

Regards,
Martin

maxxyypoo
Posts: 23
Joined: 28 Jan 2015 08:47

Re: How do I save an image from URI???

Post by maxxyypoo » 11 Feb 2017 00:26

It didn't show up at all in the dialog. Didn't show up as with data or as empty. Completely didn't. But the notification when you swipe with two fingers on it has the image...

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: How do I save an image from URI???

Post by Martin » 12 Feb 2017 14:33

Instagram is likely using another mechanism to show the image. Maybe they use their completely custom notification layout so Automagic does not receive the image URI at all.

maxxyypoo
Posts: 23
Joined: 28 Jan 2015 08:47

Re: How do I save an image from URI???

Post by maxxyypoo » 12 Feb 2017 20:25

Maybe, but app NotiBox that is just made for saving notifications for later is able to also extract that photo and let me save it to my phone. I'd be using it but it keeps crushing and that developer cannot fix it for some reason lol but yeah so technically it shouldn't use any weird thing

Post Reply