I\'m creating a audio swipe card reader but I\'m getting an error with windows. I can\'t trace what causing the error in my codes. Can anyone hel me to point what causing the er
your targetSdk
must be less than 14.
try setting it to 13
Check this Answer. And it works for me.
Problem seems to be in onAttachedToWindow()
. Change the function as below and give it a try.
public void onAttachedToWindow() {
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
super.onAttachedToWindow();
}