Skip to content

Commit a92aa06

Browse files
author
Paul Ruiz
committed
Added Ford Sync AppLink Demo
1 parent c3b521c commit a92aa06

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

FordAppLinkAudio/fordapplinkaudio/src/main/java/com/ptrprograms/fordapplinkaudio/Service/AppLinkService.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ public void onOnHMIStatus(OnHMIStatus onHMIStatus) {
158158
break;
159159
}
160160
case NOT_AUDIBLE: {
161-
if( mPlayer != null )
162-
stopAudio();
161+
stopAudio();
163162
break;
164163
}
165164
}
@@ -182,7 +181,7 @@ private void playAudio() {
182181
mPlayer = new MediaPlayer();
183182

184183
try {
185-
mProxy.show("Loading audio stream...", "", TextAlignment.CENTERED, mCorrelationId++);
184+
mProxy.show("Loading...", "", TextAlignment.CENTERED, mCorrelationId++);
186185
} catch( SyncException e ) {}
187186

188187
mPlayer.reset();
@@ -208,7 +207,7 @@ public void onPrepared( MediaPlayer mediaPlayer ) {
208207

209208
private void stopAudio() {
210209
if( mPlayer == null )
211-
mPlayer = new MediaPlayer();
210+
return;
212211
mPlayer.pause();
213212
try {
214213
mProxy.show("Press OK", "to play audio", TextAlignment.CENTERED, mCorrelationId++);

FordAppLinkAudio/fordapplinkaudio/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
<string name="app_name">Ford AppLink Audio</string>
55
<string name="device_name">SYNC</string>
66
<string name="display_title">Pauls Ford Demo</string>
7-
<string name="app_link_id">31588</string>
7+
<string name="app_link_id">345678</string>
88
</resources>

0 commit comments

Comments
 (0)