Reputation: 1
I have a requirement where i need to show a pin entry screen to the user after a time out value which the user will select in the application ( for example he selects time out ) . What i plan to do is note down the current time on deactivated event . In activated event calclate the time difference + time out set in the mobile. If difference is more than time out show the pin screen else dont show.
But my question is how do we get the "Screen times out after" value which is an option set in the mobile settings screen
Upvotes: 0
Views: 169
Reputation: 65564
The value in Settings > lock+wallpaper > Screen times out after
is not exposed via any public API.
This is a system level setting and should not be used directly within your application.
If you must have a setting within your app where if timestoned for more than a user specified period of time the user must re-enter a code you should add this setting directly within the app.
Based on standard mobile usage patterns and the functionality built into the phone already such a feature seems completely unnecessary.
If the person you're creating this app for insists on this feature I strongly recommend testing this with actual users to see what feedback you get. If you're just adding this as an extra feature that you think would be good I'd recommend not adding it. If you still insist, PLEASE give your users the option of disabling this feature.
Upvotes: 1