在访问firebase firestore时,android studio中是否有任何方法可以将集合引用从一个活动传递到另一个活动?
我需要在android studio中将我的集合引用从一个活动发送到另一个活动。在访问firebase firestore时,我是否可以将我的集合引用对象从一个活动发送到另一个活动在访问firebase firestore时,android studio中是否有任何方法可以将集合引用从一个活动传递到另一个活动?,android,Android,我需要在android studio中将我的集合引用从一个活动发送到另一个活动。在访问firebase firestore时,我是否可以将我的集合引用对象从一个活动发送到另一个活动 Intent intent = new Intent(CurrentActivity.this, NextActivity.class); intent.putExtra("referenceValue", collectionObject) // this way you can pass collection r
Intent intent = new Intent(CurrentActivity.this, NextActivity.class);
intent.putExtra("referenceValue", collectionObject) // this way you can pass collection reference by implementing Serializable
startActivity()
在nextractivity.class中
yourExpectedrefrence = (collectionClassName)
getIntent().getExtras().getSerializable("referenceValue");
传递集合的路径,而不是集合本身。我可以将集合引用发送到另一个活动吗???您可以维护对引用的静态引用(DatabaseReference或StorageReference),并在所有活动中访问它。为什么首先要这样做?你不能在另一个活动上访问firebase吗?要访问静态引用,访问类必须是静态的??