//create a new intent and specify that it's target is SecondaryActivity...
            Intent intent = new Intent(getApplicationContext(),newpage.class);
            //load the intent with a key "myKey" and assign it's value
            //to be whatever has been entered into the text field...
            //launch the secondary activity and send the intent along with it
            //note that a request code is passed in as well so that when the 
            //secondary activity returns control to this activity, 
            //we can identify the source of the request...
            startActivityForResult(intent, SECONDARY_ACTIVITY_REQUEST_CODE);

protected void onActivityResult(int requestCode, int resultCode, Intent intent){
super.onActivityResult(requestCode, resultCode, intent);
Bundle extras = intent.getExtras();
        String t1=extras.getString("returnKey"):



     Intent intent=this.getIntent();
        Bundle bunde = intent.getExtras();
        String t_appslink_url=bunde.getString("title");

….. do something…..return… fish page..

 Intent intent = new Intent();
                //add "returnKey" as a key and assign it the value
                //in the textbox...
                //get ready to send the result back to the caller (MainActivity)
                //and put our intent into it (RESULT_OK will tell the caller that 
                //we have successfully accomplished our task..
                //close this Activity...

By admin-powenko

Dr. Powen Ko is a teacher and CEO on LoopTek LLC, and like to teaching. if you need to class, please let PowenKo know, he will love to service and sharing. LoopTek web site is

Leave a Reply