When looking at Android source, I observe two common methods for getting the Bundle containing the result's extra data.
A. Calls getResultsExtra()
private class StatusBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Bundle b = getResultExtras(true);
}
}
B. Calls intent.getExtras()
private class StatusBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Bundle b = intent.getExtras();
}
}
Why would you choose one method over the other method? Are there certain situations where one is preferred over the other method? Are they equivalent?