android.content.res.Resources$NotFoundException

Here is your mistake:

Toast.makeText(ScreenLockActivity.this, count, Toast.LENGTH_SHORT).show();

the makeText you are trying to invoke here, is the makeText that takes as second parameter a resId. See here for more info. Since you want to print the count value, you have to convert it in a String.

String value = String.valueOf(count);
Toast.makeText(ScreenLockActivity.this, value, Toast.LENGTH_SHORT).show();

Leave a Comment