相关疑难解决方法(0)

如何从Flutter应用程序打开应用程序?

我正在开发一个Flutter应用程序,我需要向用户显示一个地方的导航.那么,我如何从我的Flutter应用程序中打开地图应用程序,就像我们在Android中使用外部意图一样?

或者他们是任何扑动插件吗?

flutter

12
推荐指数
2
解决办法
1万
查看次数

Android - 如何使用 Intent 和 KML 打开谷歌地图?

我需要使用 sdcard 上已经存在的 kml 文件打开谷歌地图。(/sdcard/example.kml)

我试过:

这个答案是错误的,当点击链接时,地图打开,但搜索位置“file:///sdcard/example.kml”

  • 使用意图:

此代码抛出ActivityNotFoundException

Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
        Uri.parse("file:///sdcard/example.kml"));
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
  • 我尝试使用 setDataAndType 方法,但不起作用:

另一个ActivityNotFoundException

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(
         Uri.parse("file:///sdcard/example.kml"),
                   "application/kml");
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
  • 关于此问题的其他两个未解决的主题:

在 Android 上的 Google 地图中打开本地 KML 文件

Android API 是否支持 KML 文件?

知道如何打开这个kml吗?

谢谢!!!

android android-intent

5
推荐指数
1
解决办法
8164
查看次数

标签 统计

android ×1

android-intent ×1

flutter ×1