So far, so good with the BETA. I had a last minute request to make a long-press of the screen off quick settings tile display the power/reboot menu. Finally got it working this morning but took a little thinking outside of the box.
The first attempt, which was just a direct invocation of the global actions dialog (Android's internal name for the power/reboot/ringer mode menu that pops up when you long-press the power key) failed spectacularly. It turns out that apps outside of the framework do not have access to invoke the Global Actions class.
Second attempt was to simulate a long-press of the power key. While it sounded like a good idea and -- in theory -- should have been easy enough to implement, it didn't work. I was able to simulate a standard press of the power key easily enough but completely unable to simulate a long-press.
The third attempt involved re-writing the actual framework to display the global actions dialog upon receiving a custom broadcast. This worked perfectly. Normally, I prefer not to change things around in the framework because it can cause the phone not to boot far enough into the system to even get a logcat, but this time it went without a hitch.
Unfortunately, Real LifeTM has reared its ugly head in the past week or so and I haven't had much time to work on getting everything ready for the next release. I need to send out a new beta with the latest changes to my testers and as long as everything comes back fine from that, I should be ready to start rebuilding the themes against the new version. Once the themes are rebuilt, and one other small surprise is completed, I should be ready to release.
No comments:
Post a Comment