title: Android Email intent not Working on Android 11 java
body: <h1>AndroidManifest.xml</h1>
  <p>...</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      package=&quot;com.example.justjava&quot;&gt;
  
      &lt;application
          android:allowBackup=&quot;true&quot;
          android:icon=&quot;@mipmap/ic_launcher&quot;
          android:label=&quot;@string/app_name&quot;
          android:roundIcon=&quot;@mipmap/ic_launcher_round&quot;
          android:supportsRtl=&quot;true&quot;
          android:theme=&quot;@style/Theme.JustJava&quot;&gt;
          &lt;activity
              android:name=&quot;.MainActivity&quot;
              android:exported=&quot;true&quot;&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
  
                  &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  <h1>...
  MainActivity.java(Intent Part)</h1>
  <p>...</p>
  <pre><code>public void SubmitOrder(View view) {
  
  
          EditText enteredName = findViewById(R.id.name_editText_view);
          String name = enteredName.getText().toString();
  
          CheckBox checkCream = findViewById(R.id.checkbox1);
          boolean whippedCream = checkCream.isChecked();
  
          CheckBox checkChocolate = findViewById(R.id.checkbox2);
          boolean chocolate =checkChocolate.isChecked();
  
          int price = calculatePrice(whippedCream,chocolate);
          String priceMessage =createOrderSum(name,price,whippedCream,chocolate);
  
          Intent intent = new Intent(Intent.ACTION_SENDTO);
          intent.setData(Uri.parse(&quot;mailto:&quot;)); // only email apps should handle this
          intent.putExtra(Intent.EXTRA_SUBJECT, &quot;The just java order for&quot;+ name);
          intent.putExtra(Intent.EXTRA_TEXT,priceMessage);
  
  
          if (intent.resolveActivity(getPackageManager()) != null) {
              startActivity(intent);
          }
  
      }
  </code></pre>
  <p>...</p>
  <p>Email intent is not working on my android 11 device but it is working fine on AVD on android versions less than 11. The submit order is not doing any thing in the app. It should send an intent to email app with order summary and subject filled.</p>