Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/204.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/7/google-maps/4.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
Android 如何像whatsapp一样共享位置?_Android_Google Maps_Android Intent_Share - Fatal编程技术网

Android 如何像whatsapp一样共享位置?

Android 如何像whatsapp一样共享位置?,android,google-maps,android-intent,share,Android,Google Maps,Android Intent,Share,我想通过ACTION\u SEND使用Intent分享一些固定的lat、long和text。我可以像stringsharebody=”那样共享urlhttp://maps.google.com?q=“+lat+”,“+lng&类似图像 sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("android.resource://" + context.getPackageName() + "/d

我想通过
ACTION\u SEND
使用Intent分享一些固定的lat、long和text。我可以像
stringsharebody=”那样共享urlhttp://maps.google.com?q=“+lat+”,“+lng&类似图像

sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("android.resource://" + context.getPackageName()
                        + "/drawable/" + "ic_launcher"));
sharingIntent.setType("image/*")
但是我找不到whatsapp用来共享位置的方式。有没有办法像whatsapp那样分享位置传递一些静态图像&通过单击该图像,地图应该在默认选择器@user-side中打开。有什么方法实现该场景吗


谢谢。

有一个非常棒的github项目,名为who反向工程whatsapp协议。从它的位置共享层,您可能会发现它很方便

<message t="{{TIME_STAMP}}" from="{{CONTACT_JID}}" 
    offline="{{OFFLINE}}" type="text" id="{{MESSAGE_ID}}" notify="{{NOTIFY_NAME}}">
        <media 
            latitude="52.52393" 
            type="location"
            longitude="13.41747"
            name="Location Name"
            url="http://www.foursquare.com/XXXX"
            encoding="raw"
        >{{THUMBNAIL_RAWDATA}}</media>
    </message>

{{THUMBNAIL_RAWDATA}}

试试这个@appubala,它只显示地图上的区域。`maps.google.com/maps?q=12,77`显示区域+定位销。@BhoomikaBrahmbhatt Tare确切地说是su joie chie?人名get karvu che j server thi ave che e serialize thi?@BhoomikaBrahmbhatt您可以定制