what you are doing is sendigBroadcast.... thats why you are getting null
getActivity().getApplicationContext().sendBroadcast(addIntent);
that's why you get null in the bundle here
Bundle extras = getIntent().getExtras();
To handle the result you need to implement a broadcast receiver
EDIT IMPLEMENT THE RECEIVER
public final BroadcastReceiver noteCompletedReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Toast.makeText(NoteListActivity.this, "Broadcast received", Toast.LENGTH_LONG).show();
//HANDLE HERE THE INTENT
}
};
also you need to set a intentFilter, you can register dynamic in your onCreate method like
IntentFilter filter = new IntentFilter(=====SOME CONSTANT THAT YOU DEFINE AND THAS PASSED FROM THE STARTING INTENT====);
registerReceiver(noteCompletedReceiver, filter);
and in onDestroy method of your activity you need to call
unregisterReceiver(noteCompletedReceiver);