我需要使用共享意图活动从我的应用程序共享位置,我已经查看了一些示例并知道如何实现共享意图。但是我在setType方面遇到了困难。我需要我的应用程序共享位置详细信息以及地图上的用户位置。
顺便说一句,我复制了一个用户的代码,这个问题非常类似,希望不会有任何冒犯。
真的非常感谢任何帮助。
Intent intent1 = new Intent(Intent.ACTION_SEND);
intent1.setType("text/plain");
intent1.putExtra(Intent.EXTRA_TEXT, "The status update text");
startActivity(Intent.createChooser(intent1, "Select prefered Service"));
String uri = Uri.Builder().scheme("geo").appendPath(lat +","+ lng).appendQueryParameter("q", name).build();
- Joel RosenbergIntent.createChooser
来打开一个选择对话框,其中包含支持该意图的所有应用程序。请参见其他答案。 - IgniteCoders