There are many people who have encountered the same error on stackoverflow, but I haven\'t been able to find any relevant resolution in those posts. My MainActivity is start
The problem with me was that I used getIntent(), thus getting the intent of the current activity I was on.
When I switched to data.getStringExtra() it worked. Amateur mistake...
Try this-
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
if (requestCode == 1 && data != null)
{
Log.v("TAG", data.getStringExtra("Note"));
if(resultCode == RESULT_OK)
{
listItems.add(data.getStringExtra("Note"));
Log.v("TAG", data.getStringExtra("Note"));
adapter.notifyDataSetChanged();
listView.invalidateViews();
}
if (resultCode == RESULT_CANCELED)
{
}
}
}