I am running the code below. There are two fragments. First, how do I install a package, and second, how do I extract it. For some reason, every time I check the package, it returns as null.
Any advice on why this is or what I did wrong will be greatly appreciated.
Intent intent = new Intent(this, com.hom.app.Hom.class);
Bundle b = new Bundle();
b.putString("WELL", "yes");
intent.putExtras(b);
startActivity(intent);
Extract Package:
String well ="";
Bundle bun = getIntent().getExtras();
String standard = "yes";
if(bun != null){
Log.v("Bundle", "Contains data");
well = bun.getString("WELL");
if(well == null) well = "";
if(well == standard) method();
}
source
share