Do I use AIR or native code for iOS application? - ios

I have been using Flex for desktop development for years. I'm new to mobile development and need to create an app for the iPhone 6 but have no idea whether I should be using Flex/AIR or native code.
The requirements of the iOS app is as follows:
Record video to local storage within app
Playback video from local storage within app
Pause/seek video within app
Overlay controls on top of the video such as TextInput, TextArea and DropDownList so user can make notes as video is being recorded
Data entered via TextInput/TextArea/DropDownList is saved to local storage
Option to upload video and text data to local server
Can I achieve all of this using AIR or should I be using native code?

Can I achieve all of this using AIR?
Yes. Use CameraUI to capture video on the device (using the device's native camera UI), and StageVideo to play the video (using GPU). Overlay your app UIs (Flex or your own) to control video playback. Save local data using File or EncryptedLocalStore or SharedObject. Upload to a server using File/upload().
Or should I be using native code?
That's up to you. There are trade-offs, and everyone will have their own opinion. If you have a lot of experience with Flex/AS3, then you should be able to work out this app in AIR quite easily and see if it meets your needs.

You can achieve this using Adobe AIR but performance will get a hit.
You will need a lot of effort in order to optimize performance especially for video capture functionality.
It is better to do it natively.

Related

Xamarin.forms youtube video

I know this question has been asked before but I can't seem to find a satisfactory answer. First off I'm very new to Xamarin.forms and mobile app development in general. I'm working on a small time sensitive project. One of the requirements is to have a youtube video play from within the app in both iOS and Android (the link to the youtube video comes from a DB). I used a WebView but it doesn't seem to work well in Android. I also came across the following in another thread:
"When it comes to streaming video on iOS and Android playing that content in a Webview control with or without Xamarin.Forms would be the incorrect choice. Webviews vary on each device and their codec support for HTML5 and H264 video also vary. Both iOS and Android have their own native video players that can play and stream video.
For iOS you have a few options such as AVPlayer or MPMoviePlayerController: http://developer.xamarin.com/recipes/ios/media/video_and_photos/
For Android you could simply use the default VideoView http://developer.xamarin.com/recipes/android/media/video/play_video/ or you could use the binding around the new ExoPlayer: https://github.com/martijn00/ExoPlayerXamarin
You would simply need a custom renderer to bring these into Xamarin.Forms, which would be very simple to do"
I've never done Xamarin.iOS nor Xamarin.Android development before. If someone can provide a simple prototype then that would be great.
Take a look at "Delivering Rich Media Experiences with the Xamarin.Forms Video Player" (https://blog.xamarin.com/delivering-rich-media-experiences-xamarin-forms-video-player/). Github: https://github.com/adamfisher/Xamarin.Forms.VideoPlayer

Streaming AAC+ (inside FLV) on iOS using AIR

For a streaming radio station, I have an AAC+ audio stream, inside an FLV container, delivered via HTTP. An example URL is http://3023.live.streamtheworld.com/ALTROCK_S01A_AAC. I wrote a simple AIR app (using the latest AIR and Flex SDK's) to play this stream, and it works fine on PC and Android, but doesn't play anything when deployed to the iOS simulator or a device (i.e., the bytes are loaded but there is no sound).
This is similar to Can FLV AAC stream be played in Android, but for iOS.
I wanted to use AIR in this scenario, since I need to listen for the Cue Points in the FLV - and this is easy to do if you're playing Flash in a web browser, so AIR seems like the natural choice. I have also looked at http://code.google.com/p/haxecast/ and https://code.google.com/p/project-thunder-snow/ but they all seem to use the same basic idea (parse the FLV using Netstream in "data generation mode" and feed the AAC+ data to a Video object) - and so they all hit the same wall on iOS.
I also came across this post which seems possibly related although it's not quite the same situation (e.g., it's not FLV).
Is AIR on iOS supposed to support this scenario- namely, streaming AAC+/FLV audio via HTTP?
EDIT: This post also appears to hit the same obstacle - so a lot of people are asking about this situation. Anyone from Adobe have any insight?
After much further research I've concluded that AIR on iOS just doesn't support this, and you have to build a native app (or at least use framework other than AIR) instead.

How can i capture what's being played on an iOS device output audio stream and store it in an object?

Is there a way to programmatically capture what's being played on an iOS device audio output? I want to capture an audio snippet and do some data processing on it.
There is an entire library devoted to this sort of thing that Apple built in for you called AVFoundation.
It's extensive and sprawling, so be prepared to do some work, but you'll be able to sample and manipulate the bit-streams directly with all types of audio.
If you are trying to have your app run in the background and strip audio from another app (like iTunes) or from the phone itself, put on your black hat, hack into the private API's of iOS, and release your stuff over in the jailbroken app-store, because that sort of thing is explicitly designed to not be possible with legal and legitimate apps.

Capturing Video on Mobile device using Adobe AIR

I am tasked with creating a video recording app for mobile devices (iPhone, iPad, Android) where the users are asked to record a short clip using their phones/tablets.
The video is then uploded to a server (either within the same app or a secondary app/site or via email)
Is it possible for an AIR app to record and save quality video and audio to the camera roll/gallery, or alternatively open the built-in video recorder app from the AIR app?
I am stuck between attempting this using Flash CS5.5 and deploy to iOS and Android using one code base, or building native apps and possibly duplicating my workload.
If I attempt the AIR route, will I hit problems with quality/resolution/usability etc? Or should I stick to building a native app? Time is of the essence too :)
I've done lots of research and not really found anything to swing my decision.
Thank in advance.
P

Saving video screencast of iPhone application

Is there a way to capture video of a screen from your own application? As far as I see there is no way to do it with UIImagePickerController (cameras only), but maybe there is a way to do it with iOS 4 AV Foundation or Core Video?
There seems to be two ways of capturing the content of the application while it's running:
Use the private API UIGetScreenImage() function which seems to be accepted by Apple now;
Use the following thread's captureView method to capture the image.
You'll have to capture it at many times per second (I guess 24 times should be ok for human eye persistence) then you'll have to produce the movie. Perhaps you could use the ffmpeg iphone port.
Alternatively, if you'd like to capture your application's running for a demo, your best bet would be to run your application on the simulator and use a Mac OS X screencast software to capture it. See also SimFinger which "bundle of little tricks to make a screen capture of the iPhone Simulator suck less".
Finally, perhaps the following StackOverflow thread might help you produce better screencasts.
SimFinger and ScreenFlow are great if you can shoot in the simulator.
If you have to shoot on the device (e.g. when accelerometer, GPS, camera, etc. are used) you currently have to resort to the jailbreak world. The app "Display Recorder", available for $5 in the Cydia Store, allows to create an AVI movie of the iPhone's screen content. This works across all apps. There's a YouTube video showing it. The movie files can then be uploaded to YouTube or pulled off the iPhone via the built-in web server.

Resources