title: Unable to store data in Firestore
body: <p>I am new to Google Cloud Firestore service but while I was saving some data, it failed: <code>document=sampleData,collection=info</code></p>
  
  <pre><code>private DocumentReference mdocRef;
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_profile);
      mdocRef=FirebaseFirestore.getInstance().collection("sampleData").document("info"); ....}
  </code></pre>
  
  <p>saving method:</p>
  
  <pre><code>private void saveInfo(){
      String Name=nameText.getText().toString().trim();
      String Phone=phoneText.getText().toString().trim();
      String Dob=dobText.getText().toString().trim();
  
      if(Name.isEmpty() || Phone.isEmpty() || Dob.isEmpty()){
          Toast.makeText(this,"Please enter the information ",Toast.LENGTH_SHORT).show();return;
      }
      Map&lt;String,Object&gt; data=new HashMap&lt;String, Object&gt;();
      data.put("name",Name);
      data.put("phone",Phone);
      data.put("dob",Dob);
      Log.i("phone",Phone);
  
      mdocRef.set(data).addOnCompleteListener(this, new OnCompleteListener&lt;Void&gt;() {
          @Override
          public void onComplete(@NonNull Task&lt;Void&gt; task) {
              if(task.isSuccessful()){
                  Toast.makeText(getApplicationContext(),"Information has been saved! ",Toast.LENGTH_SHORT).show();return;
  
              }
              else{
                  Toast.makeText(getApplicationContext(),"Information couldn't be saved!,Try again! ",Toast.LENGTH_SHORT).show();return;
  
              }
          }
      });
  
  }
  </code></pre>
  
  <p>rule information on firestore:</p>
  
  <pre><code> service cloud.firestore {
    match /databases/{database}/documents {
    match /sampleData/{anything=**}{
    allow read,write: if true;
    }
      match /{document=**} {
        allow read, write;
      }
    }
  }
  </code></pre>
  
  <p>when user input data and app calls saveInfo() then <code>task</code> in :</p>
  
  <pre><code>public void onComplete(@NonNull Task&lt;Void&gt; task) {
          if(task.isSuccessful()){
              Toast.makeText(getApplicationContext(),"Information has been saved! ",Toast.LENGTH_SHORT).show();return;
  
          }
          else{
              Toast.makeText(getApplicationContext(),"Information couldn't be saved!,Try again! ",Toast.LENGTH_SHORT).show();return;
  
          }
  </code></pre>
  
  <p>is never successful.</p>