android - How to keep Activity alive when its parent activity gets destroyed -


i launch activity activity b . launch , b gets destroyed. result gets displayed momentarily , gets destroyed . how keep alive after b destroyed. how launch b.

        intent intent = new intent();         intent.setflags(intent.flag_activity_clear_top | intent.flag_activity_single_top);         intent.setclass(b.this, a.class);          intent.putextra(key, val);         startactivity(intent);  

i have mentioned launchmode activity in manifest file 'singletask'.

please me how achieve .

actvity b destroyed due flag intent.flag_activity_clear_top, doesnt affect activity life cycle. meaning if activity being destroyed might error in own life cycle method not chained activity b


Comments

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -