Android 如何通过whatsapp发送我的位置,同时保持更新?

Android 如何通过whatsapp发送我的位置,同时保持更新?,android,firebase,google-maps,google-cloud-firestore,Android,Firebase,Google Maps,Google Cloud Firestore,我要找的是facebook的messenger共享位置,目前我有: public void sendMessage() { String whatsAppMessage = "http://maps.google.com/maps?saddr=" + mCurrentLocation.getLatitude()+ "," + mCurrentLocation.getLongitude(); Intent sendIntent = new Intent(); sendInt

我要找的是facebook的messenger共享位置,目前我有:

public void sendMessage() {
    String whatsAppMessage = "http://maps.google.com/maps?saddr=" + mCurrentLocation.getLatitude()+ "," + mCurrentLocation.getLongitude();
    Intent sendIntent = new Intent();
    sendIntent.setAction(Intent.ACTION_SEND);
    sendIntent.putExtra(Intent.EXTRA_TEXT, whatsAppMessage);
    sendIntent.setType("text/plain");
    sendIntent.setPackage("com.whatsapp");
    startActivity(sendIntent);
}
我想我可以使用firebase的firestore之类的东西来存储位置,并在不同的设备上保持更新。但我可以在whatsapp上保持更新,还是应该在我的应用程序上进行更新?(有一个跟随用户移动的标记) 目前我所拥有的是


感谢您的帮助

使用firestore不会解决任何问题,因为你最终会发送一大堆消息(如果你不断更新,可能会淹没你的收件人的收件箱)

您将无法将手机位置绑定到destinator whatsapp收件箱中的实时更新,因为他们可能会使用Google Maps打开它,并且您的应用程序将无法告知此特定手机上的Google Map移动标记


你应该重新思考你的应用程序的架构。您可以改为在应用程序中使用Firebase进行更新。但这需要(正如我所说的)重新思考你的过程

我知道这就是我想做的。最后一个小问题,是地理位置变化很大(比如每100毫秒一次),还是只有在变化很大的情况下(如果我步行大约5~10米)?这取决于你。看一看。您可以配置MindInstance或minTime来触发updatesPerfect!谢谢你的回答!