I have a problem with the method "onActivityResult". I create a new Activity from my main activity:
Intent intent = new Intent(this, NewActivity.class);
startActivityForResult(intent, 0);
The new Activity is ended like this:
Intent resultIntent = new Intent();
resultIntent.putExt开发者_Python百科ra("vid", hmvenues.get(venues[currentPosition]));
resultIntent.putExtra("name", venues[currentPosition]);
setResult(RESULT_OK, resultIntent);
finish();
But the Method onActivityResult seem to be not called
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
Log.d(this.getClass().getName(),"onActivityResult");
...
}
Does anyone have an idea, what I did wrong? Thanks!! Seb
Oh, I found the error: I had another Activity open, which was on the Activity stack between those Activities and caused the problem.
精彩评论