diff --git a/.idea/other.xml b/.idea/other.xml
index 0d3a1fb..4604c44 100644
--- a/.idea/other.xml
+++ b/.idea/other.xml
@@ -179,17 +179,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/java/com/example/busroute/DataClass/ExportPath.kt b/app/src/main/java/com/example/busroute/DataClass/ExportPath.kt
new file mode 100644
index 0000000..a7e1863
--- /dev/null
+++ b/app/src/main/java/com/example/busroute/DataClass/ExportPath.kt
@@ -0,0 +1,23 @@
+package com.example.busroute.DataClass
+
+import com.example.busroute.Database.PathContract
+import com.example.busroute.Database.StopContract
+import com.google.gson.JsonArray
+import com.google.gson.JsonObject
+
+data class ExportPath(val pathName:String, val busStop:ArrayList){
+ fun getJson():JsonObject{
+ val path = JsonObject()
+ path.addProperty(PathContract.PathEntry.PATH_NAME, pathName)
+ val stopList = JsonArray()
+ busStop.forEach {
+ val stop = JsonObject()
+ stop.addProperty(StopContract.StopEntry.LATITUDE, it.latitude)
+ stop.addProperty(StopContract.StopEntry.LONGITUDE, it.longitude)
+ stop.addProperty(StopContract.StopEntry.ORDER, it.order)
+ stopList.add(stop)
+ }
+ path.add("stop", stopList)
+ return path
+ }
+}
diff --git a/app/src/main/java/com/example/busroute/DataClass/Stop.kt b/app/src/main/java/com/example/busroute/DataClass/Stop.kt
new file mode 100644
index 0000000..c0e8426
--- /dev/null
+++ b/app/src/main/java/com/example/busroute/DataClass/Stop.kt
@@ -0,0 +1,3 @@
+package com.example.busroute.DataClass
+
+data class Stop(val latitude:Double, val longitude:Double, val order:Int)
diff --git a/app/src/main/java/com/example/busroute/MainActivity.kt b/app/src/main/java/com/example/busroute/MainActivity.kt
index 817b858..5bf532b 100644
--- a/app/src/main/java/com/example/busroute/MainActivity.kt
+++ b/app/src/main/java/com/example/busroute/MainActivity.kt
@@ -6,22 +6,28 @@ import android.app.AlertDialog
import android.content.Intent
import android.content.pm.ActivityInfo
import android.content.pm.PackageManager
-import android.hardware.SensorListener
-import android.hardware.SensorManager
import android.location.Location
import android.location.LocationManager
+import android.net.Uri
import android.os.Bundle
import android.preference.PreferenceManager
import android.speech.tts.TextToSpeech
import android.speech.tts.Voice
+import android.view.View
import android.view.WindowManager
+import android.widget.AdapterView
+import android.widget.AdapterView.OnItemSelectedListener
+import android.widget.ArrayAdapter
import android.widget.Button
+import android.widget.Spinner
import android.widget.TextView
import androidx.activity.ComponentActivity
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import com.example.busroute.DataClass.BusStop
+import com.example.busroute.DataClass.PathList
import com.example.busroute.Database.DbHelper
+import com.example.busroute.Database.PathContract
import com.google.android.gms.location.LocationCallback
import com.google.android.gms.location.LocationRequest
import org.osmdroid.api.IMapController
@@ -30,14 +36,11 @@ import org.osmdroid.tileprovider.tilesource.TileSourceFactory
import org.osmdroid.util.GeoPoint
import org.osmdroid.views.MapView
import org.osmdroid.views.overlay.Marker
-import org.osmdroid.views.overlay.compass.CompassOverlay
-import org.osmdroid.views.overlay.compass.InternalCompassOrientationProvider
import org.osmdroid.views.overlay.gestures.RotationGestureOverlay
import org.osmdroid.views.overlay.mylocation.GpsMyLocationProvider
import org.osmdroid.views.overlay.mylocation.IMyLocationProvider
import org.osmdroid.views.overlay.mylocation.MyLocationNewOverlay
import java.util.Locale
-import kotlin.math.abs
class MainActivity : ComponentActivity() {
@@ -81,6 +84,10 @@ class MainActivity : ComponentActivity() {
mapController = map.controller
mapController.setZoom(18.0)
+ val openMapsButton = findViewById