문제

I am a beginner in programming and also in Android development.

I have 2 Activities with the flag ACTIVITY_REORDER_TO_FRONT and I need to retain both Activities, so I cannot use startActivityForResult(...) because cannot use finish().

I use an AsyncTask to retrieve data from a server in both Activities. This data updates content in my Activity.

How could I start this AsyncTask immediately after reordering the Activity to front?

도움이 되었습니까?

해결책

When the activity comes to the front, onNewIntent() is called, you can start your AsyncTask there.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top