How to upload image in flutter Integration Test? - flutter

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.

Related

Getting the original File/Image path after picking it using Flutter

I am developing a photo vault using Flutter. I need to list all the images in the mobile storage, and when the user picks one or more images. I need to move that image(s) into App Private. So that no other app can see it. So for moving the file, I need the location/path of the picked image(s). which no plugin on earth is providing.
Below is the list of plugins I tried. Each one of them provides the path of the image copied to the app private directory. No the original one
file_picker 2.1.6
image_picker 0.6.7+22
multi_image_picker 4.7.15
It would be a big help if you could suggestion some solution for it.
Thank You

How to do Remote Updates On Flutter

I have a flutter chat app. Companies like Whatsapp & Facebook update their app without forcing users to uninstall or manually uploading the APK again to google play. Is this possible with futter i tried using firebase remote config but it didn't work as i expected ( Changing UI on the go ). Any answer will be appreciated.
WhatsApp and Facebook use React Native with CodePush (if I'm not wrong).
You can't update an app without forcing a user somehow to update the app from a store with Flutter as it compiles to binary and React Native – not
There are multiple things you can do and it is based on what you want to achieve. [From your question your goal is not clear.]
Change Something based on configuration.
If you have configurations defined then you can use Firebase remote config to pass on value to devices and devices should behave according to value that you have set on Firebase Remote config.
Limitation of this approach:
In this approach, don't expect your newly updated code will into existing app. Above approach works, if code is already there in the compiled binary and you just want to switch path.
Binary version update:
If you want to force new app version download then it would require a different approach,
Android: Yes it is possible.
iOS: In-App update is not possible. You can show prompt to user by saying that new version is available and redirect user to new version on Store.
If user has enabled auto-download in iPhone settings then there are chances that app version updated to new version when user come to app.
For implementation look at here: Binary version update
Flutter now has unofficial support for code push using Chimera Flutter Code Push.
Here is a full tutorial

How to dynamically download and execute Dart code in a flutter app?

I have a flutter mobile app and i would like to be able to download dart code into the app and execute it. The downloaded code is fully trusted i.e. it comes from API calls to the mobile apps backend. There are two cases.
Non UI downloaded code: This is downloaded dart code that can interact with the network and and do some data structure transformations. It might also want to interact with the SQLLite database used by the app.
UI code: code that can interact with specific widgets on the screen or draw new widgets?
Can the above two dynamic code execution be done in a production flutter app that has been complied to native code?

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

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

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.