@Override
public void onReceive(Context context, Intent intent) {
if (intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(TelephonyManager.EXTRA_STATE_IDLE)) {
Intent newIntent = new Intent(context, SpeedDialerActivity.class);
intent = new Intent(context, SpeedDialerActivity.class);
context.startActivity(newIntent||intent(received from argument)); // which object is better here.
}
}
Is it better to use the intent received in the argument of the onReceive method or is it better to create and use a new object of type Intent class. If I use the Intent object received as argument in onReceive method would the behavior be ambiguous.