NemoStein
NemoStein

Reputation: 2098

Taking photos and video with CameraUI: MediaPromise.file is null on iOS

I'm developing a AIR App that asks the user to take a photo or video and upload it to a server.
Everything was OK with Android, but I found out that MediaPromise.file was null on iOS.

I don't need/want to manipulate the image/video at all, I just need to get this File/FileReference and upload it to the server.

My problem is that, as iOS doesn't give me a File from the MediaPromise, I don't have anything to upload.

Googling around I found out how to, asynchronously, load the the data (with the Loader.loadFilePromise()) from the promise, but I don't know how to encode it as a video when I call camera.launch(MediaType.VIDEO); (where camera is a CameraUI instance).

I'm handling the camera.launch(MediaType.IMAGE); call just fine already, but I really want to get the file directly from the OS, if it is possible, so I don't need to encode it myself.

To sum it up, I need to upload the photo/video the user just took with the CameraUI API on the iOS. How can I do this?

note: I can provide some code if needed...

Upvotes: 1

Views: 1793

Answers (1)

Lagoo87
Lagoo87

Reputation: 621

This seems to be what you're looking for...AIR for iOS - Taking & Uploading Photos

Upvotes: 1

Related Questions