For example, the user is inputting information about himself in application A, and he returns to the home UI before he finished inputting. How do I recognize a situation described above in application A. Can I add some code in android source code?
Asked
Active
Viewed 56 times
-2
-
Yes please do add in Android Source code. That is most welcome. – Razgriz Jun 27 '16 at 12:48
-
Home UI means Desktop or App Home – Ajit Jun 27 '16 at 12:51
-
Write some validation rule for your inputting field(editext) such as not empty,minimum 20 characters etc.. if your user presses back key without entering data you have to override onBackPressed() method in your activity to validate the input field.If you have any other custom button handles your validation on your custom button click – dindinii Jun 27 '16 at 13:34
-
@Ajit Home UI mean Desktop, the Launcher – cloudending Jun 28 '16 at 00:39
1 Answers
0
Using onUserInteraction(), user interaction with app can be found. For deUser Interaction with App
And for detecting user is on dektop, define a background service and detect the package name. Somelike is done by lock app.