0
0

More than 3 years have passed since last update.

プログラムでPetalマップの場所検索機能を使う方法

Posted at

次のソースコードを使えば、Petalマップで場所検索ができます。

val uriString = "petalmaps://textSearch?text={場所検索のキーワード}"

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