write file with ionic, plug in Phone, copy away? - ionic-framework

I've just seen that there exists a cordova extionsion to write files in ionic.
But. What am i supposed to do with it? I mean a Usecase would be "create File, Plug-in Mobile, Copy to to Computer" but this I guess isn't supported by iOS at all.
So my questions are:
What is $cordovaFile meant for in ionic?
Is it possible to to realize the above Usecase in android even though it's clearly not in iOS?

Quote from the github page:
This plugin implements a File API allowing read/write access to files residing on the device.
Maybe you would want to download an image and save it to the sd card for example (you would need filetransfer plugin to download the image). More info about the plugin you can find here.

Related

How to upload image in flutter Integration Test?

I have one image file that I need to upload it in Integration Test Flutter. I am not getting any help from Flutter : Integration Test documentation
I have created one folder
test_upload_files and added .png file in it and wrote the object identification of Upload Feature
then I have fetched the path of the file and tried to upload it but there are no predefined methods to upload.
I got stuck here, how to automate this Upload Functionality ?
and there is one more catch, need to enable location or camera which is from Native app, is there any solution to enable these services by default, like how we do it in Web applications using Browser Desired Capabilities?
By using flutter code can we interact with Native apps of apk and ios ?
[1]: https://i.stack.imgur.com/wvBLr.png
See the Patrol project – it lets you interact with native permission dialogs, and basically everything, from within your Flutter integration test written in Dart.
This issue demonstrates how you'd upload a single file on Android.
Disclaimer: I'm the main developer of Patrol.

How to store files in directory that will be accessible to user in flutter?

I have encountered a problem that the app needs to save pdf files downloaded from the internet in the downloads folder in both ios and android, but after searching for solutions on the internet I have not found anything that would help in this implementation. I would appreciate if someone could share their experience in implementing such functionality.
It would be better if you can add more details to your questions. It is preferred that you should attach some code or screenshots of your code so that you can get better help.
every app in android or ios has its own folder in the device storage, android apps will be in the android directory.
you can use the path_provider plugin to get the directory of your app, all the information you need will be in this link

Is it possible to Flutter apps to write on iCloud/Google drive?

I am new to flutter and am trying to figure out if there is a way in flutter to write a file to iCloud (iOS) or google drive (Android). There seem to be APIs to do this in Swift/Android native dev, but I can't find anything in a flutter.
I essentially want my app to write on a text file in iCloud so that another install of the same app on a different phone by the same user can access that file. I'm trying to do this without my own cloud setup (no firebase etc, since it's so simple and small), so I thought iCloud/gDrive would be perfect.
The icloud_storage package does upload and download with iCloud.
The googleapis package provides rudimentary support for the Drive API. You'd want to use the google_sign_in for authentication as shown here.
I looked into it a while back but didn't continue due to how young it looked.
I've got no experience with iCloud so I can't really help you there, but I think you'd need to write your own platform plugin or use an HTTP API, if one exists.
I know that I'm late to the party but there is this module
https://pub.dev/packages/file_picker
I haven't used it myself but they seem to support iCloud

File Picker plugin

Looking to see if anyone knows of a File Picker plugin similar to the image_picker, but for files, so that they can be uploaded from a mobile device.
Looking for a plugin or any example if anyone has done it already.
Thanks for any help.
I started hacking this together. I got it basically working for android. Here is the repository.
It actually copies the selected file to the app's temp directory and then provides the path, since there's no way I can see to get the file data from the OS to flutter.

opening a file in its native program with GWT

I wanted to open the files available in my web application to its corresponding native apps in PC. I have created the set of program to download the file from web app but didn't know how to set that files to open with native app in system. kindly help me in this. If you have any other options to use rather than downloading and displaying the file please suggest me.
Note: I am using eclipse to develop web app
This problem is not related to GWT. Just provide links to files in your app. When a user clicks on link, user's browser/PC will decide what to do with a file. It will either open the file within a browser (PDF, images, some video and music files depending on a browser), or it will offer to save them.