How to location co-ordinates, in Clover Flex 3. Location permission added in not asking user to allow the permission. In setting app info, location permission ask not showing in permission section. I have use those permission.
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> if (ActivityCompat.checkSelfPermission( this, Manifest.permission.ACCESS_FINE_LOCATION ) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission( this, Manifest.permission.ACCESS_COARSE_LOCATION ) != PackageManager.PERMISSION_GRANTED ) { // Request permissions ActivityCompat.requestPermissions( this, arrayOf(Manifest.permission.ACCESS_FINE_LOCATION), 1 ) return } if (!locationManager?.isProviderEnabled(LocationManager.GPS_PROVIDER)!!) { // Prompt user to enable GPS showLocationGpsDialog() return } // Dialog CommonUtil.openGeneralDialogYesNo( this@ParkingEnforcementActivity, resources.getString(R.string.location_gps_title), resources.getString(R.string.location_gps_message), "", onclickYes = { Constants.locationPermissionAskedOnce = true val intent = Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS) locationGPSPermissionResult.launch(intent) }, onclickNo = { Constants.locationPermissionAskedOnce = true }, false, hideNo = false, yesInt = R.string.okay, noInt = android.R.string.cancel )