title: read firestore value from document doesn't work
body: <p>I want to read the a <strong>value</strong> from <strong>firestore</strong> document. But it doesn't work for me and I don't know where is the problem.should i use <strong>get()</strong> or <strong>realtime updates.</strong>
  I tried both but doesn't work for me 
  <em>this is my code.</em> 
  I confirmed my positions by using toast and the are ok.</p>
  
  <p>How to solve this problem?</p>
  
  <pre><code>public class SingleAdActivity extends AppCompatActivity {
      String x;
      String a;
      String z;
      String coname;
      TextView Co_Name;
  
      private ListenerRegistration listenerRegistration;
      DocumentReference firebaseFirestore;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_single_ad);
          Co_Name = findViewById(R.id.SingleAd_CoName);
          ad_discription = findViewById(R.id.disrcibe_ad);
          phone_number = findViewById(R.id.phone);
          x = getIntent().getStringExtra("single_ad_position");
          a = getIntent().getStringExtra("single_ad_categoryP");
          z = getIntent().getStringExtra("documentId");
  
  
          firebaseFirestore = FirebaseFirestore.getInstance().collection("MainCategories")
                  .document(String.valueOf(a))
                  .collection("Ads")
                  .document(z);
  
          @Override
          protected void onStart () {
              super.onStart();
              listenerRegistration = firebaseFirestore
                      .addSnapshotListener(this, new EventListener&lt;DocumentSnapshot&gt;() {
                          @Override
                          public void
                          onEvent(@Nullable DocumentSnapshot documentSnapshot, @Nullable FirebaseFirestoreException e) {
                              if (e != null) {
                                  Toast.makeText(SingleAdActivity.this, "error", Toast.LENGTH_SHORT).show();
                                  return;
                              }
                              assert documentSnapshot != null;
                              if (documentSnapshot.exists()) {
  
                                  coname = documentSnapshot.getString("CompanyName");
                                  Co_Name.setText(coname);
  
                              } else {
  
                                  // Co_Name.setText(a);
  
                              }
                          }
                      });
  
          }
  
          @Override
          protected void onStop () {
              super.onStop();
              listenerRegistration.remove();
          }
      }
  }
  </code></pre>