Slow loading time for Android App -


i searched , couldn't find relevant answer problem.

occasionally, android app slow in loading. use button close app. when start app again, sometimes, app takes time load, after starting other activities main activity. load new activity using intent.flag_activity_single_top flag.

i suspect activity didn't stop pressing button; so, when relaunch app @ other time have slow loading. if force stopped app before relaunch, loads immediately.

my question

  1. should put finish() @ activity when press button?
  2. i use intent.flag_activity_single_top make transition activity, right flag use?

thanks

quote flag_activity_single_top developer.android.com

if set, activity not launched if running @ top of history stack.

this means activity not being launched. suggest not use flags altogether start activities. cannot sure unless paste code , specify want achieve.

another note: doubt want "destroy" app when user presses "back" button. should leave @ default too. virtual machine destroy app necessary.

ps: 1 of apps supervised developer betaglide (a mobile app performance testing tool) had similar problem , above mentioned steps , measuring results betaglide able solve it.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -