送信側でこれを試すことができます:
MyModel model = new MyModel();
//1. using constructor
Boolean blnObj1 = new Boolean(model.getBooleanStatus()); // This //getBooleanStatus will return 'boolean' value
//2. using valueOf method of Boolean class. This is a static method.
Boolean blnObj2 = Boolean.valueOf(model.getBooleanStatus());
}
Intent targetIntent = new Intent(MyCalass.this, TargetClass.class);
targetIntent.putExtra("STATUS", new Boolean(model.getBooleanStatus()));
targetIntent.putExtra("STATUS", Boolean.valueOf(model.getBooleanStatus()));
startActivity(targetIntent);
受信側:
Intent receiverIntent = getIntent().getBoolean("STATUS");