Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/206.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何使用intent打开Sygic地图?_Java_Android_Sygic - Fatal编程技术网

Java 如何使用intent打开Sygic地图?

Java 如何使用intent打开Sygic地图?,java,android,sygic,Java,Android,Sygic,我正在尝试在sygic应用程序中使用 String str = "com.sygic.aura://search|Gas%Station"; startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(str))); 如计划的那样。但是,代码只打开应用程序,搜索栏为空。它不搜索任何东西 我做错了什么?我花了数小时试图寻找并想出一个解决方案。如果你还没有这样做,你可以从我对sygic文档和google的研究中进行一些尝

我正在尝试在sygic应用程序中使用

  String str = "com.sygic.aura://search|Gas%Station";
  startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(str)));
如计划的那样。但是,代码只打开应用程序,搜索栏为空。它不搜索任何东西


我做错了什么?我花了数小时试图寻找并想出一个解决方案。

如果你还没有这样做,你可以从我对sygic文档和google的研究中进行一些尝试(我没有使用sygic应用程序)

  • 如果%20无法解决此问题,请尝试在搜索字符串中使用+符号表示空格,如Gas+Station。

  • 因为doucmentation提到要遵循编码,所以请尝试按照documentation示例重写Url " 请注意,对于大多数使用,参数字符串需要进行URL编码(所谓的百分比编码)。 它通常与以下字符相关:“#%[]^`{|}和空格。有关确切的规则,请查看有关编码的文档 示例:而不是com.sygic。aura://route_download|http://dat.my.com/my route.sif 使用com.sygic。aura://route_download%7Chttp%3A%2F%2Fdata.my.com%2Fmy%20route.sif"

  • 请检查文档中提供的示例。也许您希望将“Gas Station”拆分为两个字符串

    字符串lon=“15.06591”; 字符串lat=“47.73341”; 字符串类型=“驱动器”; String str=“com.sygic。aura://coordinate|“+lon+”|“+lat+”|“+类型; startActivity(新的意图(Intent.ACTION_视图,Uri.parse(str))


  • 如果你想搜索
    加油站
    ,我想你应该像
    加油站
    而不是
    加油站
    。@dinkar_kumar已经试过了。没有用。