Skip to content

Commit

Permalink
Merge branch 'main' into mirror_notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
hufman committed Feb 22, 2024
2 parents 801f3b6 + 1ff2f96 commit d8690cd
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ By using AM App Icons as launchers into other apps, we can essentially create cu

The protocol has some other APIs which haven't been fully explored, such as the Map api that takes a KMZ file. This might enable some fun features:

- Add a POI layer to show speed traps (blitzer.de Flitsmeister Yasonik, for example). OSM has some of [this data](https://wiki.openstreetmap.org/wiki/Relation:enforcement).
- Add a POI layer to show speed traps (blitzer.de Flitsmeister Yanosik, for example). OSM has some of [this data](https://wiki.openstreetmap.org/wiki/Relation:enforcement).
- Add a POI layer to show addresses of contacts from the phone's address book

Turns out this map functionality is less of a POI layer and more like a mini map showing search results, which lends itself to different functionality:
Expand Down
14 changes: 13 additions & 1 deletion androbd_gestalt/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,32 @@ android {
applicationId "io.bimmergestalt.idriveconnectaddons.androbd_gestalt"
compileSdk 33
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 33
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

signingConfigs {
release
}
if (System.getenv("CI") == "true") {
// configure keystore
signingConfigs.release.storeFile = file("../keystore.jks")
signingConfigs.release.storePassword = System.getenv("KEYSTORE_PASSWORD")
signingConfigs.release.keyAlias = System.getenv("KEYSTORE_ALIAS")
signingConfigs.release.keyPassword = System.getenv("KEYSTORE_ALIAS_PASSWORD")
}

buildFeatures {
dataBinding true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
compileOptions {
Expand Down
4 changes: 2 additions & 2 deletions androbd_gestalt/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.IDriveConnectAddons">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
Expand Down Expand Up @@ -39,7 +39,7 @@
</service>

<!-- Become discoverable in the Addons tab -->
<service android:name=".GestaltPlugin">
<service android:name=".GestaltPlugin" android:exported="true">
<intent-filter>
<action android:name="io.bimmergestalt.cardata.service" />
</intent-filter>
Expand Down
14 changes: 13 additions & 1 deletion bimmerscrobbler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,32 @@ android {
applicationId "io.bimmergestalt.idriveconnectaddons.bimmerscrobbler"
compileSdk 33
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 33
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

signingConfigs {
release
}
if (System.getenv("CI") == "true") {
// configure keystore
signingConfigs.release.storeFile = file("../keystore.jks")
signingConfigs.release.storePassword = System.getenv("KEYSTORE_PASSWORD")
signingConfigs.release.keyAlias = System.getenv("KEYSTORE_ALIAS")
signingConfigs.release.keyPassword = System.getenv("KEYSTORE_ALIAS_PASSWORD")
}

buildFeatures {
dataBinding true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
compileOptions {
Expand Down
4 changes: 2 additions & 2 deletions bimmerscrobbler/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.IDriveConnectAddons">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand All @@ -20,7 +20,7 @@

<!-- Become discoverable in the Addons tab -->
<!-- Also becomes bound when the car connects -->
<service android:name=".MainService">
<service android:name=".MainService" android:exported="true">
<intent-filter>
<action android:name="io.bimmergestalt.cardata.service" />
</intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class MainService: Service() {
const val TAG = "BimmerScrobbler"
}

val scrobbleAnnouncer by lazy {ScrobbleAnnouncer(this.applicationContext)}
val multimedia = CDSLiveData(this.contentResolver, CDSProperty.ENTERTAINMENT_MULTIMEDIA)
val multimediaObserver by lazy { MultimediaObserver(scrobbleAnnouncer) }
private val scrobbleAnnouncer by lazy {ScrobbleAnnouncer(this.applicationContext)}
private val multimedia = CDSLiveData(this.contentResolver, CDSProperty.ENTERTAINMENT_MULTIMEDIA)
private val multimediaObserver by lazy { MultimediaObserver(scrobbleAnnouncer) }

override fun onCreate() {
super.onCreate()
Expand All @@ -45,12 +45,12 @@ class MainService: Service() {
}
}

class MultimediaObserver(val announcer: ScrobbleAnnouncer): Observer<Map<String, Any>> {
override fun onChanged(t: Map<String, Any>) {
val sourceId = t["source"] as? Int ?: 0
val artist = t["artist"] as? String ?: ""
val album = t["album"] as? String ?: ""
val title = t["title"] as? String ?: ""
class MultimediaObserver(private val announcer: ScrobbleAnnouncer): Observer<Map<String, Any>> {
override fun onChanged(value: Map<String, Any>) {
val sourceId = value["source"] as? Int ?: 0
val artist = value["artist"] as? String ?: ""
val album = value["album"] as? String ?: ""
val title = value["title"] as? String ?: ""
MainModel.source.value = if (sourceId > 0) sourceId.toString() else ""
MainModel.artist.value = artist
MainModel.album.value = album
Expand Down
14 changes: 13 additions & 1 deletion cds_details/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,32 @@ android {
applicationId "io.bimmergestalt.idriveconnectaddons.cdsdetails"
compileSdk 33
minSdkVersion 23
targetSdkVersion 30
targetSdkVersion 33
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

signingConfigs {
release
}
if (System.getenv("CI") == "true") {
// configure keystore
signingConfigs.release.storeFile = file("../keystore.jks")
signingConfigs.release.storePassword = System.getenv("KEYSTORE_PASSWORD")
signingConfigs.release.keyAlias = System.getenv("KEYSTORE_ALIAS")
signingConfigs.release.keyPassword = System.getenv("KEYSTORE_ALIAS_PASSWORD")
}

buildFeatures {
dataBinding true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
compileOptions {
Expand Down
4 changes: 2 additions & 2 deletions cds_details/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.IDriveConnectAddons">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>

<!-- Become discoverable in the Addons tab -->
<service android:name=".MainService">
<service android:name=".MainService" android:exported="true">
<intent-filter>
<action android:name="io.bimmergestalt.cardata.service" />
</intent-filter>
Expand Down
15 changes: 14 additions & 1 deletion cds_gauges/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,32 @@ android {
applicationId "io.bimmergestalt.idriveconnectaddons.cdsgauge"
compileSdk 33
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 33
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

signingConfigs {
release
}
if (System.getenv("CI") == "true") {
// configure keystore
signingConfigs.release.storeFile = file("../keystore.jks")
signingConfigs.release.storePassword = System.getenv("KEYSTORE_PASSWORD")
signingConfigs.release.keyAlias = System.getenv("KEYSTORE_ALIAS")
signingConfigs.release.keyPassword = System.getenv("KEYSTORE_ALIAS_PASSWORD")
}

buildFeatures {
dataBinding true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}

Expand Down
4 changes: 2 additions & 2 deletions cds_gauges/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.CDSGauges">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>

<!-- Become discoverable in the Addons tab -->
<service android:name=".MainService">
<service android:name=".MainService" android:exported="true">
<intent-filter>
<action android:name="io.bimmergestalt.cardata.service" />
</intent-filter>
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ android.useAndroidX=true
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
defaultConfig {
compileSdk 33
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 33

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down

0 comments on commit d8690cd

Please sign in to comment.