Mapbox All-in-one template
This commit is contained in:
parent
4fb4aacb8d
commit
38b9ff9a17
6 changed files with 29 additions and 26 deletions
|
@ -38,6 +38,7 @@ android {
|
|||
|
||||
dependencies {
|
||||
|
||||
implementation "com.mapbox.navigation:ui-dropin:2.14.2"
|
||||
implementation 'androidx.core:core-ktx:1.7.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'com.google.android.material:material:1.5.0'
|
||||
|
|
|
@ -8,18 +8,15 @@
|
|||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"
|
||||
android:maxSdkVersion="30" />
|
||||
|
||||
<!-- Needed only if your app looks for Bluetooth devices.
|
||||
If your app doesn't use Bluetooth scan results to derive physical
|
||||
location information, you can strongly assert that your app
|
||||
doesn't derive physical location. -->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
|
||||
|
||||
<!-- Needed only if your app communicates with already-paired Bluetooth
|
||||
devices. -->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||
|
||||
<uses-feature android:name="android.hardware.bluetooth" android:required="true"/>
|
||||
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
|
|
|
@ -27,7 +27,7 @@ class MainActivity : AppCompatActivity() {
|
|||
super.onCreate(savedInstanceState)
|
||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
bluetoothInit()
|
||||
// bluetoothInit()
|
||||
}
|
||||
|
||||
private fun bluetoothInit() {
|
||||
|
|
|
@ -1,18 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello World!"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
<com.mapbox.navigation.dropin.NavigationView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/navigationView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:accessToken="@string/mapbox_access_token"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.mapbox.navigation.dropin.NavigationView>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<resources>
|
||||
<string name="app_name">Garmin</string>
|
||||
</resources>
|
||||
<string name="mapbox_access_token">pk.eyJ1IjoibWFwcy16dHNoIiwiYSI6ImNsbDl4YXU4cjA3eW8zcXMzbXdjYjNsN3oifQ.kbDCjthamXvXX_pAdsq3hQ</string>
|
||||
</resources>
|
||||
|
|
|
@ -13,6 +13,19 @@ dependencyResolutionManagement {
|
|||
maven {
|
||||
url 'https://jitpack.io'
|
||||
}
|
||||
maven {
|
||||
url 'https://api.mapbox.com/downloads/v2/releases/maven'
|
||||
authentication {
|
||||
basic(BasicAuthentication)
|
||||
}
|
||||
credentials {
|
||||
// Do not change the username below.
|
||||
// This should always be `mapbox` (not your username).
|
||||
username = "mapbox"
|
||||
// Use the secret token you stored in gradle.properties as the password
|
||||
password = MAPBOX_DOWNLOADS_TOKEN
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
rootProject.name = "Garmin"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue