diff --git a/app/src/debug/res/values/google_maps_api.xml b/app/src/debug/res/values/google_maps_api.xml
new file mode 100644
index 0000000..358058e
--- /dev/null
+++ b/app/src/debug/res/values/google_maps_api.xml
@@ -0,0 +1,24 @@
+
+
+ AIzaSyDIYbjdkZqbLUINQXrAzNSjNwep5jGNjKA
+
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 0e21e22..b234a73 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,9 +1,15 @@
+ xmlns:tools="http://schemas.android.com/tools"
+ package="cy.agorise.bitsybitshareswallet">
-
+
+
+
+
+
+
@@ -28,8 +46,8 @@
diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt
index 5bab935..e05d833 100644
--- a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt
+++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt
@@ -1,18 +1,23 @@
package cy.agorise.bitsybitshareswallet.fragments
-import androidx.lifecycle.ViewModelProviders
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import com.google.android.gms.maps.CameraUpdateFactory
+import com.google.android.gms.maps.GoogleMap
+import com.google.android.gms.maps.OnMapReadyCallback
+import com.google.android.gms.maps.SupportMapFragment
+import com.google.android.gms.maps.model.LatLng
+import com.google.android.gms.maps.model.MarkerOptions
import cy.agorise.bitsybitshareswallet.R
-import cy.agorise.bitsybitshareswallet.viewmodels.MerchantsViewModel
+import kotlinx.android.synthetic.main.fragment_merchants.*
-class MerchantsFragment : Fragment() {
+class MerchantsFragment : Fragment(), OnMapReadyCallback {
- private lateinit var viewModel: MerchantsViewModel
+ private lateinit var mMap: GoogleMap
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?,
@@ -24,8 +29,28 @@ class MerchantsFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
- viewModel = ViewModelProviders.of(this).get(MerchantsViewModel::class.java)
- // TODO: Use the ViewModel
+ // Obtain the SupportMapFragment and get notified when the map is ready to be used.
+ val mapFragment = childFragmentManager
+ .findFragmentById(R.id.map) as SupportMapFragment
+ mapFragment.getMapAsync(this)
+ }
+
+ /**
+ * Manipulates the map once available.
+ * This callback is triggered when the map is ready to be used.
+ * This is where we can add markers or lines, add listeners or move the camera. In this case,
+ * we just add a marker near Sydney, Australia.
+ * If Google Play services is not installed on the device, the user will be prompted to install
+ * it inside the SupportMapFragment. This method will only be triggered once the user has
+ * installed Google Play services and returned to the app.
+ */
+ override fun onMapReady(googleMap: GoogleMap) {
+ mMap = googleMap
+
+ // Add a marker in Sydney and move the camera
+ val sydney = LatLng(-34.0, 151.0)
+ mMap.addMarker(MarkerOptions().position(sydney).title("Marker in Sydney"))
+ mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney))
}
}
diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/viewmodels/MerchantsViewModel.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/viewmodels/MerchantsViewModel.kt
deleted file mode 100644
index 662dbe7..0000000
--- a/app/src/main/java/cy/agorise/bitsybitshareswallet/viewmodels/MerchantsViewModel.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package cy.agorise.bitsybitshareswallet.viewmodels
-
-import androidx.lifecycle.ViewModel;
-
-class MerchantsViewModel : ViewModel() {
- // TODO: Implement the ViewModel
-}
diff --git a/app/src/main/res/layout/activity_maps.xml b/app/src/main/res/layout/activity_maps.xml
new file mode 100644
index 0000000..37b4872
--- /dev/null
+++ b/app/src/main/res/layout/activity_maps.xml
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_merchants.xml b/app/src/main/res/layout/fragment_merchants.xml
index 5c18a04..8adfe9e 100644
--- a/app/src/main/res/layout/fragment_merchants.xml
+++ b/app/src/main/res/layout/fragment_merchants.xml
@@ -1,14 +1,8 @@
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 755c97f..ab6a33a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -67,7 +67,8 @@
edited.
Print this out, or write it down. Anyone with access to your recovery key will
- have access to funds within this wallet.
+ have access to funds within this wallet.
+
Bugs or Ideas?
Telegram chat: http://t.me/Agorise\nEmail: Agorise@protonmail.ch\nOpen Source: