Greetings. I have been struggling with a design for a couple of weeks now and I cannot make any headway towards a solution. I am hoping someone can provide some insight.
I want to send an APDU message to my SIM card after the phone boots, when it goes to sleep (pushing power button, no wakelocks, etc.), and also when the phone turns back on. The first design was to register for two Intent filters for ACTION_BOOT_COMPLETED and ACTION_SHUTDOWN. Whever one of these occurred, I would send an APDU to the SIM card. Additionally, logic was added to read the 'mPartialCount' value in the 'PowerManagerService' to also send APDU messages when the value was 0 or 1. The problem is APDU messages cannot be sent until the 'PhoneInterfaceManager' has published its interface and 'updatePhoneState()' is called. Any attempts to send APDU messages before these result in the phone never completing its startup. Also, during the bootup time, the 'mPartialCount' value is 0 and 1 and various times. This ruled out using ACTION_BOOT_COMPLETED to denote when the first APDU could be sent. Based on my design of using 'mPartialCount' for sending APDUs, I needed a way of figuring out when the phone interface was available. The phone application looked like it registers for an event like ACTION_ANY_DATA_CONNECTION_STATE_CHANGED. Apparently, the events from the 'TelephonyManager' are the preferred method? Hopefully I have explained my design and problems sufficiently. I am a RTOS and Linux kernel developer during the day, and doing this at night. Please, someone, give me a few minutes and provide some suggestions or insight. Thank you very much. DP -- 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

