cordova-plugin-file

Cordova - download with direct link

情到浓时终转凉″ 提交于 2021-02-10 19:32:04
问题 I want a direct download from an external link in my project. however, when I click the link, Chrome, Explorer browser opens first. Then the file begins to descend. The platform and plugins I use in the project are below. I would like your support. <!DOCTYPE html> <html> <head> <meta name="format-detection" content="telephone=no"> <meta name="msapplication-tap-highlight" content="no"> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width

out of memory error when calling readAsArrayBuffer method on FileReader of the cordova-plugin-file (iOS)

随声附和 提交于 2021-01-29 08:18:15
问题 On iOS I'm trying to upload videos to my own website and to do so I use the FileReader.readAsArrayBuffer method with a chunkSize of 1048576. I upload chunks when the onprogress event fires and all of this actually works perfect except for bigger files. When trying to upload a file of 1.33GB i'm getting a out of memory exception when calling the readAsArrayBuffer method. I guess this is because it's trying to reserve memory for the complete file, however this is not necessary. Is there a way

Able to read downloaded on-demand resource in iOS Simulator but not on physical device

不羁岁月 提交于 2020-04-27 10:41:42
问题 I am using Apple On-Demand resources to try to load a game inside my App. The ODR retrieval works well (with a custom plugin that I developed) but then I am able to read the downloaded on-demand resource only on the simulator, I cannot do the same on a physical device ! The path of the downloaded file that I get through the Objective-C code of my custom plugin ( NSString *path= [[NSBundle mainBundle] pathForResource:@"flying-block-game" ofType:@"html" ]; ) ..is the following: Simulator [odr]

cordova.file.* (all directories) are null

做~自己de王妃 提交于 2020-01-11 09:42:42
问题 I'm working on Ionic mobile app development. My requirement is to create client side logger to track issues in app. I used the methods mentioned in https://github.com/pbakondy/filelogger, and I could able to create the log file in both Android and iOS. For the first time when I open the app, it creates the log file in cordova.file.dataDirectory, when I close and reopen the app in i*OS , I'm trying to read the content of the file which was created using the below $fileLogger.getLogfile().then

cordova-plugin-camera: Permission Denial: reading com.android.providers.media.MediaDocumentsProvider requires android.permission.MANAGE_DOCUMENTS

浪尽此生 提交于 2020-01-07 09:03:09
问题 I have an ionic mobile app and in my app, I want to be able to select images from gallery but I get this error after selecting the image java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaDocumentsProvider uri content://com.android.providers.media.documents/document/image:58 from pid=2173, uid=10062 requires android.permission.MANAGE_DOCUMENTS, or grantUriPermission() this is my code to select image from gallery and add it var options = { destinationType

cordova-plugin-camera: Permission Denial: reading com.android.providers.media.MediaDocumentsProvider requires android.permission.MANAGE_DOCUMENTS

戏子无情 提交于 2020-01-07 09:03:02
问题 I have an ionic mobile app and in my app, I want to be able to select images from gallery but I get this error after selecting the image java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaDocumentsProvider uri content://com.android.providers.media.documents/document/image:58 from pid=2173, uid=10062 requires android.permission.MANAGE_DOCUMENTS, or grantUriPermission() this is my code to select image from gallery and add it var options = { destinationType

Can't get ionic app to work (while developing) if I turn off wifi

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-19 04:42:06
问题 So while developing I turn off the wifi and then the ionic app doesn't work in android device/emulator. But when I turn off wifi with the released and signed apk file for android app works just fine. The thing is I need my app to do something when internet connection is off to do something: if(window.Connection) { if(navigator.connection.type == Connection.NONE) { //doSomething(); } } But since the app doesn't run on emulator nor device if I turn off wifi there is no way I can test if code

No fileEntry results returned on Android 6

て烟熏妆下的殇ゞ 提交于 2019-12-13 20:10:14
问题 I've got what appears to be a file read permissions issue in my Cordova app , but I can't for the life of me track it down properly. Between Android 5 and Android 6, I'm seeing completely different results to the same calls to fileEntry . Does anyone know whether there are needed changes to be able to read files/directories in Android > 5 ? Gory details: I copied the code out to a helloWorld app with just cordova-plugin-file (calling cordova create hello ), and am getting the same results. My