title: How to open default sms app in Lollipop andorid
body: <p>When user click on a button default sms app should open and I am also supplying the message to whom I am sending the number but not being able to do that below is the code that I am using right now.</p>
  
  <pre><code>private void sendSMS(String _Mobile_Number) {
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.KITKAT) // At least KitKat
      {
          String defaultSmsPackageName = Telephony.Sms.getDefaultSmsPackage(context); // Need to change the build to API 19
  
          Intent sendIntent = new Intent(Intent.ACTION_SEND);
          sendIntent.setType("text/plain");
          sendIntent.putExtra(Intent.EXTRA_TEXT, "text to send");
       //   sendIntent.setData(Uri.parse("sms:" + _Mobile_Number));
          if (defaultSmsPackageName != null)// Can be null in case that there is no default, then the user would be able to choose
          // any app that support this intent.
          {
              sendIntent.setPackage(defaultSmsPackageName);
          }
          context.startActivity(sendIntent);
  
      } else // For early versions, do what worked for you before.
      {
          Intent smsIntent = new Intent(android.content.Intent.ACTION_VIEW);
          smsIntent.setType("vnd.android-dir/mms-sms");
          smsIntent.putExtra("address", _Mobile_Number);
          smsIntent.putExtra("sms_body", "");
          context.startActivity(smsIntent);
      }
  }
  </code></pre>
  
  <p>when I use below line it give me exception.</p>
  
  <pre><code>sendIntent.setData(Uri.parse("sms:" + _Mobile_Number));
  
  android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SEND dat=sms:xxxxxxxxxxxx flg=0x1 pkg=com.google.android.talk (has clip) (has extras) }
  </code></pre>
  
  <p>if I do not use that line then my default app opens but it show me the list of contacts. when I select one contact the in the text are I see the text that I have written "text to send". But I don't  want this </p>
  
  <p>What I want is when I click the button my default app open and in the contact  text box my provided number should be there.</p>