Automotive
@@ -1,3 +1,5 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
alias(libs.plugins.kotlin.android)
|
alias(libs.plugins.kotlin.android)
|
||||||
@@ -12,10 +14,9 @@ android {
|
|||||||
applicationId = "com.kouros.navigation"
|
applicationId = "com.kouros.navigation"
|
||||||
minSdk = 33
|
minSdk = 33
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 2
|
versionCode = 4
|
||||||
versionName = "0.1.3.1"
|
versionName = "0.1.3.3"
|
||||||
setProperty("archivesBaseName", "navi-$versionName")
|
base.archivesName = "navi-$versionName"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,21 +62,21 @@ android {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_11
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
targetCompatibility = JavaVersion.VERSION_11
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
kotlin {
|
||||||
jvmTarget = "11"
|
compilerOptions {
|
||||||
|
jvmTarget = JvmTarget.JVM_11
|
||||||
|
}
|
||||||
}
|
}
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
compose = true
|
compose = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation(libs.androidx.core.ktx)
|
implementation(libs.androidx.core.ktx)
|
||||||
implementation(libs.androidx.lifecycle.runtime.ktx)
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
||||||
implementation(libs.androidx.ui)
|
implementation(libs.androidx.ui)
|
||||||
implementation(libs.androidx.car.app)
|
|
||||||
implementation(libs.androidx.material3)
|
implementation(libs.androidx.material3)
|
||||||
implementation(libs.androidx.runtime.livedata)
|
implementation(libs.androidx.runtime.livedata)
|
||||||
implementation(libs.koin.androidx.compose)
|
implementation(libs.koin.androidx.compose)
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
||||||
<uses-permission android:name="android.permission.READ_CONTACTS"/>
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"
|
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"
|
||||||
tools:ignore="MockLocation" />
|
tools:ignore="MockLocation" />
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class MainApplication : Application() {
|
|||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
ObjectBox.init(applicationContext);
|
ObjectBox.init(this);
|
||||||
appContext = applicationContext
|
appContext = applicationContext
|
||||||
startKoin {
|
startKoin {
|
||||||
androidLogger(Level.DEBUG)
|
androidLogger(Level.DEBUG)
|
||||||
@@ -25,6 +25,6 @@ class MainApplication : Application() {
|
|||||||
var appContext: Context? = null
|
var appContext: Context? = null
|
||||||
private set
|
private set
|
||||||
|
|
||||||
var useContacts = true
|
var useContacts = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,7 @@ class MockLocation (private var locationManager: LocationManager) {
|
|||||||
this.longitude = longitude
|
this.longitude = longitude
|
||||||
this.altitude = 0.0
|
this.altitude = 0.0
|
||||||
this.accuracy = 1.0f
|
this.accuracy = 1.0f
|
||||||
this.speed = 15F
|
this.speed = 0F
|
||||||
this.time = System.currentTimeMillis()
|
this.time = System.currentTimeMillis()
|
||||||
this.elapsedRealtimeNanos = SystemClock.elapsedRealtimeNanos()
|
this.elapsedRealtimeNanos = SystemClock.elapsedRealtimeNanos()
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ class MainActivity : ComponentActivity() {
|
|||||||
checkContactsPermissions()
|
checkContactsPermissions()
|
||||||
}
|
}
|
||||||
|
|
||||||
checkMockLocationEnabled()
|
// checkMockLocationEnabled()
|
||||||
|
|
||||||
enableEdgeToEdge()
|
enableEdgeToEdge()
|
||||||
setContent {
|
setContent {
|
||||||
@@ -354,6 +354,8 @@ class MainActivity : ComponentActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun updateLocation(location: org.maplibre.compose.location.Location?) {
|
fun updateLocation(location: org.maplibre.compose.location.Location?) {
|
||||||
|
if (1 == 1)
|
||||||
|
return
|
||||||
if (location != null) {
|
if (location != null) {
|
||||||
if (routeModel.isNavigating()) {
|
if (routeModel.isNavigating()) {
|
||||||
routeModel.updateLocation(lastLocation)
|
routeModel.updateLocation(lastLocation)
|
||||||
@@ -465,11 +467,11 @@ class MainActivity : ComponentActivity() {
|
|||||||
lastLocation.longitude = loc[0]
|
lastLocation.longitude = loc[0]
|
||||||
lastLocation.latitude = loc[1]
|
lastLocation.latitude = loc[1]
|
||||||
if (i == 20) {
|
if (i == 20) {
|
||||||
mock.setMockLocation(loc[1] + 0.03, loc[0])
|
mock.setMockLocation(loc[1] , loc[0])
|
||||||
} else {
|
} else {
|
||||||
mock.setMockLocation(loc[1], loc[0])
|
mock.setMockLocation(loc[1], loc[0])
|
||||||
}
|
}
|
||||||
delay(1000L) //
|
delay(500L) //
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:aapt="http://schemas.android.com/aapt"
|
|
||||||
android:width="108dp"
|
|
||||||
android:height="108dp"
|
|
||||||
android:viewportWidth="108"
|
|
||||||
android:viewportHeight="108">
|
|
||||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
|
||||||
<aapt:attr name="android:fillColor">
|
|
||||||
<gradient
|
|
||||||
android:endX="85.84757"
|
|
||||||
android:endY="92.4963"
|
|
||||||
android:startX="42.9492"
|
|
||||||
android:startY="49.59793"
|
|
||||||
android:type="linear">
|
|
||||||
<item
|
|
||||||
android:color="#44000000"
|
|
||||||
android:offset="0.0" />
|
|
||||||
<item
|
|
||||||
android:color="#00000000"
|
|
||||||
android:offset="1.0" />
|
|
||||||
</gradient>
|
|
||||||
</aapt:attr>
|
|
||||||
</path>
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFFFFF"
|
|
||||||
android:fillType="nonZero"
|
|
||||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
|
||||||
android:strokeWidth="1"
|
|
||||||
android:strokeColor="#00000000" />
|
|
||||||
</vector>
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (C) 2021 The Android Open Source Project
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="512dp"
|
|
||||||
android:height="512dp"
|
|
||||||
android:viewportWidth="512"
|
|
||||||
android:viewportHeight="512">
|
|
||||||
<group>
|
|
||||||
<clip-path android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0 M 0,0"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M0.3,-1h512v512h-512z"
|
|
||||||
android:fillColor="#9334E6"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M668,-2.1v-4.8h-73.2v-69.8h73v-4.8h-73.2v-73.7h-4.8v73.7h-70v-73.7H515v73.7h-70v-73.7h-4.8v73.7h-70v-73.7h-4.8v73.7h-70v-73.7h-4.8v73.7h-69.8v-73.7H216v73.7h-70v-73.7h-4.8v73.7h-70v-73.7h-4.8v73.7h-70v-73.7h-4.8v73.7h-70v-73.7h-4.8v73.7h-73.2v4.8h73.2v69.8h-73.2v4.8h73.2v69.7h-73.2v4.8h73.2v69.8h-73.2v4.8h73.2v69.7h-73.2v4.8h73.2v69.8h-73.2v4.8h73.2v69.7h-73.2v4.8h73.2v69.8h-73.2v4.8h73.2V515h-73.2v4.8h73.2v69.8h-73.2v4.8h73.2v73.8h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7H668v-4.8h-73.2v-69.8H668v-4.8h-73.2v-69.7H668v-4.8h-73.2v-69.8H668V366h-73.2v-69.7H668v-4.8h-73.2v-69.8H668v-4.8h-73.2v-69.7H668v-4.8h-73.2V72.5H668v-4.8h-73.2V-2.1H668zM440.3,519.9v69.8h-70v-69.8H440.3zM440.3,445.4v69.7h-70v-69.7L440.3,445.4L440.3,445.4zM440.3,370.8v69.8h-70v-69.8H440.3zM440.3,296.3V366h-70v-69.7H440.3zM440.3,221.7v69.8h-70v-69.8H440.3zM440.3,147v69.7h-70V147H440.3zM440.3,72.4v69.8h-70V72.4H440.3zM440.3,-2.1v69.7h-70V-2.1H440.3zM440.3,-76.8V-7h-70v-69.8H440.3zM365.4,519.9v69.8h-70v-69.8H365.4zM365.4,445.4v69.7h-70v-69.7L365.4,445.4L365.4,445.4zM365.4,370.8v69.8h-70v-69.8H365.4zM365.4,296.3V366h-70v-69.7H365.4zM365.4,221.7v69.8h-70v-69.8H365.4zM365.4,147v69.7h-70V147H365.4zM365.4,72.4v69.8h-70V72.4H365.4zM365.4,-2.1v69.7h-70V-2.1H365.4zM295.5,-6.9v-69.8h70v69.8C365.5,-6.9 295.5,-6.9 295.5,-6.9zM290.8,519.9v69.8h-70v-69.8H290.8zM290.8,445.4v69.7h-70v-69.7L290.8,445.4L290.8,445.4zM290.8,370.8v69.8h-70v-69.8H290.8zM220.8,291.3v-69.8h69.8v69.8H220.8zM290.8,296.3V366h-70v-69.7H290.8zM220.8,67.6V-2.1h70v69.7H220.8zM290.8,142.2h-70V72.4h70V142.2zM290.8,147v69.7h-70V147H290.8zM220.8,-6.9v-69.8h69.8v69.8C290.6,-6.9 220.8,-6.9 220.8,-6.9zM589.9,519.9v69.8h-70v-69.8H589.9zM589.9,445.4v69.7h-70v-69.7L589.9,445.4L589.9,445.4zM589.9,370.8v69.8h-70v-69.8H589.9zM589.9,296.3V366h-70v-69.7H589.9zM589.9,221.7v69.8h-70v-69.8H589.9zM589.9,147v69.7h-70V147H589.9zM589.9,72.4v69.8h-70V72.4H589.9zM589.9,-2.1v69.7h-70V-2.1H589.9zM589.9,-76.8V-7h-70v-69.8H589.9zM515.1,519.9v69.8h-70v-69.8H515.1zM515.1,445.4v69.7h-70v-69.7L515.1,445.4L515.1,445.4zM515.1,370.8v69.8h-70v-69.8H515.1zM515.1,296.3V366h-70v-69.7H515.1zM515.1,221.7v69.8h-70v-69.8H515.1zM515.1,147v69.7h-70V147H515.1zM515.1,72.4v69.8h-70V72.4H515.1zM445.1,67.6V-2.1h70v69.7H445.1zM445.1,-6.9v-69.8h70v69.8C515.1,-6.9 445.1,-6.9 445.1,-6.9zM216,519.9v69.8h-70v-69.8H216zM216,445.4v69.7h-70v-69.7L216,445.4L216,445.4zM216,370.8v69.8h-70v-69.8H216zM216,296.3V366h-70v-69.7H216zM216,221.5v69.8h-70v-69.8L216,221.5L216,221.5zM216,147v69.7h-70V147H216zM216,72.4v69.8h-70V72.4H216zM216,-2.1v69.7h-70V-2.1H216zM216,-76.8V-7h-70v-69.8H216zM141.2,519.9v69.8h-70v-69.8H141.2zM141.2,445.4v69.7h-70v-69.7L141.2,445.4L141.2,445.4zM141.2,370.8v69.8h-70v-69.8H141.2zM141.2,296.3V366h-70v-69.7H141.2zM141.2,221.5v69.8h-70v-69.8L141.2,221.5L141.2,221.5zM141.2,147v69.7h-70V147H141.2zM141.2,72.4v69.8h-70V72.4H141.2zM141.2,-2.1v69.7h-70V-2.1H141.2zM141.2,-76.8V-7h-70v-69.8H141.2zM66.4,519.9v69.8h-70v-69.8H66.4zM66.4,445.4v69.7h-70v-69.7L66.4,445.4L66.4,445.4zM66.4,370.8v69.8h-70v-69.8H66.4zM66.4,296.3V366h-70v-69.7H66.4zM66.4,221.5v69.8h-70v-69.8L66.4,221.5L66.4,221.5zM66.4,147v69.7h-70V147H66.4zM66.4,72.4v69.8h-70V72.4H66.4zM66.4,-2.1v69.7h-70V-2.1H66.4zM66.4,-76.8V-7h-70v-69.8H66.4zM-8.4,519.9v69.8h-70v-69.8H-8.4zM-8.4,445.4v69.7h-70v-69.7L-8.4,445.4L-8.4,445.4zM-8.4,370.8v69.8h-70v-69.8H-8.4zM-8.4,296.3V366h-70v-69.7H-8.4zM-8.4,221.5v69.8h-70v-69.8L-8.4,221.5L-8.4,221.5zM-8.4,147v69.7h-70V147H-8.4zM-8.4,72.4v69.8h-70V72.4H-8.4zM-8.4,-2.1v69.7h-70V-2.1H-8.4zM-8.4,-76.8V-7h-70v-69.8H-8.4z"
|
|
||||||
android:strokeAlpha="0.7"
|
|
||||||
android:fillColor="#C58AF9"
|
|
||||||
android:fillAlpha="0.7"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M95.9,333.5l151.6,-250.3l18.7,3.8l164,272l-108,30l-70.5,-29.5l-89.4,39.5l-18,-10l25,-33l-63,-1.5z"
|
|
||||||
android:fillColor="#9334E6"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M415.5,321.6L279.2,90.3C274.4,82 265.6,77 256.1,77s-18.4,5 -23.2,13.3L95,322.9c-4.9,7.9 -4.9,17.9 0,25.8c4.9,8.2 13.7,13.2 23.2,13.3h41.2l-15.1,27.4l16.8,16.8l94.9,-38.1l94.8,38.5l16.8,-16.8l-15.1,-27.2h39.9c14.3,0.9 26.6,-10 27.5,-24.3c0.4,-5.8 -1.2,-11.5 -4.5,-16.3L415.5,321.6zM347.5,389.5l-91.4,-37.1l-91.5,37.1l-2.6,-2.6l94.1,-168.6L350,386.9L347.5,389.5zM392.5,348h-46.8l-28.5,-48l-61.1,-111l-60.4,107.8l-29.4,51H119c-4.5,-0.1 -8.7,-2.5 -11,-6.4c-2.2,-3.5 -2.2,-7.9 0,-11.4L245,97.2c4,-6 12.2,-7.6 18.2,-3.6c1.4,1 2.7,2.2 3.6,3.6l136.4,231.5l0,0c1.4,2.1 2.2,4.5 2.1,7c-0.2,6.9 -6,12.3 -12.8,12.1L392.5,348z"
|
|
||||||
android:fillColor="#FFFFFF"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M362.8,354m-86.3,0a86.3,86.3 0,1 1,172.6 0a86.3,86.3 0,1 1,-172.6 0"
|
|
||||||
android:fillColor="#9334E6"
|
|
||||||
android:fillType="evenOdd"/>
|
|
||||||
<group>
|
|
||||||
<clip-path android:pathData="M362.8,351.9c-5.7,0 -10.3,-4.6 -10.3,-10.3c0,-5.7 4.6,-10.3 10.3,-10.3s10.3,4.6 10.3,10.3C373.2,347.3 368.5,351.9 362.8,351.9zM362.8,315.9c-14.8,0 -26.6,11.9 -26.6,26.6c0,19.9 26.6,49.4 26.6,49.4s26.6,-29.4 26.6,-49.4C389.4,327.9 377.5,315.9 362.8,315.9zM293.9,353.9c0,-35.7 27,-65.1 61.8,-68.7v14c-27,3.6 -48,26.8 -48,54.8s20.9,51.2 48,54.8v14C321,419 293.9,389.6 293.9,353.9zM406.6,300.5c-10.4,-8.6 -23.3,-13.9 -36.7,-15.3v14c10.1,1.3 19.3,5.3 26.9,11.2L406.6,300.5zM417.8,347h14c-1.4,-13.9 -6.9,-26.5 -15.3,-36.7l-9.9,9.9C412.5,327.8 416.5,336.9 417.8,347zM406.6,387.8l9.9,9.8c8.6,-10.4 13.9,-23.3 15.3,-36.7h-14C416.5,370.7 412.6,380 406.6,387.8zM369.8,408.8v14c13.9,-1.4 26.5,-6.9 36.7,-15.3l-9.8,-9.9C389,403.6 379.6,407.5 369.8,408.8z M 0,0"/>
|
|
||||||
<group>
|
|
||||||
<clip-path android:pathData="M279.9,271.1h165.8v165.8h-165.8z M 0,0"/>
|
|
||||||
<group>
|
|
||||||
<clip-path android:pathData="M279.9,271.1h165.8v165.8h-165.8z M 0,0"/>
|
|
||||||
<group>
|
|
||||||
<clip-path android:pathData="M279.9,271.1h165.8v165.8h-165.8z M 0,0"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M245.3,236.5h235v235h-235z"
|
|
||||||
android:fillColor="#FFFFFF"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</vector>
|
|
||||||
@@ -1,170 +1,74 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector
|
||||||
android:width="108dp"
|
|
||||||
android:height="108dp"
|
android:height="108dp"
|
||||||
|
android:width="108dp"
|
||||||
|
android:viewportHeight="108"
|
||||||
android:viewportWidth="108"
|
android:viewportWidth="108"
|
||||||
android:viewportHeight="108">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<path
|
<path android:fillColor="#3DDC84"
|
||||||
android:fillColor="#3DDC84"
|
android:pathData="M0,0h108v108h-108z"/>
|
||||||
android:pathData="M0,0h108v108h-108z" />
|
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
|
||||||
android:pathData="M9,0L9,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M19,0L19,108"
|
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
|
||||||
android:pathData="M29,0L29,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M39,0L39,108"
|
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
|
||||||
android:pathData="M49,0L49,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M59,0L59,108"
|
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
|
||||||
android:pathData="M69,0L69,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M79,0L79,108"
|
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
|
||||||
android:pathData="M89,0L89,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M99,0L99,108"
|
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
|
||||||
android:pathData="M0,9L108,9"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M0,19L108,19"
|
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
|
||||||
android:pathData="M0,29L108,29"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,39L108,39"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,49L108,49"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,59L108,59"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,69L108,69"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,79L108,79"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,89L108,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,99L108,99"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,29L89,29"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,39L89,39"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,49L89,49"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,59L89,59"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,69L89,69"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,79L89,79"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M29,19L29,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M39,19L39,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M49,19L49,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M59,19L59,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M69,19L69,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M79,19L79,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
15
app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="960"
|
||||||
|
android:viewportHeight="960"
|
||||||
|
android:tint="#000000">
|
||||||
|
<group android:scaleX="0.7888"
|
||||||
|
android:scaleY="0.7888"
|
||||||
|
android:translateX="101.376"
|
||||||
|
android:translateY="101.376">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M319,680L480,607L641,680L656,665L480,240L304,665L319,680ZM480,880Q397,880 324,848.5Q251,817 197,763Q143,709 111.5,636Q80,563 80,480Q80,397 111.5,324Q143,251 197,197Q251,143 324,111.5Q397,80 480,80Q563,80 636,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,480Q880,563 848.5,636Q817,709 763,763Q709,817 636,848.5Q563,880 480,880ZM480,800Q614,800 707,707Q800,614 800,480Q800,346 707,253Q614,160 480,160Q346,160 253,253Q160,346 160,480Q160,614 253,707Q346,800 480,800ZM480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Z"/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@drawable/ic_launcher_background" />
|
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@drawable/ic_launcher_background" />
|
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 982 B After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 12 KiB |
1
automotive/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/build
|
||||||
53
automotive/build.gradle.kts
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
plugins {
|
||||||
|
alias(libs.plugins.android.application)
|
||||||
|
alias(libs.plugins.kotlin.android)
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "com.kouros.navigation"
|
||||||
|
compileSdk {
|
||||||
|
version = release(36)
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = "com.kouros.navigation"
|
||||||
|
minSdk = 33
|
||||||
|
targetSdk = 36
|
||||||
|
versionCode = 1
|
||||||
|
versionName = "1.0"
|
||||||
|
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
proguardFiles(
|
||||||
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
|
"proguard-rules.pro"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "11"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(libs.androidx.app.automotive)
|
||||||
|
implementation(libs.androidx.car.app)
|
||||||
|
implementation(libs.androidx.material3)
|
||||||
|
implementation(libs.androidx.runtime.livedata)
|
||||||
|
implementation(project(":common:car"))
|
||||||
|
implementation(project(":common:data"))
|
||||||
|
implementation(libs.androidx.core.ktx)
|
||||||
|
implementation(libs.androidx.appcompat)
|
||||||
|
implementation(libs.material)
|
||||||
|
testImplementation(libs.junit)
|
||||||
|
androidTestImplementation(libs.androidx.junit)
|
||||||
|
androidTestImplementation(libs.androidx.espresso.core)
|
||||||
|
}
|
||||||
21
automotive/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# You can control the set of applied configuration files using the
|
||||||
|
# proguardFiles setting in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Uncomment this to preserve the line number information for
|
||||||
|
# debugging stack traces.
|
||||||
|
#-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
|
# If you keep the line number information, uncomment this to
|
||||||
|
# hide the original source file name.
|
||||||
|
#-renamesourcefileattribute SourceFile
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.kouros.navigation
|
||||||
|
|
||||||
|
import androidx.test.platform.app.InstrumentationRegistry
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||||
|
|
||||||
|
import org.junit.Test
|
||||||
|
import org.junit.runner.RunWith
|
||||||
|
|
||||||
|
import org.junit.Assert.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instrumented test, which will execute on an Android device.
|
||||||
|
*
|
||||||
|
* See [testing documentation](http://d.android.com/tools/testing).
|
||||||
|
*/
|
||||||
|
@RunWith(AndroidJUnit4::class)
|
||||||
|
class ExampleInstrumentedTest {
|
||||||
|
@Test
|
||||||
|
fun useAppContext() {
|
||||||
|
// Context of the app under test.
|
||||||
|
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||||
|
assertEquals("com.kouros.navigation", appContext.packageName)
|
||||||
|
}
|
||||||
|
}
|
||||||
76
automotive/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<uses-permission android:name="androidx.car.app.MAP_TEMPLATES" />
|
||||||
|
<uses-permission android:name="androidx.car.app.NAVIGATION_TEMPLATES" />
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
|
<uses-permission android:name="androidx.car.app.ACCESS_SURFACE" />
|
||||||
|
|
||||||
|
<!-- Various required feature settings for an automotive app. -->
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.hardware.type.automotive"
|
||||||
|
android:required="true" />
|
||||||
|
<uses-feature
|
||||||
|
android:name="android.software.car.templates_host"
|
||||||
|
android:required="true" />
|
||||||
|
<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:icon="@mipmap/ic_launcher"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
|
android:supportsRtl="true"
|
||||||
|
android:theme="@style/Theme.Navigation">
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="com.android.automotive"
|
||||||
|
android:resource="@xml/automotive_app_desc"
|
||||||
|
tools:ignore="MetadataTagInsideApplicationTag" />
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="androidx.car.app.theme"
|
||||||
|
android:resource="@style/CarAppTheme"
|
||||||
|
tools:ignore="MetadataTagInsideApplicationTag" />
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="androidx.car.app.minCarApiLevel"
|
||||||
|
android:value="1"
|
||||||
|
tools:ignore="MetadataTagInsideApplicationTag" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name="androidx.car.app.activity.CarAppActivity"
|
||||||
|
android:configChanges="uiMode"
|
||||||
|
android:exported="true"
|
||||||
|
android:label="Navigation"
|
||||||
|
android:launchMode="singleTask"
|
||||||
|
android:theme="@android:style/Theme.DeviceDefault.NoActionBar">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="androidx.car.app.action.NAVIGATE" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<data android:scheme="geo" />
|
||||||
|
</intent-filter>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="distractionOptimized"
|
||||||
|
android:value="true" />
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
||||||
170
automotive/src/main/res/drawable/ic_launcher_background.xml
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path
|
||||||
|
android:fillColor="#3DDC84"
|
||||||
|
android:pathData="M0,0h108v108h-108z" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M9,0L9,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,0L19,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,0L29,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,0L39,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,0L49,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,0L59,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,0L69,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,0L79,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M89,0L89,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M99,0L99,108"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,9L108,9"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,19L108,19"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,29L108,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,39L108,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,49L108,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,59L108,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,69L108,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,79L108,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,89L108,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M0,99L108,99"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,29L89,29"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,39L89,39"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,49L89,49"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,59L89,59"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,69L89,69"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M19,79L89,79"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M29,19L29,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M39,19L39,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M49,19L49,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M59,19L59,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M69,19L69,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
<path
|
||||||
|
android:fillColor="#00000000"
|
||||||
|
android:pathData="M79,19L79,89"
|
||||||
|
android:strokeWidth="0.8"
|
||||||
|
android:strokeColor="#33FFFFFF" />
|
||||||
|
</vector>
|
||||||
15
automotive/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="960"
|
||||||
|
android:viewportHeight="960"
|
||||||
|
android:tint="#000000">
|
||||||
|
<group android:scaleX="0.7888"
|
||||||
|
android:scaleY="0.7888"
|
||||||
|
android:translateX="101.376"
|
||||||
|
android:translateY="101.376">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M319,680L480,607L641,680L656,665L480,240L304,665L319,680ZM480,880Q397,880 324,848.5Q251,817 197,763Q143,709 111.5,636Q80,563 80,480Q80,397 111.5,324Q143,251 197,197Q251,143 324,111.5Q397,80 480,80Q563,80 636,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,480Q880,563 848.5,636Q817,709 763,763Q709,817 636,848.5Q563,880 480,880ZM480,800Q614,800 707,707Q800,614 800,480Q800,346 707,253Q614,160 480,160Q346,160 253,253Q160,346 160,480Q160,614 253,707Q346,800 480,800ZM480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Z"/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
6
automotive/src/main/res/mipmap-anydpi/ic_launcher.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@drawable/ic_launcher_background" />
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
</adaptive-icon>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@drawable/ic_launcher_background" />
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||||
|
</adaptive-icon>
|
||||||
BIN
automotive/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
automotive/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
automotive/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
automotive/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
automotive/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
automotive/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
automotive/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
automotive/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
automotive/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
automotive/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 12 KiB |
16
automotive/src/main/res/values-night/themes.xml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<!-- Base application theme. -->
|
||||||
|
<style name="Theme.Navigation" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||||
|
<!-- Primary brand color. -->
|
||||||
|
<item name="colorPrimary">@color/purple_200</item>
|
||||||
|
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||||
|
<item name="colorOnPrimary">@color/black</item>
|
||||||
|
<!-- Secondary brand color. -->
|
||||||
|
<item name="colorSecondary">@color/teal_200</item>
|
||||||
|
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||||
|
<item name="colorOnSecondary">@color/black</item>
|
||||||
|
<!-- Status bar color. -->
|
||||||
|
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
||||||
|
<!-- Customize your theme here. -->
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
10
automotive/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="purple_200">#FFBB86FC</color>
|
||||||
|
<color name="purple_500">#FF6200EE</color>
|
||||||
|
<color name="purple_700">#FF3700B3</color>
|
||||||
|
<color name="teal_200">#FF03DAC5</color>
|
||||||
|
<color name="teal_700">#FF018786</color>
|
||||||
|
<color name="black">#FF000000</color>
|
||||||
|
<color name="white">#FFFFFFFF</color>
|
||||||
|
</resources>
|
||||||
16
automotive/src/main/res/values/themes.xml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<!-- Base application theme. -->
|
||||||
|
<style name="Theme.Navigation" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||||
|
<!-- Primary brand color. -->
|
||||||
|
<item name="colorPrimary">@color/purple_500</item>
|
||||||
|
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||||
|
<item name="colorOnPrimary">@color/white</item>
|
||||||
|
<!-- Secondary brand color. -->
|
||||||
|
<item name="colorSecondary">@color/teal_200</item>
|
||||||
|
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||||
|
<item name="colorOnSecondary">@color/black</item>
|
||||||
|
<!-- Status bar color. -->
|
||||||
|
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
||||||
|
<!-- Customize your theme here. -->
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.kouros.navigation
|
||||||
|
|
||||||
|
import org.junit.Test
|
||||||
|
|
||||||
|
import org.junit.Assert.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Example local unit test, which will execute on the development machine (host).
|
||||||
|
*
|
||||||
|
* See [testing documentation](http://d.android.com/tools/testing).
|
||||||
|
*/
|
||||||
|
class ExampleUnitTest {
|
||||||
|
@Test
|
||||||
|
fun addition_isCorrect() {
|
||||||
|
assertEquals(4, 2 + 2)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -32,14 +32,8 @@
|
|||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
||||||
<uses-permission android:name="androidx.car.app.ACCESS_SURFACE" />
|
<uses-permission android:name="androidx.car.app.ACCESS_SURFACE" />
|
||||||
<uses-permission android:name="android.permission.READ_CONTACTS"/>
|
|
||||||
|
|
||||||
<application android:requestLegacyExternalStorage="true">
|
<application android:requestLegacyExternalStorage="true">
|
||||||
<!--
|
|
||||||
Since this app does not use any features from beyond API level 1, it makes the most sense
|
|
||||||
to use that as the `minCarApiLevel`. Even if it did use features from higher API levels,
|
|
||||||
it could still use this value as long as those features are only used behind a runtime check
|
|
||||||
-->
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="androidx.car.app.minCarApiLevel"
|
android:name="androidx.car.app.minCarApiLevel"
|
||||||
android:value="1" />
|
android:value="1" />
|
||||||
|
|||||||
BIN
common/car/src/main/ic_delete-playstore.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
@@ -18,6 +18,7 @@ import androidx.compose.ui.Modifier
|
|||||||
import androidx.compose.ui.geometry.Offset
|
import androidx.compose.ui.geometry.Offset
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.graphics.vector.ImageVector
|
import androidx.compose.ui.graphics.vector.ImageVector
|
||||||
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.res.vectorResource
|
import androidx.compose.ui.res.vectorResource
|
||||||
import androidx.compose.ui.text.TextStyle
|
import androidx.compose.ui.text.TextStyle
|
||||||
import androidx.compose.ui.text.drawText
|
import androidx.compose.ui.text.drawText
|
||||||
@@ -115,12 +116,15 @@ fun BuildingLayer(tiles: Source) {
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun DrawImage(padding: PaddingValues, location: Location, width: Int, height: Int, street: String) {
|
fun DrawImage(padding: PaddingValues, location: Location, width: Int, height: Int, street: String) {
|
||||||
NavigationImage(padding, street)
|
NavigationImage(padding, width,height, street)
|
||||||
Speed(width, height, location)
|
Speed(width, height, location)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun NavigationImage(padding: PaddingValues, street: String) {
|
fun NavigationImage(padding: PaddingValues, width: Int, height: Int, street: String) {
|
||||||
|
|
||||||
|
val imageSize = (height/6)
|
||||||
|
println("Image Size: $imageSize")
|
||||||
val vector = ImageVector.vectorResource(id = R.drawable.assistant_navigation_48px)
|
val vector = ImageVector.vectorResource(id = R.drawable.assistant_navigation_48px)
|
||||||
val color = remember { NavigationColor }
|
val color = remember { NavigationColor }
|
||||||
BadgedBox(
|
BadgedBox(
|
||||||
@@ -131,11 +135,18 @@ fun NavigationImage(padding: PaddingValues, street: String) {
|
|||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
modifier = Modifier.size(72.dp, 72.dp),
|
painter = painterResource(id = R.drawable.navigation),
|
||||||
imageVector = vector,
|
"Navigation",
|
||||||
contentDescription = "Navigation",
|
tint = color,
|
||||||
tint = color
|
modifier = Modifier.size(imageSize.dp, imageSize.dp),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Icon(
|
||||||
|
// modifier = Modifier.size(72.dp, 72.dp),
|
||||||
|
// imageVector = vector,
|
||||||
|
// contentDescription = "Navigation",
|
||||||
|
// tint = color
|
||||||
|
// )
|
||||||
if (street.isNotEmpty())
|
if (street.isNotEmpty())
|
||||||
Text(text = street)
|
Text(text = street)
|
||||||
}
|
}
|
||||||
@@ -209,13 +220,12 @@ fun getPaddingValues(width: Int, height: Int, preView: Boolean): PaddingValues {
|
|||||||
return if (preView) {
|
return if (preView) {
|
||||||
PaddingValues(start = 150.dp, bottom = 0.dp)
|
PaddingValues(start = 150.dp, bottom = 0.dp)
|
||||||
} else {
|
} else {
|
||||||
// PaddingValues(start = width.dp, top = distanceFromTop(height).dp)
|
PaddingValues(start = 50.dp, top = distanceFromTop(height).dp)
|
||||||
PaddingValues(start = 0.dp, top = distanceFromTop(height).dp)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun distanceFromTop(height: Int): Int {
|
fun distanceFromTop(height: Int): Int {
|
||||||
return height - percent(height, 25)
|
return height - percent(height, 40)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun percent(maxValue: Int, value: Int): Int {
|
fun percent(maxValue: Int, value: Int): Int {
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ import com.kouros.navigation.car.screen.SearchScreen
|
|||||||
import com.kouros.navigation.data.Constants.MAXIMAL_ROUTE_DEVIATION
|
import com.kouros.navigation.data.Constants.MAXIMAL_ROUTE_DEVIATION
|
||||||
import com.kouros.navigation.data.Constants.MAXIMAL_SNAP_CORRECTION
|
import com.kouros.navigation.data.Constants.MAXIMAL_SNAP_CORRECTION
|
||||||
import com.kouros.navigation.data.Constants.TAG
|
import com.kouros.navigation.data.Constants.TAG
|
||||||
|
import com.kouros.navigation.data.ObjectBox
|
||||||
import com.kouros.navigation.utils.NavigationUtils.snapLocation
|
import com.kouros.navigation.utils.NavigationUtils.snapLocation
|
||||||
|
|
||||||
class NavigationSession : Session(), NavigationScreen.Listener {
|
class NavigationSession : Session(), NavigationScreen.Listener {
|
||||||
val uriScheme = "samples";
|
|
||||||
|
|
||||||
val uriHost = "navigation";
|
val useContacts = false
|
||||||
|
|
||||||
lateinit var routeModel: RouteCarModel;
|
lateinit var routeModel: RouteCarModel;
|
||||||
|
|
||||||
@@ -81,9 +81,9 @@ class NavigationSession : Session(), NavigationScreen.Listener {
|
|||||||
navigationScreen = NavigationScreen(carContext, surfaceRenderer, routeModel, this)
|
navigationScreen = NavigationScreen(carContext, surfaceRenderer, routeModel, this)
|
||||||
|
|
||||||
if (carContext.checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION)
|
if (carContext.checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION)
|
||||||
== PackageManager.PERMISSION_GRANTED
|
== PackageManager.PERMISSION_GRANTED && !useContacts
|
||||||
&& carContext.checkSelfPermission(Manifest.permission.READ_CONTACTS)
|
|| (useContacts && carContext.checkSelfPermission(Manifest.permission.READ_CONTACTS)
|
||||||
== PackageManager.PERMISSION_GRANTED
|
== PackageManager.PERMISSION_GRANTED)
|
||||||
) {
|
) {
|
||||||
requestLocationUpdates()
|
requestLocationUpdates()
|
||||||
} else {
|
} else {
|
||||||
@@ -166,8 +166,7 @@ class NavigationSession : Session(), NavigationScreen.Listener {
|
|||||||
navigationScreen.calculateNewRoute(routeModel.destination)
|
navigationScreen.calculateNewRoute(routeModel.destination)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
routeModel.updateLocation(location)
|
navigationScreen.updateTrip(location)
|
||||||
navigationScreen.updateTrip()
|
|
||||||
if (distance < MAXIMAL_SNAP_CORRECTION) {
|
if (distance < MAXIMAL_SNAP_CORRECTION) {
|
||||||
surfaceRenderer.updateLocation(snapedLocation)
|
surfaceRenderer.updateLocation(snapedLocation)
|
||||||
} else {
|
} else {
|
||||||
@@ -181,4 +180,10 @@ class NavigationSession : Session(), NavigationScreen.Listener {
|
|||||||
override fun stopNavigation() {
|
override fun stopNavigation() {
|
||||||
routeModel.stopNavigation()
|
routeModel.stopNavigation()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
var uriHost: String = "navigation"
|
||||||
|
|
||||||
|
var uriScheme: String = "samples"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,7 @@ import androidx.car.app.AppManager
|
|||||||
import androidx.car.app.CarContext
|
import androidx.car.app.CarContext
|
||||||
import androidx.car.app.SurfaceCallback
|
import androidx.car.app.SurfaceCallback
|
||||||
import androidx.car.app.SurfaceContainer
|
import androidx.car.app.SurfaceContainer
|
||||||
|
import androidx.car.app.connection.CarConnection
|
||||||
import androidx.compose.foundation.isSystemInDarkTheme
|
import androidx.compose.foundation.isSystemInDarkTheme
|
||||||
import androidx.compose.foundation.layout.PaddingValues
|
import androidx.compose.foundation.layout.PaddingValues
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
@@ -27,8 +28,10 @@ import androidx.savedstate.setViewTreeSavedStateRegistryOwner
|
|||||||
import com.kouros.navigation.car.navigation.RouteCarModel
|
import com.kouros.navigation.car.navigation.RouteCarModel
|
||||||
import com.kouros.navigation.data.Constants
|
import com.kouros.navigation.data.Constants
|
||||||
import com.kouros.navigation.data.Constants.SHOW_THREED_BUILDING
|
import com.kouros.navigation.data.Constants.SHOW_THREED_BUILDING
|
||||||
|
import com.kouros.navigation.data.ObjectBox
|
||||||
import com.kouros.navigation.model.RouteModel
|
import com.kouros.navigation.model.RouteModel
|
||||||
import com.kouros.navigation.utils.NavigationUtils.getBooleanKeyValue
|
import com.kouros.navigation.utils.NavigationUtils.getBooleanKeyValue
|
||||||
|
import com.kouros.navigation.utils.bearing
|
||||||
import com.kouros.navigation.utils.calculateZoom
|
import com.kouros.navigation.utils.calculateZoom
|
||||||
import org.maplibre.compose.camera.CameraPosition
|
import org.maplibre.compose.camera.CameraPosition
|
||||||
import org.maplibre.compose.camera.CameraState
|
import org.maplibre.compose.camera.CameraState
|
||||||
@@ -160,17 +163,22 @@ class SurfaceRenderer(
|
|||||||
lifecycle.addObserver(this)
|
lifecycle.addObserver(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun onConnectionStateUpdated(connectionState: Int) {
|
||||||
|
when(connectionState) {
|
||||||
|
CarConnection.CONNECTION_TYPE_NATIVE -> ObjectBox.init(carContext)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun MapView() {
|
fun MapView() {
|
||||||
val stateWidth = visibleArea.observeAsState()
|
val stateWidth = visibleArea.observeAsState()
|
||||||
val position: CameraPosition? by cameraPosition.observeAsState()
|
val position: CameraPosition? by cameraPosition.observeAsState()
|
||||||
val route: String? by routeData.observeAsState()
|
val route: String? by routeData.observeAsState()
|
||||||
val previewRoute: String? by previewRouteData.observeAsState()
|
val previewRoute: String? by previewRouteData.observeAsState()
|
||||||
val paddingValues = getPaddingValues( width - stateWidth.value!!.width(), height, preview)
|
val paddingValues = getPaddingValues(width - stateWidth.value!!.width(), height, preview)
|
||||||
val cameraState = cameraState(paddingValues, position, tilt)
|
val cameraState = cameraState(paddingValues, position, tilt)
|
||||||
|
|
||||||
val baseStyle = BaseStyle.Uri(Constants.STYLE)
|
val baseStyle =if (isSystemInDarkTheme()) BaseStyle.Uri(Constants.STYLE_DARK) else BaseStyle.Uri(
|
||||||
if (isSystemInDarkTheme()) BaseStyle.Uri(Constants.STYLE_DARK) else BaseStyle.Uri(
|
|
||||||
Constants.STYLE
|
Constants.STYLE
|
||||||
)
|
)
|
||||||
MaplibreMap(
|
MaplibreMap(
|
||||||
@@ -189,7 +197,11 @@ class SurfaceRenderer(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ShowPosition(cameraState: CameraState, position: CameraPosition?, paddingValues: PaddingValues) {
|
fun ShowPosition(
|
||||||
|
cameraState: CameraState,
|
||||||
|
position: CameraPosition?,
|
||||||
|
paddingValues: PaddingValues
|
||||||
|
) {
|
||||||
val cameraDuration = duration(position)
|
val cameraDuration = duration(position)
|
||||||
var bearing = position!!.bearing
|
var bearing = position!!.bearing
|
||||||
var zoom = position.zoom
|
var zoom = position.zoom
|
||||||
@@ -197,9 +209,9 @@ class SurfaceRenderer(
|
|||||||
var localTilt = tilt
|
var localTilt = tilt
|
||||||
if (!preview) {
|
if (!preview) {
|
||||||
if (routeModel.isNavigating()) {
|
if (routeModel.isNavigating()) {
|
||||||
DrawImage(paddingValues, lastLocation, width, height,"")
|
DrawImage(paddingValues, lastLocation, width, height, "")
|
||||||
} else {
|
} else {
|
||||||
DrawImage(paddingValues, lastLocation,width, height, "")
|
DrawImage(paddingValues, lastLocation, width, height, "")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
bearing = 0.0
|
bearing = 0.0
|
||||||
@@ -222,6 +234,7 @@ class SurfaceRenderer(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreate(owner: LifecycleOwner) {
|
override fun onCreate(owner: LifecycleOwner) {
|
||||||
|
CarConnection(carContext).type.observe(owner, ::onConnectionStateUpdated)
|
||||||
Log.i(TAG, "SurfaceRenderer created")
|
Log.i(TAG, "SurfaceRenderer created")
|
||||||
carContext.getCarService(AppManager::class.java)
|
carContext.getCarService(AppManager::class.java)
|
||||||
.setSurfaceCallback(mSurfaceCallback)
|
.setSurfaceCallback(mSurfaceCallback)
|
||||||
@@ -260,11 +273,7 @@ class SurfaceRenderer(
|
|||||||
fun updateLocation(location: Location) {
|
fun updateLocation(location: Location) {
|
||||||
synchronized(this) {
|
synchronized(this) {
|
||||||
if (!preview) {
|
if (!preview) {
|
||||||
val bearing = if (routeModel.isNavigating()) {
|
val bearing = bearing(lastLocation, location)
|
||||||
routeModel.currentStep().bearing
|
|
||||||
} else {
|
|
||||||
lastLocation.bearingTo(location).toInt().toDouble().absoluteValue
|
|
||||||
}
|
|
||||||
val zoom = if (!panView) {
|
val zoom = if (!panView) {
|
||||||
calculateZoom(location.speed.toDouble())
|
calculateZoom(location.speed.toDouble())
|
||||||
} else {
|
} else {
|
||||||
@@ -278,10 +287,9 @@ class SurfaceRenderer(
|
|||||||
lastBearing = cameraPosition.value!!.bearing
|
lastBearing = cameraPosition.value!!.bearing
|
||||||
lastLocation = location
|
lastLocation = location
|
||||||
} else {
|
} else {
|
||||||
val bearing = 0.0
|
|
||||||
val zoom = previewZoom()
|
val zoom = previewZoom()
|
||||||
updateCameraPosition(
|
updateCameraPosition(
|
||||||
bearing,
|
0.0,
|
||||||
zoom,
|
zoom,
|
||||||
Position(centerLocation.longitude, centerLocation.latitude)
|
Position(centerLocation.longitude, centerLocation.latitude)
|
||||||
)
|
)
|
||||||
@@ -295,7 +303,7 @@ class SurfaceRenderer(
|
|||||||
bearing = bearing,
|
bearing = bearing,
|
||||||
zoom = zoom,
|
zoom = zoom,
|
||||||
tilt = 0.0,
|
tilt = 0.0,
|
||||||
padding = getPaddingValues(width-visibleArea.value!!.width(), height, preview),
|
padding = getPaddingValues(width - visibleArea.value!!.width(), height, preview),
|
||||||
target = target
|
target = target
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -209,8 +209,8 @@ class RouteCarModel() : RouteModel() {
|
|||||||
)
|
)
|
||||||
.setRemainingTimeColor(CarColor.YELLOW)
|
.setRemainingTimeColor(CarColor.YELLOW)
|
||||||
.setRemainingDistanceColor(CarColor.RED)
|
.setRemainingDistanceColor(CarColor.RED)
|
||||||
//.setTripText(createCarText(carContext,R.string.travel_est_trip_text))
|
//.setTripText(createCarText(carContext,R.string.navigate))
|
||||||
.setTripIcon(createCarIcon(carContext, R.drawable.ic_close_white_24dp))
|
//.setTripIcon(createCarIcon(carContext, R.drawable.navigation_48px))
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import androidx.lifecycle.Observer
|
|||||||
import com.kouros.android.cars.carappservice.R
|
import com.kouros.android.cars.carappservice.R
|
||||||
import com.kouros.navigation.car.NavigationCarAppService
|
import com.kouros.navigation.car.NavigationCarAppService
|
||||||
import com.kouros.navigation.car.SurfaceRenderer
|
import com.kouros.navigation.car.SurfaceRenderer
|
||||||
import com.kouros.navigation.car.navigation.NavigationMessage
|
|
||||||
import com.kouros.navigation.car.navigation.RouteCarModel
|
import com.kouros.navigation.car.navigation.RouteCarModel
|
||||||
import com.kouros.navigation.data.NavigationRepository
|
import com.kouros.navigation.data.NavigationRepository
|
||||||
import com.kouros.navigation.data.Place
|
import com.kouros.navigation.data.Place
|
||||||
@@ -288,7 +287,7 @@ class NavigationScreen(
|
|||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
.setOnClickListener {
|
.setOnClickListener {
|
||||||
val navigateTo = location(recentPlace.latitude, recentPlace.longitude)
|
val navigateTo = location(recentPlace.longitude, recentPlace.latitude)
|
||||||
viewModel.loadRoute(carContext, surfaceRenderer.lastLocation, navigateTo)
|
viewModel.loadRoute(carContext, surfaceRenderer.lastLocation, navigateTo)
|
||||||
routeModel.destination = recentPlace
|
routeModel.destination = recentPlace
|
||||||
}
|
}
|
||||||
@@ -443,11 +442,12 @@ class NavigationScreen(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun reRoute(destination: Place) {
|
fun reRoute(destination: Place) {
|
||||||
val dest = location(destination.latitude, destination.longitude)
|
val dest = location( destination.longitude, destination.latitude)
|
||||||
viewModel.loadRoute(carContext, surfaceRenderer.lastLocation, dest)
|
viewModel.loadRoute(carContext, surfaceRenderer.lastLocation, dest)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun updateTrip() {
|
fun updateTrip(location: Location) {
|
||||||
|
routeModel.updateLocation(location)
|
||||||
if (routeModel.maneuverType == Maneuver.TYPE_DESTINATION && routeModel.leftStepDistance() * 1000 < 25.0) {
|
if (routeModel.maneuverType == Maneuver.TYPE_DESTINATION && routeModel.leftStepDistance() * 1000 < 25.0) {
|
||||||
routeModel.arrived = true
|
routeModel.arrived = true
|
||||||
routeModel.stopNavigation()
|
routeModel.stopNavigation()
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import com.kouros.navigation.model.ViewModel
|
|||||||
class PlaceListScreen(
|
class PlaceListScreen(
|
||||||
private val carContext: CarContext,
|
private val carContext: CarContext,
|
||||||
private val surfaceRenderer: SurfaceRenderer,
|
private val surfaceRenderer: SurfaceRenderer,
|
||||||
location: Location,
|
private val location: Location,
|
||||||
private val category: String
|
private val category: String
|
||||||
) : Screen(carContext) {
|
) : Screen(carContext) {
|
||||||
|
|
||||||
@@ -45,6 +45,7 @@ class PlaceListScreen(
|
|||||||
places = newPlaces
|
places = newPlaces
|
||||||
invalidate()
|
invalidate()
|
||||||
}
|
}
|
||||||
|
|
||||||
val observerAddress = Observer<List<Place>> { newContacts ->
|
val observerAddress = Observer<List<Place>> { newContacts ->
|
||||||
places = newContacts
|
places = newContacts
|
||||||
invalidate()
|
invalidate()
|
||||||
@@ -53,17 +54,30 @@ class PlaceListScreen(
|
|||||||
init {
|
init {
|
||||||
if (category == Constants.RECENT) {
|
if (category == Constants.RECENT) {
|
||||||
viewModel.places.observe(this, observer)
|
viewModel.places.observe(this, observer)
|
||||||
viewModel.loadPlaces(carContext, location)
|
|
||||||
}
|
}
|
||||||
if (category == Constants.CONTACTS) {
|
if (category == Constants.CONTACTS) {
|
||||||
viewModel.contactAddress.observe(this, observerAddress)
|
viewModel.contactAddress.observe(this, observerAddress)
|
||||||
viewModel.loadContacts(carContext, location)
|
|
||||||
}
|
}
|
||||||
|
if (category == Constants.FAVORITES) {
|
||||||
|
viewModel.favorites.observe(this, observer)
|
||||||
|
}
|
||||||
|
loadPlaces()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun loadPlaces() {
|
||||||
|
if (category == Constants.RECENT) {
|
||||||
|
viewModel.loadPlaces(carContext, location)
|
||||||
|
}
|
||||||
|
if (category == Constants.CONTACTS) {
|
||||||
|
viewModel.loadContacts(carContext, location)
|
||||||
|
}
|
||||||
|
if (category == Constants.FAVORITES) {
|
||||||
|
viewModel.loadFavorites(carContext, location)
|
||||||
|
}
|
||||||
|
}
|
||||||
override fun onGetTemplate(): Template {
|
override fun onGetTemplate(): Template {
|
||||||
val itemListBuilder = ItemList.Builder()
|
val itemListBuilder = ItemList.Builder()
|
||||||
.setNoItemsMessage("No places to show")
|
.setNoItemsMessage(carContext.getString(R.string.no_places))
|
||||||
places.forEach {
|
places.forEach {
|
||||||
itemListBuilder.addItem(
|
itemListBuilder.addItem(
|
||||||
Row.Builder()
|
Row.Builder()
|
||||||
@@ -111,10 +125,11 @@ class PlaceListScreen(
|
|||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
val title = if (category == Constants.RECENT) {
|
var title = ""
|
||||||
carContext.getString(R.string.recent_destinations)
|
when(category) {
|
||||||
} else {
|
Constants.RECENT -> title = carContext.getString(R.string.recent_destinations)
|
||||||
carContext.getString(R.string.contacts)
|
Constants.CONTACTS -> title = carContext.getString(R.string.contacts)
|
||||||
|
Constants.FAVORITES -> title = carContext.getString(R.string.favorites)
|
||||||
}
|
}
|
||||||
val header = Header.Builder()
|
val header = Header.Builder()
|
||||||
.setStartHeaderAction(Action.BACK)
|
.setStartHeaderAction(Action.BACK)
|
||||||
@@ -131,16 +146,16 @@ class PlaceListScreen(
|
|||||||
.setIcon(
|
.setIcon(
|
||||||
RouteCarModel().createCarIcon(
|
RouteCarModel().createCarIcon(
|
||||||
carContext,
|
carContext,
|
||||||
R.drawable.ic_close_white_24dp
|
R.drawable.ic_delete_foreground
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.setOnClickListener {
|
.setOnClickListener {
|
||||||
viewModel.deleteRecent(place)
|
viewModel.deletePlace(place)
|
||||||
CarToast.makeText(
|
CarToast.makeText(
|
||||||
carContext,
|
carContext,
|
||||||
R.string.recent_Item_deleted, CarToast.LENGTH_LONG
|
R.string.recent_Item_deleted, CarToast.LENGTH_LONG
|
||||||
).show()
|
).show()
|
||||||
invalidate()
|
loadPlaces()
|
||||||
}
|
}
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.kouros.navigation.car.screen
|
package com.kouros.navigation.car.screen
|
||||||
|
|
||||||
|
import android.graphics.drawable.Icon
|
||||||
import android.location.Location
|
import android.location.Location
|
||||||
import android.location.LocationManager
|
import android.location.LocationManager
|
||||||
import android.os.CountDownTimer
|
import android.os.CountDownTimer
|
||||||
@@ -77,11 +78,10 @@ class RoutePreviewScreen(
|
|||||||
val location = Location(LocationManager.GPS_PROVIDER)
|
val location = Location(LocationManager.GPS_PROVIDER)
|
||||||
location.latitude = destination.latitude
|
location.latitude = destination.latitude
|
||||||
location.longitude = destination.longitude
|
location.longitude = destination.longitude
|
||||||
vieModel.loadPreviewRoute(carContext,surfaceRenderer.lastLocation, location)
|
vieModel.loadPreviewRoute(carContext, surfaceRenderer.lastLocation, location)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onGetTemplate(): Template {
|
override fun onGetTemplate(): Template {
|
||||||
// Adjust the item limit according to the car constrains.
|
|
||||||
mItemLimit =
|
mItemLimit =
|
||||||
carContext.getCarService(ConstraintManager::class.java)
|
carContext.getCarService(ConstraintManager::class.java)
|
||||||
.getContentLimit(
|
.getContentLimit(
|
||||||
@@ -127,7 +127,7 @@ class RoutePreviewScreen(
|
|||||||
carContext,
|
carContext,
|
||||||
if (mIsFavorite)
|
if (mIsFavorite)
|
||||||
carContext
|
carContext
|
||||||
.getString(R.string.favorite_toast_msg)
|
.getString(R.string.favorites)
|
||||||
else
|
else
|
||||||
carContext.getString(
|
carContext.getString(
|
||||||
R.string.not_favorite_toast_msg
|
R.string.not_favorite_toast_msg
|
||||||
@@ -135,18 +135,26 @@ class RoutePreviewScreen(
|
|||||||
CarToast.LENGTH_SHORT
|
CarToast.LENGTH_SHORT
|
||||||
)
|
)
|
||||||
.show()
|
.show()
|
||||||
|
vieModel.saveFavorite(destination)
|
||||||
|
println(destination)
|
||||||
invalidate()
|
invalidate()
|
||||||
}
|
}
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
.addEndHeaderAction(
|
.addEndHeaderAction(
|
||||||
Action.Builder()
|
Action.Builder()
|
||||||
.setOnClickListener { finish() }
|
.setOnClickListener {
|
||||||
|
if (mIsFavorite) {
|
||||||
|
vieModel.deleteFavorite(destination)
|
||||||
|
}
|
||||||
|
mIsFavorite = !mIsFavorite
|
||||||
|
finish()
|
||||||
|
}
|
||||||
.setIcon(
|
.setIcon(
|
||||||
CarIcon.Builder(
|
CarIcon.Builder(
|
||||||
IconCompat.createWithResource(
|
IconCompat.createWithResource(
|
||||||
carContext,
|
carContext,
|
||||||
R.drawable.ic_close_white_24dp
|
R.drawable.ic_delete_foreground
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.build()
|
.build()
|
||||||
@@ -155,7 +163,7 @@ class RoutePreviewScreen(
|
|||||||
)
|
)
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
val timer = object: CountDownTimer(10000, 15000) {
|
val timer = object : CountDownTimer(10000, 15000) {
|
||||||
override fun onTick(millisUntilFinished: Long) {}
|
override fun onTick(millisUntilFinished: Long) {}
|
||||||
override fun onFinish() {
|
override fun onFinish() {
|
||||||
onNavigate()
|
onNavigate()
|
||||||
@@ -183,7 +191,7 @@ class RoutePreviewScreen(
|
|||||||
return Row.Builder()
|
return Row.Builder()
|
||||||
.setTitle(route)
|
.setTitle(route)
|
||||||
.setOnClickListener { onRouteSelected(index) }
|
.setOnClickListener { onRouteSelected(index) }
|
||||||
.addText( "${destination.street!!} ${destination.postalCode} ${destination.city}")
|
.addText("${destination.street!!} ${destination.postalCode} ${destination.city}")
|
||||||
.addAction(action)
|
.addAction(action)
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
@@ -194,7 +202,7 @@ class RoutePreviewScreen(
|
|||||||
val length = BigDecimal(routeModel.route.distance).setScale(1, RoundingMode.HALF_EVEN)
|
val length = BigDecimal(routeModel.route.distance).setScale(1, RoundingMode.HALF_EVEN)
|
||||||
val firstRoute = SpannableString(" \u00b7 $length km")
|
val firstRoute = SpannableString(" \u00b7 $length km")
|
||||||
firstRoute.setSpan(
|
firstRoute.setSpan(
|
||||||
DurationSpan.create(time.toLong()), 0, 1,0
|
DurationSpan.create(time.toLong()), 0, 1, 0
|
||||||
)
|
)
|
||||||
return CarText.Builder(firstRoute)
|
return CarText.Builder(firstRoute)
|
||||||
.build()
|
.build()
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ class SearchScreen(
|
|||||||
|
|
||||||
var categories: List<Category> = listOf(
|
var categories: List<Category> = listOf(
|
||||||
Category(id = Constants.RECENT, name = carContext.getString(R.string.recent_destinations)),
|
Category(id = Constants.RECENT, name = carContext.getString(R.string.recent_destinations)),
|
||||||
Category(id = Constants.CONTACTS, name = carContext.getString(R.string.contacts))
|
Category(id = Constants.CONTACTS, name = carContext.getString(R.string.contacts)),
|
||||||
|
Category(id = Constants.FAVORITES, name = carContext.getString(R.string.favorites))
|
||||||
)
|
)
|
||||||
|
|
||||||
lateinit var searchResult: List<SearchResult>
|
lateinit var searchResult: List<SearchResult>
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:aapt="http://schemas.android.com/aapt"
|
|
||||||
android:width="108dp"
|
|
||||||
android:height="108dp"
|
|
||||||
android:viewportWidth="108"
|
|
||||||
android:viewportHeight="108">
|
|
||||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
|
||||||
<aapt:attr name="android:fillColor">
|
|
||||||
<gradient
|
|
||||||
android:endX="85.84757"
|
|
||||||
android:endY="92.4963"
|
|
||||||
android:startX="42.9492"
|
|
||||||
android:startY="49.59793"
|
|
||||||
android:type="linear">
|
|
||||||
<item
|
|
||||||
android:color="#44000000"
|
|
||||||
android:offset="0.0" />
|
|
||||||
<item
|
|
||||||
android:color="#00000000"
|
|
||||||
android:offset="1.0" />
|
|
||||||
</gradient>
|
|
||||||
</aapt:attr>
|
|
||||||
</path>
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFFFFF"
|
|
||||||
android:fillType="nonZero"
|
|
||||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
|
||||||
android:strokeWidth="1"
|
|
||||||
android:strokeColor="#00000000" />
|
|
||||||
</vector>
|
|
||||||
74
common/car/src/main/res/drawable/ic_delete_background.xml
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector
|
||||||
|
android:height="108dp"
|
||||||
|
android:width="108dp"
|
||||||
|
android:viewportHeight="108"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#3DDC84"
|
||||||
|
android:pathData="M0,0h108v108h-108z"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
|
||||||
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
|
</vector>
|
||||||
15
common/car/src/main/res/drawable/ic_delete_foreground.xml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="960"
|
||||||
|
android:viewportHeight="960"
|
||||||
|
android:tint="#000000">
|
||||||
|
<group android:scaleX="0.7888"
|
||||||
|
android:scaleY="0.7888"
|
||||||
|
android:translateX="101.376"
|
||||||
|
android:translateY="101.376">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M280,240L280,240L280,400Q280,400 280,481.5Q280,563 280,680Q280,701 280,721Q280,741 280,760L280,760Q280,760 280,760Q280,760 280,760L280,240ZM450,840L280,840Q247,840 223.5,816.5Q200,793 200,760L200,240L160,240L160,160L360,160L360,120L600,120L600,160L800,160L800,240L760,240L760,412Q743,407 720.5,403.5Q698,400 680,400L680,240L280,240L280,760Q280,760 280,760Q280,760 280,760L412,760Q418,781 428,801.5Q438,822 450,840ZM360,680L400,680Q400,617 420,576.5Q440,536 440,536L440,320L360,320L360,680ZM520,450Q537,439 558.5,428Q580,417 600,412L600,320L520,320L520,450ZM680,880Q597,880 538.5,821.5Q480,763 480,680Q480,597 538.5,538.5Q597,480 680,480Q763,480 821.5,538.5Q880,597 880,680Q880,763 821.5,821.5Q763,880 680,880ZM746,774L774,746L700,672L700,560L660,560L660,688L746,774Z"/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
<!--
|
|
||||||
Copyright (C) 2021 The Android Open Source Project
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="512dp"
|
|
||||||
android:height="512dp"
|
|
||||||
android:viewportWidth="512"
|
|
||||||
android:viewportHeight="512">
|
|
||||||
<group>
|
|
||||||
<clip-path android:pathData="M256,256m-256,0a256,256 0,1 1,512 0a256,256 0,1 1,-512 0 M 0,0"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M0.3,-1h512v512h-512z"
|
|
||||||
android:fillColor="#9334E6"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M668,-2.1v-4.8h-73.2v-69.8h73v-4.8h-73.2v-73.7h-4.8v73.7h-70v-73.7H515v73.7h-70v-73.7h-4.8v73.7h-70v-73.7h-4.8v73.7h-70v-73.7h-4.8v73.7h-69.8v-73.7H216v73.7h-70v-73.7h-4.8v73.7h-70v-73.7h-4.8v73.7h-70v-73.7h-4.8v73.7h-70v-73.7h-4.8v73.7h-73.2v4.8h73.2v69.8h-73.2v4.8h73.2v69.7h-73.2v4.8h73.2v69.8h-73.2v4.8h73.2v69.7h-73.2v4.8h73.2v69.8h-73.2v4.8h73.2v69.7h-73.2v4.8h73.2v69.8h-73.2v4.8h73.2V515h-73.2v4.8h73.2v69.8h-73.2v4.8h73.2v73.8h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7h70v73.7h4.8v-73.7H668v-4.8h-73.2v-69.8H668v-4.8h-73.2v-69.7H668v-4.8h-73.2v-69.8H668V366h-73.2v-69.7H668v-4.8h-73.2v-69.8H668v-4.8h-73.2v-69.7H668v-4.8h-73.2V72.5H668v-4.8h-73.2V-2.1H668zM440.3,519.9v69.8h-70v-69.8H440.3zM440.3,445.4v69.7h-70v-69.7L440.3,445.4L440.3,445.4zM440.3,370.8v69.8h-70v-69.8H440.3zM440.3,296.3V366h-70v-69.7H440.3zM440.3,221.7v69.8h-70v-69.8H440.3zM440.3,147v69.7h-70V147H440.3zM440.3,72.4v69.8h-70V72.4H440.3zM440.3,-2.1v69.7h-70V-2.1H440.3zM440.3,-76.8V-7h-70v-69.8H440.3zM365.4,519.9v69.8h-70v-69.8H365.4zM365.4,445.4v69.7h-70v-69.7L365.4,445.4L365.4,445.4zM365.4,370.8v69.8h-70v-69.8H365.4zM365.4,296.3V366h-70v-69.7H365.4zM365.4,221.7v69.8h-70v-69.8H365.4zM365.4,147v69.7h-70V147H365.4zM365.4,72.4v69.8h-70V72.4H365.4zM365.4,-2.1v69.7h-70V-2.1H365.4zM295.5,-6.9v-69.8h70v69.8C365.5,-6.9 295.5,-6.9 295.5,-6.9zM290.8,519.9v69.8h-70v-69.8H290.8zM290.8,445.4v69.7h-70v-69.7L290.8,445.4L290.8,445.4zM290.8,370.8v69.8h-70v-69.8H290.8zM220.8,291.3v-69.8h69.8v69.8H220.8zM290.8,296.3V366h-70v-69.7H290.8zM220.8,67.6V-2.1h70v69.7H220.8zM290.8,142.2h-70V72.4h70V142.2zM290.8,147v69.7h-70V147H290.8zM220.8,-6.9v-69.8h69.8v69.8C290.6,-6.9 220.8,-6.9 220.8,-6.9zM589.9,519.9v69.8h-70v-69.8H589.9zM589.9,445.4v69.7h-70v-69.7L589.9,445.4L589.9,445.4zM589.9,370.8v69.8h-70v-69.8H589.9zM589.9,296.3V366h-70v-69.7H589.9zM589.9,221.7v69.8h-70v-69.8H589.9zM589.9,147v69.7h-70V147H589.9zM589.9,72.4v69.8h-70V72.4H589.9zM589.9,-2.1v69.7h-70V-2.1H589.9zM589.9,-76.8V-7h-70v-69.8H589.9zM515.1,519.9v69.8h-70v-69.8H515.1zM515.1,445.4v69.7h-70v-69.7L515.1,445.4L515.1,445.4zM515.1,370.8v69.8h-70v-69.8H515.1zM515.1,296.3V366h-70v-69.7H515.1zM515.1,221.7v69.8h-70v-69.8H515.1zM515.1,147v69.7h-70V147H515.1zM515.1,72.4v69.8h-70V72.4H515.1zM445.1,67.6V-2.1h70v69.7H445.1zM445.1,-6.9v-69.8h70v69.8C515.1,-6.9 445.1,-6.9 445.1,-6.9zM216,519.9v69.8h-70v-69.8H216zM216,445.4v69.7h-70v-69.7L216,445.4L216,445.4zM216,370.8v69.8h-70v-69.8H216zM216,296.3V366h-70v-69.7H216zM216,221.5v69.8h-70v-69.8L216,221.5L216,221.5zM216,147v69.7h-70V147H216zM216,72.4v69.8h-70V72.4H216zM216,-2.1v69.7h-70V-2.1H216zM216,-76.8V-7h-70v-69.8H216zM141.2,519.9v69.8h-70v-69.8H141.2zM141.2,445.4v69.7h-70v-69.7L141.2,445.4L141.2,445.4zM141.2,370.8v69.8h-70v-69.8H141.2zM141.2,296.3V366h-70v-69.7H141.2zM141.2,221.5v69.8h-70v-69.8L141.2,221.5L141.2,221.5zM141.2,147v69.7h-70V147H141.2zM141.2,72.4v69.8h-70V72.4H141.2zM141.2,-2.1v69.7h-70V-2.1H141.2zM141.2,-76.8V-7h-70v-69.8H141.2zM66.4,519.9v69.8h-70v-69.8H66.4zM66.4,445.4v69.7h-70v-69.7L66.4,445.4L66.4,445.4zM66.4,370.8v69.8h-70v-69.8H66.4zM66.4,296.3V366h-70v-69.7H66.4zM66.4,221.5v69.8h-70v-69.8L66.4,221.5L66.4,221.5zM66.4,147v69.7h-70V147H66.4zM66.4,72.4v69.8h-70V72.4H66.4zM66.4,-2.1v69.7h-70V-2.1H66.4zM66.4,-76.8V-7h-70v-69.8H66.4zM-8.4,519.9v69.8h-70v-69.8H-8.4zM-8.4,445.4v69.7h-70v-69.7L-8.4,445.4L-8.4,445.4zM-8.4,370.8v69.8h-70v-69.8H-8.4zM-8.4,296.3V366h-70v-69.7H-8.4zM-8.4,221.5v69.8h-70v-69.8L-8.4,221.5L-8.4,221.5zM-8.4,147v69.7h-70V147H-8.4zM-8.4,72.4v69.8h-70V72.4H-8.4zM-8.4,-2.1v69.7h-70V-2.1H-8.4zM-8.4,-76.8V-7h-70v-69.8H-8.4z"
|
|
||||||
android:strokeAlpha="0.7"
|
|
||||||
android:fillColor="#C58AF9"
|
|
||||||
android:fillAlpha="0.7"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M95.9,333.5l151.6,-250.3l18.7,3.8l164,272l-108,30l-70.5,-29.5l-89.4,39.5l-18,-10l25,-33l-63,-1.5z"
|
|
||||||
android:fillColor="#9334E6"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M415.5,321.6L279.2,90.3C274.4,82 265.6,77 256.1,77s-18.4,5 -23.2,13.3L95,322.9c-4.9,7.9 -4.9,17.9 0,25.8c4.9,8.2 13.7,13.2 23.2,13.3h41.2l-15.1,27.4l16.8,16.8l94.9,-38.1l94.8,38.5l16.8,-16.8l-15.1,-27.2h39.9c14.3,0.9 26.6,-10 27.5,-24.3c0.4,-5.8 -1.2,-11.5 -4.5,-16.3L415.5,321.6zM347.5,389.5l-91.4,-37.1l-91.5,37.1l-2.6,-2.6l94.1,-168.6L350,386.9L347.5,389.5zM392.5,348h-46.8l-28.5,-48l-61.1,-111l-60.4,107.8l-29.4,51H119c-4.5,-0.1 -8.7,-2.5 -11,-6.4c-2.2,-3.5 -2.2,-7.9 0,-11.4L245,97.2c4,-6 12.2,-7.6 18.2,-3.6c1.4,1 2.7,2.2 3.6,3.6l136.4,231.5l0,0c1.4,2.1 2.2,4.5 2.1,7c-0.2,6.9 -6,12.3 -12.8,12.1L392.5,348z"
|
|
||||||
android:fillColor="#FFFFFF"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M362.8,354m-86.3,0a86.3,86.3 0,1 1,172.6 0a86.3,86.3 0,1 1,-172.6 0"
|
|
||||||
android:fillColor="#9334E6"
|
|
||||||
android:fillType="evenOdd"/>
|
|
||||||
<group>
|
|
||||||
<clip-path android:pathData="M362.8,351.9c-5.7,0 -10.3,-4.6 -10.3,-10.3c0,-5.7 4.6,-10.3 10.3,-10.3s10.3,4.6 10.3,10.3C373.2,347.3 368.5,351.9 362.8,351.9zM362.8,315.9c-14.8,0 -26.6,11.9 -26.6,26.6c0,19.9 26.6,49.4 26.6,49.4s26.6,-29.4 26.6,-49.4C389.4,327.9 377.5,315.9 362.8,315.9zM293.9,353.9c0,-35.7 27,-65.1 61.8,-68.7v14c-27,3.6 -48,26.8 -48,54.8s20.9,51.2 48,54.8v14C321,419 293.9,389.6 293.9,353.9zM406.6,300.5c-10.4,-8.6 -23.3,-13.9 -36.7,-15.3v14c10.1,1.3 19.3,5.3 26.9,11.2L406.6,300.5zM417.8,347h14c-1.4,-13.9 -6.9,-26.5 -15.3,-36.7l-9.9,9.9C412.5,327.8 416.5,336.9 417.8,347zM406.6,387.8l9.9,9.8c8.6,-10.4 13.9,-23.3 15.3,-36.7h-14C416.5,370.7 412.6,380 406.6,387.8zM369.8,408.8v14c13.9,-1.4 26.5,-6.9 36.7,-15.3l-9.8,-9.9C389,403.6 379.6,407.5 369.8,408.8z M 0,0"/>
|
|
||||||
<group>
|
|
||||||
<clip-path android:pathData="M279.9,271.1h165.8v165.8h-165.8z M 0,0"/>
|
|
||||||
<group>
|
|
||||||
<clip-path android:pathData="M279.9,271.1h165.8v165.8h-165.8z M 0,0"/>
|
|
||||||
<group>
|
|
||||||
<clip-path android:pathData="M279.9,271.1h165.8v165.8h-165.8z M 0,0"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M245.3,236.5h235v235h-235z"
|
|
||||||
android:fillColor="#FFFFFF"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
</vector>
|
|
||||||
@@ -1,170 +1,74 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector
|
||||||
android:width="108dp"
|
|
||||||
android:height="108dp"
|
android:height="108dp"
|
||||||
|
android:width="108dp"
|
||||||
|
android:viewportHeight="108"
|
||||||
android:viewportWidth="108"
|
android:viewportWidth="108"
|
||||||
android:viewportHeight="108">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<path
|
<path android:fillColor="#3DDC84"
|
||||||
android:fillColor="#3DDC84"
|
android:pathData="M0,0h108v108h-108z"/>
|
||||||
android:pathData="M0,0h108v108h-108z" />
|
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
|
||||||
android:pathData="M9,0L9,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M19,0L19,108"
|
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
|
||||||
android:pathData="M29,0L29,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M39,0L39,108"
|
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
|
||||||
android:pathData="M49,0L49,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M59,0L59,108"
|
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
|
||||||
android:pathData="M69,0L69,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M79,0L79,108"
|
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
|
||||||
android:pathData="M89,0L89,108"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M99,0L99,108"
|
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
|
||||||
android:pathData="M0,9L108,9"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
|
||||||
android:strokeColor="#33FFFFFF" />
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
<path
|
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
|
||||||
android:fillColor="#00000000"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:pathData="M0,19L108,19"
|
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
|
||||||
android:strokeWidth="0.8"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeColor="#33FFFFFF" />
|
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
|
||||||
<path
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:fillColor="#00000000"
|
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
|
||||||
android:pathData="M0,29L108,29"
|
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,39L108,39"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,49L108,49"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,59L108,59"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,69L108,69"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,79L108,79"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,89L108,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,99L108,99"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,29L89,29"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,39L89,39"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,49L89,49"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,59L89,59"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,69L89,69"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,79L89,79"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M29,19L29,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M39,19L39,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M49,19L49,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M59,19L59,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M69,19L69,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M79,19L79,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
BIN
common/car/src/main/res/drawable/navigation.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
5
common/car/src/main/res/mipmap-anydpi-v26/ic_delete.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@drawable/ic_delete_background"/>
|
||||||
|
<foreground android:drawable="@drawable/ic_delete_foreground"/>
|
||||||
|
</adaptive-icon>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@drawable/ic_delete_background"/>
|
||||||
|
<foreground android:drawable="@drawable/ic_delete_foreground"/>
|
||||||
|
</adaptive-icon>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@drawable/ic_launcher_background" />
|
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@drawable/ic_launcher_background" />
|
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
BIN
common/car/src/main/res/mipmap-hdpi/ic_delete.webp
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
common/car/src/main/res/mipmap-hdpi/ic_delete_round.webp
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.9 KiB |
BIN
common/car/src/main/res/mipmap-mdpi/ic_delete.webp
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
common/car/src/main/res/mipmap-mdpi/ic_delete_round.webp
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 982 B After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
common/car/src/main/res/mipmap-xhdpi/ic_delete.webp
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
common/car/src/main/res/mipmap-xhdpi/ic_delete_round.webp
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 5.1 KiB |
BIN
common/car/src/main/res/mipmap-xxhdpi/ic_delete.webp
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
common/car/src/main/res/mipmap-xxhdpi/ic_delete_round.webp
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 8.4 KiB |
BIN
common/car/src/main/res/mipmap-xxxhdpi/ic_delete.webp
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
common/car/src/main/res/mipmap-xxxhdpi/ic_delete_round.webp
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 12 KiB |
@@ -43,8 +43,7 @@
|
|||||||
<string name="no_action_title" msgid="1452124604210014010">"Nein"</string>
|
<string name="no_action_title" msgid="1452124604210014010">"Nein"</string>
|
||||||
<string name="zoomed_in_toast_msg" msgid="8915301497303842649">"Herangezoomt"</string>
|
<string name="zoomed_in_toast_msg" msgid="8915301497303842649">"Herangezoomt"</string>
|
||||||
<string name="zoomed_out_toast_msg" msgid="6260981223227212493">"Herausgezoomt"</string>
|
<string name="zoomed_out_toast_msg" msgid="6260981223227212493">"Herausgezoomt"</string>
|
||||||
<string name="triggered_toast_msg" msgid="3396166539208366382">"Ausgelöst"</string>
|
<string name="favorites" msgid="522064494016370117">"Favoriten"</string>
|
||||||
<string name="favorite_toast_msg" msgid="522064494016370117">"Favorit!"</string>
|
|
||||||
<string name="not_favorite_toast_msg" msgid="6831181108681007428">"Kein Favorit!"</string>
|
<string name="not_favorite_toast_msg" msgid="6831181108681007428">"Kein Favorit!"</string>
|
||||||
<string name="nav_requested_toast_msg" msgid="6696525973145493908">"Navigation angefragt"</string>
|
<string name="nav_requested_toast_msg" msgid="6696525973145493908">"Navigation angefragt"</string>
|
||||||
<string name="selected_route_toast_msg" msgid="3149189677200086656">"Ausgewählte Route"</string>
|
<string name="selected_route_toast_msg" msgid="3149189677200086656">"Ausgewählte Route"</string>
|
||||||
@@ -166,19 +165,7 @@
|
|||||||
<string name="long_msg_template_demo_title" msgid="1793748562161438131">"Demo der langen Nachrichtenvorlage"</string>
|
<string name="long_msg_template_demo_title" msgid="1793748562161438131">"Demo der langen Nachrichtenvorlage"</string>
|
||||||
<string name="long_msg_template_not_supported_text" msgid="3641559637317672505">"Dein Host unterstützt keine lange Nachrichtenvorlage"</string>
|
<string name="long_msg_template_not_supported_text" msgid="3641559637317672505">"Dein Host unterstützt keine lange Nachrichtenvorlage"</string>
|
||||||
<string name="long_msg_template_not_supported_title" msgid="8600719470226274925">"Inkompatibler Host"</string>
|
<string name="long_msg_template_not_supported_title" msgid="8600719470226274925">"Inkompatibler Host"</string>
|
||||||
<string name="msg_template_demo_title" msgid="3895210951340409473">"Demo der Nachrichtenvorlage"</string>
|
<string name="no_places" msgid="7246005909846715898">"Keine Orte"</string>
|
||||||
<string name="msg_template_demo_text" msgid="2275291617716161409">"Nachricht wird hier angezeigt.\nMehr Text in der zweiten Zeile."</string>
|
|
||||||
<string name="short_msg_template_demo_title" msgid="6798738013668580714">"Demo der kurzen Nachrichtenvorlage"</string>
|
|
||||||
<string name="sectioned_item_template_demo_title" msgid="8377594346379786774">"Demo für Elementvorlage mit Abschnitten"</string>
|
|
||||||
<string name="sectioned_item_template_radio_button_section_title" msgid="1014325865070733609">"Abschnitt „Optionsfeld“"</string>
|
|
||||||
<string name="sectioned_item_template_toggle_section_title" msgid="3197227971733559949">"Abschnitt wechseln"</string>
|
|
||||||
<string name="sectioned_item_template_lots_of_rows_section_title" msgid="1501401956386938735">"Abschnitt „Viele Zeilen“"</string>
|
|
||||||
<string name="sectioned_item_template_grid_item_section_title" msgid="565528119467142741">"Bereich für Rasterelement"</string>
|
|
||||||
<string name="pane_template_demo_title" msgid="7804292600060341608">"Demo der Bereichsvorlage"</string>
|
|
||||||
<string name="place_list_template_demo_title" msgid="2054022985455460469">"Demo der Ortslistenvorlage"</string>
|
|
||||||
<string name="browse_places_title" msgid="7246005909846715898">"Orte durchsuchen"</string>
|
|
||||||
<string name="search_template_demo_title" msgid="1770474418958318114">"Suchvorlagendemo"</string>
|
|
||||||
<string name="search_hint" msgid="978495498991026792">"Hier suchen"</string>
|
|
||||||
<string name="additional_text" msgid="5755100726890686184">"Bitte lies unsere "<annotation link="terms_of_service">"Nutzungsbedingungen"</annotation></string>
|
<string name="additional_text" msgid="5755100726890686184">"Bitte lies unsere "<annotation link="terms_of_service">"Nutzungsbedingungen"</annotation></string>
|
||||||
<string name="google_sign_in" msgid="6556259799319701727">"Google Log-in"</string>
|
<string name="google_sign_in" msgid="6556259799319701727">"Google Log-in"</string>
|
||||||
<string name="use_pin" msgid="7850893299484337431">"PIN nutzen"</string>
|
<string name="use_pin" msgid="7850893299484337431">"PIN nutzen"</string>
|
||||||
@@ -306,10 +293,10 @@
|
|||||||
<string name="loading_screen" msgid="4771507490730308794">"Ladebildschirm"</string>
|
<string name="loading_screen" msgid="4771507490730308794">"Ladebildschirm"</string>
|
||||||
<string name="vector_toggle_details" msgid="1301305340033556819">"Schieberegler zum Hinzufügen/Entfernen von Farben"</string>
|
<string name="vector_toggle_details" msgid="1301305340033556819">"Schieberegler zum Hinzufügen/Entfernen von Farben"</string>
|
||||||
<string name="map_template_toggle_demo_title" msgid="6510798293640092611">"Kartenvorlage mit Ein-/Aus-Schaltflächen"</string>
|
<string name="map_template_toggle_demo_title" msgid="6510798293640092611">"Kartenvorlage mit Ein-/Aus-Schaltflächen"</string>
|
||||||
<string name="avoid_tolls_row_title" msgid="5194057244144831024">"Mautstraßen vermeiden"</string>
|
<string name="avoid_tolls_row_title" msgid="5194057244144831024">"Mautstraßen meiden"</string>
|
||||||
<string name="route_options_demo_title" msgid="4599699012716426514">"Routenoptionen"</string>
|
<string name="route_options_demo_title" msgid="4599699012716426514">"Routenoptionen"</string>
|
||||||
<string name="avoid_highways_row_title" msgid="4711913426200490304">"Autobahnen meiden"</string>
|
<string name="avoid_highways_row_title" msgid="4711913426200490304">"Autobahnen meiden"</string>
|
||||||
<string name="avoid_ferries_row_title" msgid="8232883866013711974">"Fähren vermeiden"</string>
|
<string name="avoid_ferries_row_title" msgid="8232883866013711974">"Fähren meiden"</string>
|
||||||
<string name="map_demos_title" msgid="2169766615521476592">"Kartenbezogene Demos"</string>
|
<string name="map_demos_title" msgid="2169766615521476592">"Kartenbezogene Demos"</string>
|
||||||
<string name="map_with_content_demo_title" msgid="1032610482145018739">"Demos von Karten mit Inhalten"</string>
|
<string name="map_with_content_demo_title" msgid="1032610482145018739">"Demos von Karten mit Inhalten"</string>
|
||||||
<string name="map_with_message_demo_title" msgid="7007078234918054436">"Karte mit Demo der Nachrichtenvorlage"</string>
|
<string name="map_with_message_demo_title" msgid="7007078234918054436">"Karte mit Demo der Nachrichtenvorlage"</string>
|
||||||
|
|||||||
@@ -45,8 +45,7 @@
|
|||||||
<!-- Toast Messages -->
|
<!-- Toast Messages -->
|
||||||
<string name="zoomed_in_toast_msg">Zoomed in</string>
|
<string name="zoomed_in_toast_msg">Zoomed in</string>
|
||||||
<string name="zoomed_out_toast_msg">Zoomed out</string>
|
<string name="zoomed_out_toast_msg">Zoomed out</string>
|
||||||
<string name="triggered_toast_msg">Triggered</string>
|
<string name="favorites">Favorites</string>
|
||||||
<string name="favorite_toast_msg">Favorite!</string>
|
|
||||||
<string name="not_favorite_toast_msg">Not a favorite!</string>
|
<string name="not_favorite_toast_msg">Not a favorite!</string>
|
||||||
<string name="nav_requested_toast_msg">Navigation Requested</string>
|
<string name="nav_requested_toast_msg">Navigation Requested</string>
|
||||||
<string name="selected_route_toast_msg">Selected route</string>
|
<string name="selected_route_toast_msg">Selected route</string>
|
||||||
@@ -55,7 +54,6 @@
|
|||||||
<string name="parked_toast_msg">Parked action</string>
|
<string name="parked_toast_msg">Parked action</string>
|
||||||
<string name="more_toast_msg">Clicked More</string>
|
<string name="more_toast_msg">Clicked More</string>
|
||||||
<string name="grant_location_permission_toast_msg">Grant location Permission to see current location</string>
|
<string name="grant_location_permission_toast_msg">Grant location Permission to see current location</string>
|
||||||
<string name="changes_selection_to_index_toast_msg_prefix">Changed selection to index</string>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Place Details Screen -->
|
<!-- Place Details Screen -->
|
||||||
@@ -212,28 +210,9 @@
|
|||||||
<string name="long_msg_template_not_supported_text">Your host doesn\'t support Long Message template</string>
|
<string name="long_msg_template_not_supported_text">Your host doesn\'t support Long Message template</string>
|
||||||
<string name="long_msg_template_not_supported_title">Incompatible host</string>
|
<string name="long_msg_template_not_supported_title">Incompatible host</string>
|
||||||
|
|
||||||
<!-- MessageTemplateDemoScreen -->
|
|
||||||
<string name="msg_template_demo_title">Message Template Demo</string>
|
|
||||||
<string name="msg_template_demo_text">Message goes here.\nMore text on second line.</string>
|
|
||||||
<string name="short_msg_template_demo_title">Short Message Template Demo</string>
|
|
||||||
|
|
||||||
<!-- SectionedItemTemplateDemo -->
|
<string name="no_places">No Places</string>
|
||||||
<string name="sectioned_item_template_demo_title">Sectioned Item Template Demo</string>
|
|
||||||
<string name="sectioned_item_template_radio_button_section_title">Radio Button Section</string>
|
|
||||||
<string name="sectioned_item_template_toggle_section_title">Toggle Section</string>
|
|
||||||
<string name="sectioned_item_template_lots_of_rows_section_title">Lots of Rows Section</string>
|
|
||||||
<string name="sectioned_item_template_grid_item_section_title">Grid Item Section</string>
|
|
||||||
|
|
||||||
<!-- PaneTemplateDemoScreen -->
|
|
||||||
<string name="pane_template_demo_title">Pane Template Demo</string>
|
|
||||||
|
|
||||||
<!-- PlaceListTemplateBrowseDemoScreen -->
|
|
||||||
<string name="place_list_template_demo_title">Place List Template Demo</string>
|
|
||||||
<string name="browse_places_title">Browse Places</string>
|
|
||||||
|
|
||||||
<!-- SearchTemplateDemoScreen -->
|
|
||||||
<string name="search_template_demo_title">Search Template Demo</string>
|
|
||||||
<string name="search_hint">Search here</string>
|
|
||||||
|
|
||||||
<!-- SignInTemplateDemoScreen -->
|
<!-- SignInTemplateDemoScreen -->
|
||||||
<string name="additional_text">Please review our <annotation link="terms_of_service">terms of service</annotation></string>
|
<string name="additional_text">Please review our <annotation link="terms_of_service">terms of service</annotation></string>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.kouros.navigation.data
|
|||||||
|
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
||||||
val NavigationColor = Color(0xFF052086)
|
val NavigationColor = Color(0xFF368605)
|
||||||
|
|
||||||
val RouteColor = Color(0xFF5582D0)
|
val RouteColor = Color(0xFF5582D0)
|
||||||
|
|
||||||
|
|||||||
@@ -146,6 +146,8 @@ object Constants {
|
|||||||
|
|
||||||
const val RECENT: String = "Recent"
|
const val RECENT: String = "Recent"
|
||||||
|
|
||||||
|
const val FAVORITES: String = "Favorites"
|
||||||
|
|
||||||
/** The initial location to use as an anchor for searches. */
|
/** The initial location to use as an anchor for searches. */
|
||||||
val homeLocation: Location = Location(LocationManager.GPS_PROVIDER)
|
val homeLocation: Location = Location(LocationManager.GPS_PROVIDER)
|
||||||
val home2Location: Location = Location(LocationManager.GPS_PROVIDER)
|
val home2Location: Location = Location(LocationManager.GPS_PROVIDER)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ package com.kouros.navigation.data
|
|||||||
|
|
||||||
import android.location.Location
|
import android.location.Location
|
||||||
import com.kouros.navigation.model.RouteModel
|
import com.kouros.navigation.model.RouteModel
|
||||||
|
import com.kouros.navigation.utils.NavigationUtils.getBoundingBox
|
||||||
import org.json.JSONArray
|
import org.json.JSONArray
|
||||||
import java.net.Authenticator
|
import java.net.Authenticator
|
||||||
import java.net.HttpURLConnection
|
import java.net.HttpURLConnection
|
||||||
@@ -62,8 +63,14 @@ class NavigationRepository {
|
|||||||
return routeModel.route.distance
|
return routeModel.route.distance
|
||||||
}
|
}
|
||||||
|
|
||||||
fun searchPlaces(search : String) : String {
|
fun searchPlaces(search: String, location: Location) : String {
|
||||||
return fetchUrl("${nominatimUrl}search?q=$search&format=jsonv2&addressdetails=true&countrycodes=de", false)
|
// val bbox = getBoundingBox(location.longitude, location.latitude, 10.0)
|
||||||
|
// val neLon = bbox["ne"]?.get("lon")
|
||||||
|
// val neLat = bbox["ne"]?.get("lat")
|
||||||
|
// val swLon = bbox["sw"]?.get("lon")
|
||||||
|
// val swLat = bbox["sw"]?.get("lat")
|
||||||
|
// val viewbox = "&viewbox=$swLon,$swLat,$neLon,$neLat"
|
||||||
|
return fetchUrl("${nominatimUrl}search?q=$search&format=jsonv2&addressdetails=true,&countrycodes=de", false)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun reverseAddress(location: Location) : String {
|
fun reverseAddress(location: Location) : String {
|
||||||
|
|||||||
@@ -97,7 +97,8 @@ data class Route (
|
|||||||
} else {
|
} else {
|
||||||
currentManeuver().endShapeIndex + 1
|
currentManeuver().endShapeIndex + 1
|
||||||
}
|
}
|
||||||
return pointLocations.subList(beginShapeIndex, endShapeIndex)
|
//return pointLocations.subList(beginShapeIndex, endShapeIndex)
|
||||||
|
return pointLocations
|
||||||
}
|
}
|
||||||
|
|
||||||
fun clear() {
|
fun clear() {
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ import com.kouros.navigation.utils.location
|
|||||||
import org.maplibre.geojson.FeatureCollection
|
import org.maplibre.geojson.FeatureCollection
|
||||||
import org.maplibre.geojson.Point
|
import org.maplibre.geojson.Point
|
||||||
import org.maplibre.turf.TurfMeasurement
|
import org.maplibre.turf.TurfMeasurement
|
||||||
import org.maplibre.turf.TurfMisc
|
|
||||||
import kotlin.math.absoluteValue
|
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
open class RouteModel() {
|
open class RouteModel() {
|
||||||
@@ -28,7 +26,7 @@ open class RouteModel() {
|
|||||||
/*
|
/*
|
||||||
current shapeIndex
|
current shapeIndex
|
||||||
*/
|
*/
|
||||||
private var currentShapeIndex = 0
|
var currentShapeIndex = 0
|
||||||
|
|
||||||
var distanceToStepEnd = 0F
|
var distanceToStepEnd = 0F
|
||||||
|
|
||||||
@@ -53,7 +51,7 @@ open class RouteModel() {
|
|||||||
|
|
||||||
val future = TurfMeasurement.center(FeatureCollection.fromJson(route.routeGeoJson))
|
val future = TurfMeasurement.center(FeatureCollection.fromJson(route.routeGeoJson))
|
||||||
val point = future.geometry() as Point
|
val point = future.geometry() as Point
|
||||||
return location(point.latitude(), point.longitude())
|
return location(point.longitude(), point.latitude())
|
||||||
}
|
}
|
||||||
|
|
||||||
val currentDistance: Double
|
val currentDistance: Double
|
||||||
@@ -85,16 +83,16 @@ open class RouteModel() {
|
|||||||
text = maneuver.streetNames[0]
|
text = maneuver.streetNames[0]
|
||||||
}
|
}
|
||||||
val curLocation = location(
|
val curLocation = location(
|
||||||
route.pointLocations[currentShapeIndex].latitude(),
|
route.pointLocations[currentShapeIndex].longitude(),
|
||||||
route.pointLocations[currentShapeIndex].longitude()
|
route.pointLocations[currentShapeIndex].latitude()
|
||||||
)
|
)
|
||||||
if (currentShapeIndex < route.pointLocations.size) {
|
// if (currentShapeIndex < route.pointLocations.size) {
|
||||||
val nextLocation = location(
|
// val nextLocation = location(
|
||||||
route.pointLocations[currentShapeIndex + 1].latitude(),
|
// route.pointLocations[currentShapeIndex + 1].latitude(),
|
||||||
route.pointLocations[currentShapeIndex + 1].longitude()
|
// route.pointLocations[currentShapeIndex + 1].longitude()
|
||||||
)
|
// )
|
||||||
bearing = curLocation.bearingTo(nextLocation).absoluteValue
|
// bearing = curLocation.bearingTo(nextLocation)
|
||||||
}
|
// }
|
||||||
val distanceStepLeft = leftStepDistance() * 1000
|
val distanceStepLeft = leftStepDistance() * 1000
|
||||||
when (distanceStepLeft) {
|
when (distanceStepLeft) {
|
||||||
in 0.0..NEXT_STEP_THRESHOLD -> {
|
in 0.0..NEXT_STEP_THRESHOLD -> {
|
||||||
|
|||||||
@@ -40,6 +40,10 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() {
|
|||||||
MutableLiveData<List<Place>>()
|
MutableLiveData<List<Place>>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val favorites: MutableLiveData<List<Place>> by lazy {
|
||||||
|
MutableLiveData<List<Place>>()
|
||||||
|
}
|
||||||
|
|
||||||
val searchPlaces: MutableLiveData<List<SearchResult>> by lazy {
|
val searchPlaces: MutableLiveData<List<SearchResult>> by lazy {
|
||||||
MutableLiveData<List<SearchResult>>()
|
MutableLiveData<List<SearchResult>>()
|
||||||
}
|
}
|
||||||
@@ -60,7 +64,7 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() {
|
|||||||
val results = query.find()
|
val results = query.find()
|
||||||
query.close()
|
query.close()
|
||||||
for (place in results) {
|
for (place in results) {
|
||||||
val plLocation = location(place.latitude, place.longitude)
|
val plLocation = location(place.longitude,place.latitude)
|
||||||
// val distance = repository.getRouteDistance(location, plLocation)
|
// val distance = repository.getRouteDistance(location, plLocation)
|
||||||
//place.distance = distance.toFloat()
|
//place.distance = distance.toFloat()
|
||||||
if (place.distance == 0F) {
|
if (place.distance == 0F) {
|
||||||
@@ -78,13 +82,13 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() {
|
|||||||
try {
|
try {
|
||||||
val placeBox = boxStore.boxFor(Place::class)
|
val placeBox = boxStore.boxFor(Place::class)
|
||||||
val query = placeBox
|
val query = placeBox
|
||||||
.query(Place_.name.notEqual(""))
|
.query(Place_.name.notEqual("").and(Place_.category.equal(Constants.RECENT)))
|
||||||
.orderDesc(Place_.lastDate)
|
.orderDesc(Place_.lastDate)
|
||||||
.build()
|
.build()
|
||||||
val results = query.find()
|
val results = query.find()
|
||||||
query.close()
|
query.close()
|
||||||
for (place in results) {
|
for (place in results) {
|
||||||
val plLocation = location(place.latitude, place.longitude)
|
val plLocation = location(place.longitude, place.latitude)
|
||||||
val distance = repository.getRouteDistance(location, plLocation, getSearchFilter(context))
|
val distance = repository.getRouteDistance(location, plLocation, getSearchFilter(context))
|
||||||
place.distance = distance.toFloat()
|
place.distance = distance.toFloat()
|
||||||
}
|
}
|
||||||
@@ -95,6 +99,28 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun loadFavorites(context: Context, location: Location) {
|
||||||
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
|
try {
|
||||||
|
val placeBox = boxStore.boxFor(Place::class)
|
||||||
|
val query = placeBox
|
||||||
|
.query(Place_.name.notEqual("").and(Place_.category.equal(Constants.FAVORITES)))
|
||||||
|
.orderDesc(Place_.lastDate)
|
||||||
|
.build()
|
||||||
|
val results = query.find()
|
||||||
|
query.close()
|
||||||
|
for (place in results) {
|
||||||
|
val plLocation = location(place.longitude, place.latitude )
|
||||||
|
val distance = repository.getRouteDistance(location, plLocation, getSearchFilter(context))
|
||||||
|
place.distance = distance.toFloat()
|
||||||
|
}
|
||||||
|
favorites.postValue(results)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun loadRoute(context: Context, currentLocation: Location, location: Location) {
|
fun loadRoute(context: Context, currentLocation: Location, location: Location) {
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
try {
|
try {
|
||||||
@@ -129,7 +155,7 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() {
|
|||||||
) {
|
) {
|
||||||
for (adr in it) {
|
for (adr in it) {
|
||||||
if (addressLines.size > 1) {
|
if (addressLines.size > 1) {
|
||||||
val plLocation = location(adr.latitude, adr.longitude)
|
val plLocation = location( adr.longitude, adr.latitude)
|
||||||
val distance =
|
val distance =
|
||||||
repository.getRouteDistance(currentLocation, plLocation, getSearchFilter(context))
|
repository.getRouteDistance(currentLocation, plLocation, getSearchFilter(context))
|
||||||
contactList.add(
|
contactList.add(
|
||||||
@@ -159,13 +185,13 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() {
|
|||||||
|
|
||||||
fun searchPlaces(search: String, location: Location) {
|
fun searchPlaces(search: String, location: Location) {
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
val placesJson = repository.searchPlaces(search)
|
val placesJson = repository.searchPlaces(search, location)
|
||||||
val gson = GsonBuilder().serializeNulls().create()
|
val gson = GsonBuilder().serializeNulls().create()
|
||||||
val places = gson.fromJson(placesJson, Search::class.java)
|
val places = gson.fromJson(placesJson, Search::class.java)
|
||||||
val distPlaces = mutableListOf<SearchResult>()
|
val distPlaces = mutableListOf<SearchResult>()
|
||||||
places.forEach {
|
places.forEach {
|
||||||
val plLocation =
|
val plLocation =
|
||||||
location(latitude = it.lat.toDouble(), longitude = it.lon.toDouble())
|
location(longitude = it.lon.toDouble(), latitude = it.lat.toDouble())
|
||||||
val distance = plLocation.distanceTo(location)
|
val distance = plLocation.distanceTo(location)
|
||||||
it.distance = distance
|
it.distance = distance
|
||||||
distPlaces.add(it)
|
distPlaces.add(it)
|
||||||
@@ -183,13 +209,20 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() {
|
|||||||
return place.address.road
|
return place.address.road
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun saveFavorite(place: Place) {
|
||||||
|
place.category = Constants.FAVORITES
|
||||||
|
savePlace(place)
|
||||||
|
}
|
||||||
fun saveRecent(place: Place) {
|
fun saveRecent(place: Place) {
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
|
||||||
place.category = Constants.RECENT
|
place.category = Constants.RECENT
|
||||||
|
savePlace(place)
|
||||||
|
}
|
||||||
|
fun savePlace(place: Place) {
|
||||||
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
try {
|
try {
|
||||||
val placeBox = boxStore.boxFor(Place::class)
|
val placeBox = boxStore.boxFor(Place::class)
|
||||||
val query = placeBox
|
val query = placeBox
|
||||||
.query(Place_.name.equal(place.name!!))
|
.query(Place_.name.equal(place.name!!).and(Place_.category.equal(place.category!!)))
|
||||||
.build()
|
.build()
|
||||||
val results = query.find()
|
val results = query.find()
|
||||||
query.close()
|
query.close()
|
||||||
@@ -205,13 +238,21 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun deleteFavorite(place: Place) {
|
||||||
|
place.category = Constants.FAVORITES
|
||||||
|
deletePlace(place)
|
||||||
|
}
|
||||||
|
|
||||||
fun deleteRecent(place: Place) {
|
fun deleteRecent(place: Place) {
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
|
||||||
place.category = Constants.RECENT
|
place.category = Constants.RECENT
|
||||||
|
deletePlace(place)
|
||||||
|
}
|
||||||
|
fun deletePlace(place: Place) {
|
||||||
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
try {
|
try {
|
||||||
val placeBox = boxStore.boxFor(Place::class)
|
val placeBox = boxStore.boxFor(Place::class)
|
||||||
val query = placeBox
|
val query = placeBox
|
||||||
.query(Place_.name.equal(place.name!!))
|
.query(Place_.name.equal(place.name!!).and(Place_.category.equal(place.category!!)))
|
||||||
.build()
|
.build()
|
||||||
val results = query.find()
|
val results = query.find()
|
||||||
query.close()
|
query.close()
|
||||||
|
|||||||
@@ -3,27 +3,15 @@ package com.kouros.navigation.utils
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.location.Location
|
import android.location.Location
|
||||||
import android.location.LocationManager
|
import android.location.LocationManager
|
||||||
import android.os.Build
|
|
||||||
import androidx.annotation.RequiresApi
|
|
||||||
import androidx.core.content.edit
|
import androidx.core.content.edit
|
||||||
import com.kouros.navigation.data.Constants.MAXIMAL_ROUTE_DEVIATION
|
|
||||||
import com.kouros.navigation.data.Constants.SHARED_PREF_KEY
|
import com.kouros.navigation.data.Constants.SHARED_PREF_KEY
|
||||||
import com.kouros.navigation.data.Constants.SHOW_THREED_BUILDING
|
|
||||||
import com.kouros.navigation.data.GeoJsonFeature
|
import com.kouros.navigation.data.GeoJsonFeature
|
||||||
import com.kouros.navigation.data.GeoJsonFeatureCollection
|
import com.kouros.navigation.data.GeoJsonFeatureCollection
|
||||||
import com.kouros.navigation.data.GeoJsonLineString
|
import com.kouros.navigation.data.GeoJsonLineString
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import org.maplibre.geojson.Feature
|
|
||||||
import org.maplibre.geojson.FeatureCollection
|
|
||||||
import org.maplibre.geojson.LineString
|
|
||||||
import org.maplibre.geojson.Point
|
import org.maplibre.geojson.Point
|
||||||
import org.maplibre.turf.TurfClassification
|
|
||||||
import org.maplibre.turf.TurfConversion
|
|
||||||
import org.maplibre.turf.TurfJoins
|
|
||||||
import org.maplibre.turf.TurfMeasurement
|
|
||||||
import org.maplibre.turf.TurfMeta
|
|
||||||
import org.maplibre.turf.TurfMisc
|
import org.maplibre.turf.TurfMisc
|
||||||
import org.maplibre.turf.TurfTransformation
|
import org.maplibre.turf.TurfMeasurement
|
||||||
import java.lang.Math.toDegrees
|
import java.lang.Math.toDegrees
|
||||||
import java.lang.Math.toRadians
|
import java.lang.Math.toRadians
|
||||||
import kotlin.math.asin
|
import kotlin.math.asin
|
||||||
@@ -45,7 +33,6 @@ object NavigationUtils {
|
|||||||
.getBoolean(key, false)
|
.getBoolean(key, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.GINGERBREAD)
|
|
||||||
fun setBooleanKeyValue(context: Context, `val`: Boolean, key: String) {
|
fun setBooleanKeyValue(context: Context, `val`: Boolean, key: String) {
|
||||||
context
|
context
|
||||||
.getSharedPreferences(
|
.getSharedPreferences(
|
||||||
@@ -60,18 +47,13 @@ object NavigationUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
fun snapLocation(location: Location, stepCoordinates: List<Point>) : Location {
|
fun snapLocation(location: Location, stepCoordinates: List<Point>) : Location {
|
||||||
val newLocation = location(latitude = location.latitude, longitude = location.longitude)
|
val newLocation = Location(location)
|
||||||
val oldPoint = Point.fromLngLat(location.longitude, location.latitude)
|
val oldPoint = Point.fromLngLat(location.longitude, location.latitude)
|
||||||
if (stepCoordinates.size > 1) {
|
if (stepCoordinates.size > 1) {
|
||||||
val pointFeature = TurfMisc.nearestPointOnLine(oldPoint, stepCoordinates)
|
val pointFeature = TurfMisc.nearestPointOnLine(oldPoint, stepCoordinates)
|
||||||
val point = pointFeature.geometry() as Point
|
val point = pointFeature.geometry() as Point
|
||||||
newLocation.latitude = point.latitude()
|
newLocation.latitude = point.latitude()
|
||||||
newLocation.longitude = point.longitude()
|
newLocation.longitude = point.longitude()
|
||||||
newLocation.speed = location.speed
|
|
||||||
newLocation.bearing = location.bearing
|
|
||||||
newLocation.time = location.time
|
|
||||||
newLocation.accuracy = location.accuracy
|
|
||||||
newLocation.altitude = location.altitude
|
|
||||||
}
|
}
|
||||||
return newLocation
|
return newLocation
|
||||||
}
|
}
|
||||||
@@ -129,10 +111,10 @@ object NavigationUtils {
|
|||||||
radius: Double
|
radius: Double
|
||||||
): Map<String, Map<String, Double>> {
|
): Map<String, Map<String, Double>> {
|
||||||
val earthRadius = 6371.0
|
val earthRadius = 6371.0
|
||||||
val maxLat = lat + Math.toDegrees(radius / earthRadius)
|
val maxLat = lat + toDegrees(radius / earthRadius)
|
||||||
val minLat = lat - Math.toDegrees(radius / earthRadius)
|
val minLat = lat - toDegrees(radius / earthRadius)
|
||||||
val maxLon = lon + Math.toDegrees(radius / earthRadius / cos(Math.toRadians(lat)))
|
val maxLon = lon + toDegrees(radius / earthRadius / cos(toRadians(lat)))
|
||||||
val minLon = lon - Math.toDegrees(radius / earthRadius / cos(Math.toRadians(lat)))
|
val minLon = lon - toDegrees(radius / earthRadius / cos(toRadians(lat)))
|
||||||
|
|
||||||
return mapOf(
|
return mapOf(
|
||||||
"nw" to mapOf("lat" to maxLat, "lon" to minLon),
|
"nw" to mapOf("lat" to maxLat, "lon" to minLon),
|
||||||
@@ -182,8 +164,12 @@ fun calculateZoom(speed: Double?): Double {
|
|||||||
}
|
}
|
||||||
return zoom.toDouble()
|
return zoom.toDouble()
|
||||||
}
|
}
|
||||||
|
fun bearing(fromLocation: Location, toLocation: Location ) : Double {
|
||||||
|
val bearing = fromLocation.bearingTo(toLocation).toInt().toDouble()
|
||||||
|
return bearing
|
||||||
|
}
|
||||||
|
|
||||||
fun location(latitude: Double, longitude: Double): Location {
|
fun location(longitude : Double, latitude: Double): Location {
|
||||||
val location = Location(LocationManager.GPS_PROVIDER)
|
val location = Location(LocationManager.GPS_PROVIDER)
|
||||||
location.longitude = longitude
|
location.longitude = longitude
|
||||||
location.latitude = latitude
|
location.latitude = latitude
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ composeBom = "2025.11.01"
|
|||||||
appcompat = "1.7.1"
|
appcompat = "1.7.1"
|
||||||
material = "1.13.0"
|
material = "1.13.0"
|
||||||
carApp = "1.7.0"
|
carApp = "1.7.0"
|
||||||
|
androidx-car = "1.7.0-beta01"
|
||||||
objectboxKotlin = "5.0.1"
|
objectboxKotlin = "5.0.1"
|
||||||
objectboxProcessor = "5.0.1"
|
objectboxProcessor = "5.0.1"
|
||||||
ui = "1.9.5"
|
ui = "1.9.5"
|
||||||
@@ -71,6 +72,7 @@ androidx-navigation-compose = { group = "androidx.navigation", name = "navigatio
|
|||||||
androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview", version.ref = "uiToolingPreview" }
|
androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview", version.ref = "uiToolingPreview" }
|
||||||
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "uiTooling" }
|
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "uiTooling" }
|
||||||
androidx-compose-material3-window-size-class1 = { group = "androidx.compose.material3", name = "material3-window-size-class", version.ref = "material3WindowSizeClass" }
|
androidx-compose-material3-window-size-class1 = { group = "androidx.compose.material3", name = "material3-window-size-class", version.ref = "material3WindowSizeClass" }
|
||||||
|
androidx-app-automotive = { module = "androidx.car.app:app-automotive", version.ref = "androidx-car" }
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
|
|||||||
@@ -30,3 +30,4 @@ include(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
include(":automotive")
|
||||||
|
|||||||