SDK 15, ExitApplication Issue

margret

Well-Known Member
Licensed User
Longtime User
I have an App password protected and if the password is set, when the app starts it calls the password activity for verification. If they fail to enter the correct password, after three times, the app closes with ExitApplication. This works fine on every device I have used but one.

I have a new device running SDK 15. When you enter the wrong password three times, the app exits and then restarts, so you can not get out of the app. The exitapplication should kill the complete app. This same code runs fine on the ASUS which is also ICS.

Any Ideas why this might be happening?

UPDATE

This seems to only happen if your app has more than one and runs more than one Activity. If I load the app and don't click to start any other Activities and then exit and use ExitApplication, it exits and works ok. If the App calls at any time another Activity and then you use ExitApplication. The OS restarts the App as soon as it is killed. This is only on this one device. This works fine on the ASUS and all other devices I have used.
 
Last edited:

margret

Well-Known Member
Licensed User
Longtime User
@Erel,

I understand the reason for the Activity.Finish. The issue I have is if they put the wrong password three times and I use Activity.Finish, the app closes and you are back at the home screen. Now, because the OS has not killed the APP, if you tap the icon to load and try again, it just closes again. You have to set and wait until the OS kills the APP before you can even try to login again. On some devices this can be an hour or more. This is the only spot I was using ExitApplication.

I will have to dig through the code and see what else I can do.

UPDATE
I changed the code to work with Activity.Finished but now each time the app starts another Activity like the browser and then returns you have to enter your password again. I didn't want them to have to enter it but the first time. When FirstTime is True.
 
Last edited:
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
but margret if you want that user can immediately reactivate the app after an exit, why limiting to three trials?
anyway, I would keep a time stamp upon exit. in activity_create I would check time passed, and reallow user to enter password, if the interval is what I chose, otherwise I would close the activity. this of course upon restarting the app after three failures .
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
I see. Why not replicating a firstTime, using another processGlobal variable? :)
 
Upvote 0

margret

Well-Known Member
Licensed User
Longtime User
How do you know if it's FirstTime or not because you set a variable. If they typed their pass wrong and the app closes and you restart, it will be in the same state it was in after returning from another activity. Yes you can set it if the pass fails, but what if the OS does kill the app.

This app calls about 11 other activities and should only ask for the pass on the FirstTime start. It is easy to do what you are saying but not with the app in the state it is in and the number of activities it calls.

It has run fine on hundreds of devices until this one. They still have bugs in their OS and I see them in other places as well but many people have them and we are stuck just having to make it work.

I may have it working writing a combination of three different files that have different values based on the last activity. I would of written this different a while back if I had known this could happen. Live and learn, however, I am not in the mood to re-write it that way now.:eek:
 
Upvote 0

margret

Well-Known Member
Licensed User
Longtime User
Yes it would kill it. You would see more if you had the code. It's not as easy as just getting in. One password lets you do x and another lets you do xx and yet another xxx. So, it's a multi level system and I think I have the three files doing what I need. I have a lot of testing to do. It seems to work on the new device but knowing my luck, it may now be broke on the other units. So my night will be filled with Test, Test and more Test.
 
Upvote 0
Top