The application aims to write a message at the first activity, and after clicking on a button, this message appears in the second activity.
But After installing the application on smartphone, when i click on the button, a message appears saying " application is stopped". Help me please." i USED ECLIPSE for developping this application"

The first activity code:

```
public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void login (View view) {

        EditText user = (EditText) findViewById(R.id.user);
        EditText password = (EditText) findViewById(R.id.password);
        Intent myintent= new Intent (getApplicationContext(),Main2Activity.class);  //permet de basculer de cette interface à la 2éme aprés avoir éxécuter "startActivity(myintent)";

        Bundle b=new Bundle();
        b.putString("username", user.getText().toString());
        b.putString("password", password.getText().toString());
        myintent.putExtras(b);
        startActivity(myintent);
}

```

The second activity:

```
public class Main2Activity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        TextView mes=(TextView)findViewById(R.id.mes);

        Bundle b=getIntent().getExtras();
        string user=(string) b.get("username");
        string pass=(string) b.get("password");
        mes.setText("user:"+user  +"password:"+pass);

}

```