What does it mean intent.setFlags(805306368) in android -
i used line of code launch app intent.setflags(805306368);
, launches app , resumes if running in background. integer number 805306368 mean? resume app if running.does know.
805306368
equivalent 0x30000000
in hex , 0x30000000
used open intent
following flags :
intent.flag_activity_new_task|intent.flag_activity_single_top
so, equivalent use above combination or 0x30000000
.
from android docs flag_activity_single_top, flag_activity_new_task :
flag_activity_single_top = 0x20000000 flag_activity_new_task = 0x10000000
so, combination results in 0x30000000
also, mentioned in docs new task flag i.e,flag_activity_new_task
used achieve following behaviour:
when using flag, if task running activity starting, new activity not started; instead, current task brought front of screen state last in.
and single top flag i.e, flag_activity_single_top
used achieve following behaviour, mentioned in docs :
if set, activity not launched if running @ top of history stack.
so, these flags resume activity , prevents opening new activity.
Comments
Post a Comment