In this chapter, we move back to native Xamarin. We will integrate native audio functions for processing a sound file using the AVFramework
in iOS with the AVAudioSessions
, AVAudioSettings
, and AVAudioRecorder
objects. In Android you will use the MediaPlayer
object from the Android.Media
library.
Expected knowledge:
Some knowledge of either iOS
AVAudioSessions
,AVAudioSettings
, andAVAudioRecorder
, or the AndroidMediaPlayer
andMediaRecorder
classesNSLayoutConstraints
In this chapter, you will learn the following:
Project setup
Inversion of control with MVVMCross
View models with Xamarin native
Creating the bindings
NSLayoutContraints
MVVMCross setup inside the Portable Class Library
Setting up MVVMCross with iOS
Setting up MVVMCross with Android
The
SoundHandler
interfaceImplementing the iOS
SoundHandler
using theAVAudioPlayer
frameworkThe Mvx IoC container
The audio player
A cleaner code approach to
NSLayout
Creating
AudioPlayerPageViewModel
Implementing...