Skip to content

Commit

Permalink
Merge pull request #12 from hellcat707hp/deps-android-auto
Browse files Browse the repository at this point in the history
fix(auto): make Android Auto version available again (hopefully)
  • Loading branch information
hellcat707hp authored Jan 28, 2024
2 parents 1f63ef0 + 3112a37 commit b85d839
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ The process for sideloading apps is pretty simple and a more comprehensive guide
3. Find the APK on your device using a file manager, and choose to open/install the APK.

**A note on sideloading and Android Auto** <br>
Android Auto only trusts/shows apps installed via the Play Store, meaning normal sideloading will result in GTRadio not being available in Android Auto.
There is a workaround using adb to install the APK that marks the app as installed by the Play Store.
More info on that process can be found [here](https://medium.com/@pixplicity/setting-the-install-vendor-of-an-app-7d7deacb01ee).
Android Auto only trusts/shows apps installed via the Play Store, meaning normal sideloading will result in GTRadio not being available in Android Auto.
The proper way to handle this is to enable developer mode for Android Auto, then under the Developer settings for Android Auto, check the "Uknown sources" box.
More details on enabling developer mode for Android Auto can be found [here](https://developer.android.com/training/cars/testing#developer-mode).

> There was also an old workaround using adb to install the APK that marks the app as installed by the Play Store, but this method seems to no longer be reliable.
> More info on that process can be found [here](https://medium.com/@pixplicity/setting-the-install-vendor-of-an-app-7d7deacb01ee).

## Audio File Setup
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "com.sc.gtradio"
minSdkVersion 28
targetSdkVersion 34
versionCode 34010100 //Scheme (all two-digit numbers): <api_version><app_major_version><app_minor_version><app_patch_version>
versionName "1.1.0"
versionCode 34010101 //Scheme (all two-digit numbers): <api_version><app_major_version><app_minor_version><app_patch_version>
versionName "1.1.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.GTRadio">

<activity
android:name=".SettingsActivity"
android:label="@string/title_activity_settings"
Expand Down
6 changes: 3 additions & 3 deletions automotive/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId 'com.sc.gtradio.automotive'
minSdkVersion 28
targetSdkVersion 34
versionCode 1
versionName "1.0"
versionCode 34010101 //Scheme (all two-digit numbers): <api_version><app_major_version><app_minor_version><app_patch_version>
versionName "1.1.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -37,7 +37,7 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.media:media:1.1.0'
implementation 'androidx.media3:media3-exoplayer:1.2.1'
implementation project(path: ':common')
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
Expand Down
19 changes: 13 additions & 6 deletions automotive/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-feature
android:name="android.hardware.type.automotive" />
<uses-feature
android:name="android.hardware.wifi"
android:required="false" />
<uses-feature
android:name="android.hardware.screen.portrait"
android:required="false" />
<uses-feature
android:name="android.hardware.screen.landscape"
android:required="false" />

<application
android:allowBackup="true"
android:appCategory="audio"
Expand All @@ -23,16 +34,12 @@
-->
<service
android:name="com.sc.gtradio.media.GTRadioMusicService"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.media.browse.MediaBrowserService" />
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" />
</intent-filter>
</service>
</application>

<uses-feature
android:name="android.hardware.type.automotive"
android:required="true" />

</manifest>

0 comments on commit b85d839

Please sign in to comment.