Page 1 of 1

How do I save an image from URI???

Posted: 08 Feb 2017 19:16
by maxxyypoo
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!!!!! (:

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

Posted: 08 Feb 2017 20:52
by Martin
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

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

Posted: 08 Feb 2017 22:57
by maxxyypoo
I just tried that and it failed and said no such file or directory. :/
Any more ideas? Really want this to work :/

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

Posted: 10 Feb 2017 21:26
by Martin
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

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

Posted: 11 Feb 2017 00:26
by maxxyypoo
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...

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

Posted: 12 Feb 2017 14:33
by Martin
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.

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

Posted: 12 Feb 2017 20:25
by maxxyypoo
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