how to get string from one intent to another intent in android
<p>i tried to get String from one intent to another intent. i already tried to get that but always error. here my code :</p>

<pre><code>i = new Intent(this, JadwalKeberangkatan.class);

btnCari.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
    String getAsal = txtAsal.getText().toString();
            String getTujuan = txtTujuan.getText().toString();

            String words[] = getAsal.split(" ");
            String last = words[words.length - 1]; // parsing asal
            String s = last.replaceAll(Pattern.quote("("), "");
            String s1 = s.replaceAll(Pattern.quote(")"), "");
            String asal = s1;

            String word[] = getTujuan.split(" ");
            String lastw = word[word.length - 1]; // parsing tujuan
            String t = lastw.replaceAll(Pattern.quote("("), "");
            String t1 = t.replaceAll(Pattern.quote(")"), "");
            String tujuan = t1;

             //get tanggal
            int day = dtKeb.getDayOfMonth();
            int month = dtKeb.getMonth() + 1;
            int year = dtKeb.getYear();
            String hari = Integer.toString(day);
            String bulan = Integer.toString(month);
            String tahun = Integer.toString(year);
            String tanggal = ""+hari+"-"+bulan+"-"+tahun;

            Bundle bundle = new Bundle();
            bundle.putString("asal", asal);
            bundle.putString("tujuan", tujuan);
            bundle.putString("tanggal", tanggal);

            startActivity(i);
        }
 }
</code></pre>

<p>and here code for JadwalKeberangkatan class</p>

<pre><code>public class JadwalKeberangkatan extends Activity {

Intent intent = getIntent();
String asal = intent.getExtras().getString("asal");
String tujuan = intent.getExtras().getString("tujuan");
String tanggal = intent.getExtras().getString("tanggal");

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.jadwal);       
    TextView tx1 = (TextView)findViewById(R.id.textView1);
    tx1.setText(asal);
    TextView tx2 = (TextView)findViewById(R.id.textView2);
    tx2.setText(tujuan);
    TextView tx3 = (TextView)findViewById(R.id.textView3);
    tx3.setText(tanggal);
   }    
}
</code></pre>

<p>if i remove intent intent = getIntent(); then tx1 set to "hello", this program is running properly. so what can i do to get string from another intent?</p>
