android - Application needs to restart every time it's entered -


i have application splash screen. shows first time run never shows again. there anyway of making application reset every time start it?

your problem activity not been destroyed, when goes background. instead app continues @ place left it. imagine switch between 2 activities don't want show in cases splash screen been shown again. default continue application until terminated in background e.g. when memory gets low.

however if want behavior (which not suggest) call in onpause()the method finish(). terminate current instance, when activity background.

if want show splash screen on app launcher icon click should use android:launchmode="singleinstance" option in manifest, lal pointed out in answer. detect application got started launcher icon can check intent.

on first start oncreate() been called, on second start (via launcher) onnewintent(intent intent) been called there can check intent.category_launcher.equal(intent.getaction()) if app opened launcher or not.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -