O'Reilly logo

NativeScript for Angular Mobile Development by Nathanael J. Anderson, Nathan Walker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using nativescript-audio's TNSRecorder for Android in our RecordModel

We could use some fancy Android APIs and/or libraries for our recorder, but in this case, the nativescript-audio plugin we're using for our cross-platform multitrack player also provides a cross-platform recorder. We could have even used it with iOS, but we wanted to specifically work with AudioKit's powerful APIs there. However, here on Android, let's use the recorder from the plugin and make the following modifications to record.model.android.ts:

import { Observable } from 'data/observable';import { IRecordModel, IRecordEvents, RecordState, documentsFilePath } from './common';import { TNSRecorder, AudioRecorderOptions } from 'nativescript-audio';import { Subject } from ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required