Closed ferdyrod closed 1 year ago
@ferdyrod Sorry for the late reply. I recently realized that I was my notification settings for this repo were off(I did not have watching ON).
The location request can be enabled by turning off any location features such as the my location button & warm GPS. Any feature that requires the location will request the permission when activitated.
The following are the code examples that enable you disable the warm GPS feature which prompts the location permission as soon as the activity starts
You can disable it via XML on the KujakuMapView
or in java code after getting the view
mapbox_warmGps
...
<io.ona.kujaku.views.KujakuMapView
android:id="@+id/kmv_lowLevelLocationAddPointMapView_mapView"
android:layout_marginEnd="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:minHeight="200dp"
android:minWidth="200dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:mapbox_warmGps="false"
...
kujakuMapView = findViewById(R.id.kujakuMapView);
kujakuMapView.setWarmGps(false)
kujakuMapView.onCreate(savedInstanceState);
When this button is clicked, the view tries to start the location services so that it can get a location fix and focus on the user's location
Disable it by
...
kujakuMapView = findViewById(R.id.kujakuMapView);
kujakuMapView.showCurrentLocationBtn(false);
kujakuMapView.onCreate(savedInstanceState);
Hi,
How do I get the permission request result callback on my activity when KujakuMapView checks for permissions? or how can I disabled that the KujakuMapView request permission automatically??
Thanks