Hi, in our app we share messages which might contain photos. I would like to open this photos using the photo gallery so they will be downloaded on the user’s phone. Exactly like it is done in Viber. Does anyone have an idea how to do this???
You can images of the library with the cordova-camera-plugin. And you can download files using the crodova-file-transfer-plugin.
Hi bengtler, thanks for the answer. In fact I use both of this libraries already in the app. However, they are not sufficient. The first one is only for taking pictures or uploading them from the gallery. The second one is just for file download, thus the picture will end up in the download folder on the phone. Again, I would like to have something like Viber, when clicking on the picture, the same is downloaded and opened in the gallery.
the file-transfer plugin folder can download a file, but you have the posibility to write it to the library --> you can get the folder via file-plugin
Thank You very much. I did tried that today, however, in RC4 " fileTransfer = new Transfer()" simply blocks any further execution. I have a running workaround that does the download in the download folder. I will use it for the time and then retry as soon as RC5 is out.
ehm… good morning!
RC5 is out there for almost two weeks:
Updating… I will report as soon as I try again with RC5
RC5 the same situation. “const/var/let fileTransfer = new Transfer();” blocks execution. I do not know if ti is related but I have noticed from other scenarios that since RC4 the null pointer exception does not appear, it just blocks execution.
and you wrapped the usage of Transfer in platform.ready()? To be sure, that cordova and the plugins are ready? And you added the plugin to your project? --> It will not work in the browser, only on device or ionic view
Your persistence forced my to recheck everything. Turned out that the plug-in was not installed well. THANK YOU VERY MUCH. I hate that since RC4 ionic does not report errors and the build time since RC1 is catastrophic. (I started my project with beta 9).
and now go and update to ionic fiiiiinnnaaaalll!