Importing the Voice Capture SDK to a Project¶
To include the Voice Capture SDK in your application requires three steps:
Update the gradle dependencies and include the AARs in the application lib directory.
- Add or update the filetree line to include searching for AARs. i.e. api fileTree(dir: ‘libs’, include: [‘*.aar’])
- The dependency section of your application’s gradle may look like the following:
dependencies {
api fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
api 'com.squareup.okhttp3:okhttp:3.10.0'
api 'com.android.support:appcompat-v7:26.1.0'
api 'com.android.support:design:26.1.0'
api 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
}
- Copy the Aware-VoiceCapture.aar from the lib/Aware-VoiceCapture.aar directory to the libs directory of your application.
- Import Voice Capture into your application code to start using the VoiceCapture classes.
import com.aware.voicecapture.api.VoiceCaptureApi;