Flutter web how to get image using camera and upload to firebase storage - camera

I want to know how to get image using camera (not gallery) in flutter web. Currently i am using image_picker package, but i cannot get image as File. That package return NetworkImage. Also I tried using image_picker_web. In that package i can get html.file, but i cannot get it using camera. Are there any solution for this?

Let's rock buddy....
Check these resources, it seems pretty same to your scenario;
https://github.com/flutter/photobooth
https://medium.com/flutter/how-its-made-i-o-photo-booth-3b8355d35883
try to gain knowledge and learn from these open source project. Reply back if this is helpful to sort out the problem or share with us how did you solved it.

Related

How do I setup the Agora API into Bubble.io?

I've downloaded the plugin and set up the account on Agora.io, then linked the account from project management to the interface into Bubble. Once I placed the Agora Connector into the design interface in Bubble and added a few groups and buttons, I have no idea how to set the workflows to get the video conferencing to work.
I've been using the Zeroquode documentation but I have no idea how to get past this point. I tried to copy and pasting the Demo version and editing that but there seem to be problems with my custom states. Any links or documentation would help. Thanks in advance.
I haven't seen people using Bubble with Agora yet. But Agora released the plugin for WordPress and released the code. Maybe you can check it out to get some ideas?
https://github.com/AgoraIO/Agora-Word-Press

Expo + React Native - PDF Creation & Download

Is there a reliable way to create a file (specifically via Print.printToFileAsync API), and since it creates the new file in the user's cacheDirectory, copy it across to their documentDirectory - that works in both Android and iOS?
I've come across others trying to do the same thing here, but to no avail.
One solution I've seen is to use the MediaLibrary API to download the file to the device's CameraRoll - but this is hacky and doesn't work on iPhone since the file I'm trying to copy/download is a PDF, and not an image/movie.
Various solutions are listed here too - but they either don't work, or only work in one OS.
My end goal is to be able to generate a PDF on the device and save it to the user's storage, without needing to send information back to the server.
My app is not ejected as it stands.
Any advice/direction would be appreciated!
EDIT 1:
Considering ejecting at some stage, but due to the nature of the project I'm working on I'd prefer to do that right at the end. Also came across this post which tries to Share the file URI, but this isn't supported on Android.
I hope you dont have any problem with creating the pdf,to save the file have you tried
https://github.com/Lyrillind/react-native-file-manager
it supports both anroid and ios.
If you want you can build your own native module to save the file ,
http://facebook.github.io/react-native/docs/native-modules-ios.html#content

Titanium: Best place for storing secret files

Since i cant play an audio file from a DB blob, i have to write it as a file, before i can play it.
Looking at the documentation, my choices are:
Ti.Filesystem.applicationDataDirectory
Ti.Filesystem.tempDirectory
Ti.Filesystem.externalStorageDirectory
Ti.Filesystem.applicationCacheDirectory
Considering that i want my file to be secret, so no other app can see that file, what is my best option?
EDIT: So the issue is more with Android, i'm afraid that any file browser will be able to find the file.
I'm assuming you're building for android, because ios data are sandboxed and not readily accessible by default (until ios8). Rather than hiding them, just encode them using base64encode(). And then you can decode when accessing the file with base64decode().
With that said, I've never had to use it. So, I don't have an example. But you can read about it in the api doc.
Hope that helps.
You haven't mentioned if you are building an app for iOS or Android. For example Ti.Filesystem.externalStorageDirectory is available only for Android (SD card).
Anyway if you want to save an audio file, you should save it in <Application_Home>/Documents ,so you should use Ti.Filesystem.applicationDataDirectory. Don't forgot to set up a remoteBackup flag see http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.Filesystem.File-property-remoteBackup
Also have a look at iOS Data Storage Guidelines for more details
https://developer.apple.com/icloud/documentation/data-storage/index.html
*If you want to save an audio file only because you need to play it ,but you don't need to store it in a fileSystem then is better to use Ti.Filesystem.tempDirectory

Is there to read the data from google spreadsheet link in IOS?

i am currently work on an IOS project which is required to read data from Spreadsheet in google drive. I have done some research and i found Google APIs client library for Objective C. However, i still have problem of retrieving data from spreadsheet. i find only the sample code that can read the file in drive from the drive that user login. But what i actually want in this project is using Google Drive as the Database. In short i want to retrieve data from the url like this https://docs.google.com/spreadsheet/ccc?key=0AoYC7S60-ywcdHVZYzh4ZlZ1Y3J5R2ZGbnBqY09jdkE&usp=sharing.
So is there a solution for this kind of problem? and if there a good site that provide a good tutorial to this kindda problem?
Google apps script is probably a simpler option. You can set it up as a web app, and read/write to the spreadsheet via the webapp. The google-spreadsheet-api is hard to use as there is little good documentation.
Refer, Google's Sample Code it can help you. You can also use GData Objective C Client to use it.

Get only largestChangeId in smart way

I am new to this Google Drive SDK. Using Drive as cloud storage for my app. App needs to sync the data in largestChangeId appdata folder. For the first time App needs to get the largestChangeId using changeList API.I believe that the result of changelist API include all details.Which are not interest to me. I am just interested in largestChangeId to store locally to subscribe for changes feed in future.
How can I tune changeList API to just get only largestChangeId?
Are there any other alternative way or API to do this in smart way?
Your help is appreciated.
You can get largestChangeId only by using About.get() with fields parameter specified.
GET https://www.googleapis.com/drive/v2/about?fields=largestChangeId
This will simply return
{
"largestChangeId": "{{WHAT_YOU_WANTED}}";
}
And you're already doing it in a smart way :)