0

我想setLocation自动从我的应用程序中获取而不预设集合文档名称。

public class MainActivity extends AppCompatActivity {
    CollectionReference ref = FirebaseFirestore.getInstance().collection("collection");
    GeoFire geoFire = new GeoFire(ref);

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        geoFire.setLocation("firebase-hq", new GeoLocation(26.48956, 94.89945));
4

0 回答 0