w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Why singleInstance keep different Stack in Android

It don't keep a personal Stack, it don't have and don't belong to any Stack at all.

When it's launched exists only in this moment, if you go back or forward it will not exists anymore.

An example could be:

You have 3 activites A, B, C.

If B is singleInstance and you will let your use to go to A -> B -> C when you press the back button Android will move you back to A from C, not B because it is like it not eists anymore in the activities stack (never added to it!).

You should use it only if your application need only one activity.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.