exception - Android crashes on keyboard plugging -
i'm developing android application in need support usb keyboard. haven't developed explicitly support usb keyboard because thought every application can use usb keyboard.
the problem when i'm trying connect or disconnect usb keyboard, application crashes without error trace application.
my device lenovo android 4.1 installed. can resolve problem?
an activity configuration change occurs when external keyboard attached.
to resolve crash, add following element androidmanifest.xml
activities:
android:configchanges="orientation|keyboard|keyboardhidden"
per documentation, android:configchanges
:
lists configuration changes activity handle itself. when configuration change occurs @ runtime, activity shut down , restarted default, declaring configuration attribute prevent activity being restarted. instead, activity remains running , onconfigurationchanged() method called.
Comments
Post a Comment