Disable native android "back" button

Is there a way to disable the native “back” button on the android operating system? I’m not trying to remove the back button that is built into glide, but the actual operating system’s “back” button/option. I am adding a safety training section to our company’s app where employees are “compensated” with safety tokens. I have a completion acknowledgement that automatically adds the courses token value to their stockpile and marks the training as complete. The finish button’s visibility is conditional on the completed checkbox. However, after the training is finished and the checkbox is marked as complete and the tokens are added to their stockpile, if they hit the OS’s native back button it takes them back to the previous screen with the button showing even though it was marked as complete. This loophole lets them hit the finish button again and adds the token value to their stockpile another time. If they were to keep doing this they would be able to have an unlimited amount of tokens they can use to purchase real company swag/items.

Any way to eliminate the native back button?

No, I don’t believe so.

I think what I would probably do is set a timer when the finish button is activated that prevents them from submitting a second time.

Thanks for the response. I think I got it.

I set a condition on the button action to check for the completed status instead of having the condition on the visibility status.

Seemed to do the trick.


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.