Android 两个Activity进行数据传送 发送

Activity1::

        Intent intent= new Intent(this, OtherActivity.class);
        String name = "heyiyong";
        intent.putExtra("name", name);
        startActivity(intent);

OtherActivity:

        Intent intent = getIntent();//获取调用者的意图
        String name = intent.getStringExtra("name");
        System.out.println(name);

 

posted @ 2013-11-19 14:37  无忧之路  阅读(201)  评论(0编辑  收藏  举报
无忧之路