문제

I'm starting an activity with startActivity() but there will be times when that activity is already active. In this case I'd like to be able to access extras in the onResume() method.

Is there a way to do this?

도움이 되었습니까?

해결책

not tested
just override onResume in activity class like this

@Override
protected void onResume() {
    // TODO Auto-generated method stub
    super.onResume();
    Intent intent = getIntent();
            intent.getExtras().getString("foo");
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top