mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
Add buttons to launch Quick Share settings/receiving UI
This commit is contained in:
@@ -56,10 +56,22 @@ class MainActivity : ComponentActivity() {
|
||||
onShareTargetClicked = { data, intent ->
|
||||
viewModel.onShareTargetClicked(data, this@MainActivity, intent)
|
||||
})
|
||||
|
||||
Button(onClick = { startActivity(Intent(QUICK_SHARE_SETTINGS_INTENT)) }) {
|
||||
Text("Launch settings")
|
||||
}
|
||||
Button(onClick = { startActivity(Intent(QUICK_SHARE_RECEIVE_INTENT).setType("*/*")) }) {
|
||||
Text("Launch receiving UI")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val QUICK_SHARE_SETTINGS_INTENT = "com.google.android.gms.settings.SHARING"
|
||||
private const val QUICK_SHARE_RECEIVE_INTENT = "com.google.android.gms.RECEIVE_NEARBY"
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
||||
Reference in New Issue
Block a user