Skip to content
Snippets Groups Projects
Commit 274b37d3 authored by Dhanika Novlisariyanti's avatar Dhanika Novlisariyanti
Browse files

fix: create transaction location permission

parent 9688cf53
Branches
Tags
2 merge requests!38Dev,!36fix: create transaction location permission
......@@ -255,13 +255,11 @@ class CreateTransactionFragment : Fragment() {
) { permissions ->
when {
permissions.getOrDefault(Manifest.permission.ACCESS_COARSE_LOCATION, false) -> {
Log.d("HomeFragment", "Approximate location access granted")
getLastLocation()
} else -> {
Log.d("HomeFragment", "No location access granted")
Toast.makeText(context, "Please enable location", Toast.LENGTH_SHORT).show()
val intent = Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS)
startActivity(intent)
// val intent = Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS)
// startActivity(intent)
}
}
}
......
......@@ -100,6 +100,7 @@
android:layout_width="60dp"
android:layout_height="60dp"
android:clickable="true"
android:layout_marginBottom="10dp"
app:backgroundTint="@color/md_theme_primary"
android:contentDescription="@string/cd_transaction_create"
app:layout_constraintBottom_toBottomOf="parent"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment