Tuesday, June 30, 2015

Pass a String from one Activity to another Activity in Android

Post Value from Activity Class
 Intent ii = new Intent(this, GameStartPage.class);
                   // ii.putExtra("pkgName", B2MAppsPKGName);
                    ii.putExtra("pkgName", YourValue);
                    ii.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    startActivity(ii);
Get Value from Another Activity Class
  pkgn = getIntent().getExtras().getString("pkgName");

No comments:

Post a Comment