Firebase Firestore only works on web

When I run expo in android the data is undefined, but when run on web, its works.
It is the code
firebase version 9.1.3
This is the code

const firebaseConfig = {
  apiKey: "",
  authDomain: "",
  projectId: "",
  storageBucket: "",
  messagingSenderId: "",
  appId: "",
  measurementId: ""

const db = getFirestore();
export default function App() {
    const unsub = onSnapshot(doc(db, "collection1", "test1"), (doc) => {

Please help me what to do.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.