0

I'm trying to open the sms/mms inbox in Samsung s4 but when i click on this button the app get crashed

here is the code:

Button sms = (Button) findViewById(R.id.smsopen);
 sms.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        // TODO Auto-generated method stub
        Intent intent = new Intent("android.intent.action.MAIN");
        intent.setComponent(new ComponentName("com.android.mms","com.android.mms.ui.ConversationList"));
        startActivity(intent);


    }
});

and i used a permissions in mainfest.xml

<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Siva
  • 457
  • 4
  • 17
memo
  • 1
  • 4
  • force close with what error? post your LogCat. – panini Apr 16 '14 at 21:58
  • it says that it cant access to the mms/sms on the samsung device but it accessed to any other device .. is there is any code to make it force reading the device sms/mms ? – memo Apr 16 '14 at 22:03

0 Answers0