-
-
Save Arunshaik2001/2acbca6a644414974e5ab5aaef4e8a4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onStart() { | |
super.onStart() | |
Dexter.withContext(this) | |
.withPermissions( | |
Manifest.permission.ACCESS_COARSE_LOCATION, | |
Manifest.permission.ACCESS_FINE_LOCATION | |
) | |
.withListener(object : MultiplePermissionsListener { | |
override fun onPermissionsChecked(report: MultiplePermissionsReport) { | |
ChatServer.startServer(application, activity = this@MainActivity) | |
viewModel.startScan() | |
} | |
override fun onPermissionRationaleShouldBeShown( | |
permissions: List<PermissionRequest?>?, | |
token: PermissionToken? | |
) { | |
} | |
}) | |
.check() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment