Android Question Restore State and Save State

Yvon Steinthal

Active Member
Licensed User
Hi all,

I used to force a certain orientation in my app, but now the client wants the app to be able to switch from landscape to portrait and vice-versa.

My Activity_Pause contains:

B4X:
StateManager.SaveState(Activity,"Exam")

and my Activity_Resume contains:

B4X:
StateManager.RestoreState(Activity,"Exam",0)

However i get a log stating this:

"Error loading state.
java.lang.ArrayIndexOutOfBoundsException:length=1;index=1"

Help?

Thx

Y.
 
Top