[英]How to add own application to the list of Maps Applications?
If some other application wants to show something on the map (uses link geo:lat,lng ), then before showing the map, it shows 'Maps Applications' list.如果其他应用程序想要在 map 上显示某些内容(使用链接geo:lat,lng ),那么在显示 map 之前,它会显示“地图应用程序”列表。 So, I could choose which map application should be started.
所以,我可以选择应该启动哪个 map 应用程序。
How can I add my own application to this list?如何将我自己的应用程序添加到此列表中?
The list here shows the various URL formats used to launch Google apps (including maps).此处的列表显示了用于启动 Google 应用程序(包括地图)的各种 URL 格式。 To launch maps you would use:
要启动地图,您将使用:
try {
Intent myIntent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("geo:0.00,0.00"));
startActivity(myIntent);
} catch (URISyntaxException e) { }
If you want the user to be presented with the option to open your app instead of Google Maps, then you have to register to handle the same Intent in your manifest, maybe something along the lines of this .如果您希望向用户显示打开您的应用程序而不是 Google 地图的选项,那么您必须注册以处理清单中的相同 Intent,可能类似于this 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.