Skip to content

Instantly share code, notes, and snippets.

View Chandu4221's full-sized avatar
💭
I may be slow to respond.

Chandra Shekhar .D Chandu4221

💭
I may be slow to respond.
View GitHub Profile
// General activity result contract
private val openPostActivity =
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result ->
if (result.resultCode == Activity.RESULT_OK) {
// Do something here
toast("Result OK from PostActivity")
}
}
btn_post.setOnClickListener {
@Chandu4221
Chandu4221 / RequestPermission.kt
Created March 18, 2022 04:10 — forked from andrewjapar/RequestPermission.kt
RequestPermission.kt
request_permission.setOnClickListener {
requestPermission.launch(permission.BLUETOOTH)
}
request_multiple_permission.setOnClickListener {
requestMultiplePermissions.launch(
arrayOf(
permission.BLUETOOTH,
permission.NFC,
permission.ACCESS_FINE_LOCATION
@Chandu4221
Chandu4221 / ContextCmder-Disable.reg
Last active July 3, 2019 17:43
Add "cmder_mini" Option to the Context Menu Windows
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]