I put this code on my onResume method:
@Override
public void onResume() {
super.onResume();
Intent intent = getIntent();
if (mInputStream != null && mOutputStream != null) {
return;
}
UsbAccessory[] accessories = mUsbManager.getAccessoryList();
UsbAccessory accessory = (accessories == null ? null : accessories[0]);
if (accessory != null) {
if (mUsbManager.hasPermission(accessory)) {
openAccessory(accessory);
} else {
synchronized (mUsbReceiver) {
if (!mPermissionRequestPending) {
/*display the dialog using requestPermission() method*/
mUsbManager.requestPermission(accessory,mPermissionIntent);
mPermissionRequestPending = true;
}
}
}
} else {
Log.d(TAG, "mAccessory is null");
}
}
but nothing ...
Le mercredi 12 juin 2013 16:34:27 UTC+1, psyco a écrit :
>
> Hi all,
>
> I installed the ADK 2011 on my Galaxy Nexus and ARDUINO Board like the
> guide in this link : http://developer.android.com/tools/adk/adk.html
>
> Every thing works OK but when I lock the smartphone screen or have an
> incoming call , my app becomes blocked
>
> I want to fix this
>
> any suggestions ?
>
--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.