本文介绍了找不到在gallerie文件的PhoneGap下载它的Andr​​oid后,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的PhoneGap应用程序内为Android的下载文件有问题。该下载功能,从实际的PhoneGap 中工作得很好我认为。它从URL获取该文件并它存储在SD卡。 (code是下文)

i have a problem with the the downloaded files in my PhoneGap-App for Android.The download-Function from PhoneGap actually works quite well i think. It gets the file from the URL andstores it on the SD-Card. (Code is below)

那么问题出在哪里?当我下载一个JPG或PNG到下载文件夹中,我希望它是通过本机库进行访问。但画面鸵鸟政策出现在gallerie。要看到它,我要重启手机或者我必须使用另一个应用程序像天文。

So where is the Problem? When I download a JPG or PNG to theDownload-folder, i want it be accessible through the native Gallery.But the picture don´t appear in the gallerie. To see it I have torestart the phone or I have to use another App like Astro.

有没有Refresh_the_native_Gallerie - 功能或类似的东西?

Is there a "Refresh_the_native_Gallerie"-Function or something like that?

非常感谢你。

try {
     var filePath = 'file:///mnt/sdcard/Download/google.png'; // Correct filePath
     var url = "https://www.google.de/images/srpr/logo3w.png"; //Correct URL

     var fileTransfer = new FileTransfer();

     fileTransfer.download(url, filePath, function(entry) {
         console.log("s3_download download complete: " + entry.
         // Do i need a "Refresh_all_other_Apps"-function here?
     }, function(error) {
     // Normally no Error
         console.log("s3_download download error source " + error.source);
         console.log("s3_download download error target " + error.target);
         console.log("s3_download download error code" + error.code);
     });
} catch (e) {
     console.log("downloadTest ERROR: " + e);
}


不能回答我的问题如此之快只能编辑我的问题。因此,这里的答案是:


Cannot answer my own question so fast only edit my question. So here is the answer:

我写了一个小的PhoneGap,插件,它实际上没有什么比调用从zapl的code。再次感谢。希望这将帮助别人同样的问题。

I wrote a little PhoneGap-Plugin, which does actually nothing more than calling the code from zapl. Thanks again. Hope it will help someone with the same problem.

您可以在这里找到code: https://github.com/philipp-在-greenqloud / pluginRefreshMedia

You can find the code here: https://github.com/philipp-at-greenqloud/pluginRefreshMedia

推荐答案

我写了一个小的PhoneGap,插件,它实际上没有什么比调用从zapl的code。再次感谢。希望这将帮助别人同样的问题。

I wrote a little PhoneGap-Plugin, which does actually nothing more than calling the code from zapl. Thanks again.Hope it will help someone with the same problem.

您可以在这里找到code: https://github.com/philipp-在-greenqloud / pluginRefreshMedia

You can find the code here: https://github.com/philipp-at-greenqloud/pluginRefreshMedia

这篇关于找不到在gallerie文件的PhoneGap下载它的Andr​​oid后,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 14:28