Nearby Place Searchはユーザーの位置に基づく場所検索機能です。
次のソースコードのように、キーワードを渡せば検索できます。
val uriString = "petalmaps://nearbySearch?text={Nearby Place Searchのキーワード}"
Uri.parse(uriString)?.let { uri ->
Intent(Intent.ACTION_VIEW, uri).let { intent ->
if (intent.resolveActivity(requireContext().packageManager) != null) {
startActivity(intent)
}
}
}
GitHub
Petal Map Sample : https://github.com/Rei2020GitHub/MyPublicProject/tree/master/PetalMapSample