title: ANDROID: email client receiver email id empty in android-parse
body: <p>I'm using android- parse server in app.  below is parse db screenshot of email column .
  the email column is after the hidden password column in database . </p>
  
  <h2><a href="https://i.stack.imgur.com/DD3P3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/DD3P3.png" alt="parse database screenshot"></a></h2>
  
  <p><strong>my problem is</strong></p>
  
  <hr>
  
  <p>when i retrieve email ids to email client,
  email is null even if the email column has emails .</p>
  
  <hr>
  
  <p>note : in the app in another place (another table) i'm pulling email ids to email client in same manner, but there mail is showing well .. only here the problem occurs.</p>
  
  <p>if anyone knows please help ?</p>
  
  <blockquote>
    <p>this is email column in parse database</p>
  </blockquote>
  
  <pre><code> try{
                          JSONObject jsonObject = parseObjectToJson(object);
                          Log.d("Object", jsonObject.toString());
                          Log.d("Email", "+" + object.get("email"));
                          personNumber = jsonObject.getString("telephone");
                          personEmail = jsonObject.getString("email");
                      }catch (JSONException je){
  
                      }catch (ParseException pe){
  
                      }
  </code></pre>
  
  <blockquote>
    <p>this is  email button</p>
  </blockquote>
  
  <pre><code>  emailPerson = (Button)findViewById(R.id.individualEmail);
              emailPerson.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      Intent i = new Intent(Intent.ACTION_SEND);
                      i.setData(Uri.parse("mailto:"));
                      i.setType("plain/text");
                      i.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] {personEmail});
                      startActivity(i);
                  }
              });
              if(personEmail==null || personEmail.equals("")  || personEmail.equals(" ")){
                  emailPerson.setClickable(false);
                  emailPerson.setEnabled(false);
                  emailPerson.setVisibility(View.GONE);
              }
              else{
                  emailPerson.setEnabled(true);
                  emailPerson.setClickable(true);
                  emailPerson.setVisibility(View.VISIBLE);
              }
  </code></pre>
  
  <hr>
  
  <blockquote>
    <p>here it is working fine but this is a different table in same database . >in this table there is no hidden password field</p>
  </blockquote>
  
  <pre><code>try{
                              corporateEmail = jsonObject.getString("email");
                              if(corporateEmail == null || corporateEmail.equals("")){
                                  emailCorporate.setVisibility(View.GONE);
                                  emailCorporate.setEnabled(false);
                                  emailCorporate.setClickable(false);
                              }
  </code></pre>
  
  <hr>
  
  <pre><code>emailCorporate = (Button) findViewById(R.id.corporateEmail);
          emailCorporate.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Intent i = new Intent(Intent.ACTION_SEND);
                  i.setData(Uri.parse("mailto:"));
                  i.setType("plain/text");
                  i.putExtra(Intent.EXTRA_EMAIL, new String[] {corporateEmail});
                  startActivity(i);
              }
          });
  </code></pre>
  
  <hr>
  
  <pre><code> private JSONObject parseObjectToJson(ParseObject parseObject) throws ParseException, JSONException, com.parse.ParseException {
          JSONObject jsonObject = new JSONObject();
          parseObject.fetchIfNeeded();
          Set&lt;String&gt; keys = parseObject.keySet();
          for (String key : keys) {
              Object objectValue = parseObject.get(key);
              if (objectValue instanceof ParseObject) {
                  jsonObject.put(key, parseObjectToJson(parseObject.getParseObject(key)));
              } else if (objectValue instanceof ParseRelation) {
              } else {
                  jsonObject.put(key, objectValue.toString());
              }
          }
          return jsonObject;
      }
  </code></pre>