diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 75f7edd..8bdb700 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -14,8 +14,7 @@ android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" - android:theme="@style/Theme.BusRoute" - tools:targetApi="31"> + android:theme="@style/Theme.BusRoute"> = ArrayList() @SuppressLint("MissingPermission") @@ -60,6 +63,7 @@ class MainActivity : ComponentActivity() { super.onCreate(savedInstanceState) isLocationPermissionGranted() window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) + requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT val dbHelper = DbHelper(this) val tts = TextToSpeech(this, TextToSpeech.OnInitListener{}) tts.setVoice(Voice("French", @@ -142,6 +146,9 @@ class MainActivity : ComponentActivity() { latitude = location.latitude longitude = location.longitude mapController.animateTo(GeoPoint(latitude, longitude)) + if(navigationEnable){ + map.mapOrientation = -compassOverlay.azimuthOffset + } findViewById(R.id.accuracy).text = "${location.accuracy} %" } @@ -151,8 +158,8 @@ class MainActivity : ComponentActivity() { map.overlays.add(locationOverlay) val roadButton = findViewById