I have a pending intent for requesting user to provide permission to access USB. Now i have to return a status whether the connection was success or not. Initially permission to access the USB wouldn't be there it will return false, so i return false to the caller. But now i have to wait before returning the status assuming the permission is fired, so i have put it in a while loop until the receiver receives either cancel or OK, but what if user taps outside the dialog. The thread will still be waiting, and also some times pending intents are not fired properly. What can i do please help.
Is there any call backs to know whether pending intent was fired or not??
Aucun commentaire:
Enregistrer un commentaire