0
0

More than 3 years have passed since last update.

プログラムでPetalマップの近辺情報を検索する方法

Last updated at Posted at 2021-08-12

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

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0