Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add helloSDL buildFlavor for audio output required
  • Loading branch information
joeygrover committed Sep 1, 2022
commit 832a182b7c3fa5851c5dcf360d9ec6efb07e13db
9 changes: 9 additions & 0 deletions android/hello_sdl_android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ android {
targetSdkVersion 31
versionCode 1
versionName "1.0"
buildConfigField 'String', 'APP_TYPE', '"DEFAULT"'
buildConfigField 'String', 'REQUIRE_AUDIO_OUTPUT', '"FALSE"'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
Expand Down Expand Up @@ -42,6 +44,13 @@ android {
buildConfigField 'String', 'TRANSPORT', '"TCP"'
buildConfigField 'String', 'SECURITY', '"OFF"'
}
requiresAudioOutput {
buildConfigField 'String', 'TRANSPORT', '"MULTI"'
buildConfigField 'String', 'SECURITY', '"OFF"'
buildConfigField 'String', 'APP_TYPE', '"MEDIA"'
buildConfigField 'String', 'REQUIRE_AUDIO_OUTPUT', '"TRUE"'

}
}
lintOptions {
disable 'GoogleAppIndexingWarning'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ private void startProxy() {
securityLevel = MultiplexTransportConfig.FLAG_MULTI_SECURITY_OFF;
}
transport = new MultiplexTransportConfig(this, APP_ID, securityLevel);
if (BuildConfig.REQUIRE_AUDIO_OUTPUT.equals("TRUE") ) {
((MultiplexTransportConfig)transport).setRequiresAudioSupport(true);
}
} else if (BuildConfig.TRANSPORT.equals("TCP")) {
transport = new TCPTransportConfig(TCP_PORT, DEV_MACHINE_IP_ADDRESS, true);
} else if (BuildConfig.TRANSPORT.equals("MULTI_HB")) {
Expand All @@ -172,7 +175,8 @@ private void startProxy() {

// The app type to be used
Vector<AppHMIType> appType = new Vector<>();
appType.add(AppHMIType.DEFAULT);
appType.add(AppHMIType.valueForString(BuildConfig.APP_TYPE));


// The manager listener helps you know when certain events that pertain to the SDL Manager happen
// Here we will listen for ON_HMI_STATUS and ON_COMMAND notifications
Expand Down