I would like this as well. That annoys me more than the sound. If it is possible, the optimum choice for me would be just a custom sound with no screen coming on. If you could add this feature I would even pay several dollars for an app like that. It bugs me that much. Great work thus far! Appreciate it.
I think I've found the code that I need to hook into for this, so I'll probably take a shot at it over the next few days. Incidentally, the main reason I didn't think to implement it from the start is because CyanogenMod already has a system setting for wake on plug...
RE: People who are having difficulty with Samsung devices - there must be some changes in the TouchWiz frameworks that are causing the hooks in this module to fail (for example: AOSP doesn't have the alert dialog that apparently pops up on Samsung phones). I may poke a couple of other developers who have modules for Samsung phones to see if I can get a little bit of info, but it could be kind of a protracted development effort since I do not own any Samsung devices. If I have any meaningful updates regarding this I'll post here, but until then it looks like TouchWiz phones are simply not going to work. Sorry
Thanks for the answer. I exchanged phones due to a warranty issue, and I'm no longer rooted. No clipping sound on the new phone. I suspect it was gravity box or some other setting that was caused the problem, though.
I got a wireless charger for my Nexus 5 this Christmas, and was a little disappointed to learn that Android 4.2.2 added a notification sound that plays whenever a device is placed on a wireless charger, but provided no way to disable it. The reason I wanted to silence the notification is because I intend to use the charger in my bedroom, and if I'm up late the little jingle is more than likely going to wake up my wife (who would not be pleased).
So I decided to throw together an Xposed module to address the issue, since I couldn't find anything else that would work cleanly, and I decided to release it for anyone else who might find it useful.
The module is pretty straightforward, and it provides you with a handful of settings for wireless charging:
- Play the system's notification sound when you put your device on the charger
- Vibrate when you put your device on the charger
- Play a custom notification sound instead of the system one
- Wake the display when placing your device on or removing it from a wireless charger
You can enable these in basically any combination you want. Need total silence? Turn everything off!
Wireless Charging Xposed has only been tested on my Nexus 5 running CyanogenMod 11, but it should work on any AOSP based ROMs without issue. I don't know about other system ROMs, but it will work as long as the manufacturer didn't alter the part of AOSP that plays the notification. It does not appear to work on TouchWiz ROMs currently; I may look into this in the future if I have the time/resources, but can unfortunately provide no guarantees/ETAs.
I'm distributing the module here on XDA for now as well as in the Xposed modules repository (web link). If you think this is totally awesome or something, and you feel like "donating", I'm also putting it up on Google Play for $0.99 USD. There are zero differences between the paid version and the .apks here on XDA (i.e. the free one does not have ads). You're not obligated to pay anything if you don't want to. The Google Play page is here.
You can find the source code on my GitHub repository; it is licensed under the GPLv3: https://github.com/eldarerathis/Wireless-Charging-Xposed. Contributions are always welcome!
Feel free to leave questions or comments, and if you find a bug you can let me know in this thread. I may consider suggestions, but I make no guarantees; this is just something I put together with a few hours of spare time to fix something I found to be seriously annoying.
And of course, thank you to rovo89 for the Xposed Framework that made this doable.
Because of the way this module hooks into charging events, it can be a bit picky about the order that you enable things. It's something that I'm working on, but for now, make sure you perform the installation in this order:
- Install the module and activate it in your Xposed Installer
- Reboot your device
- Open the module's settings page and configure it however you'd like
At this point, Wireless Charging Xposed is known not to work on Samusng devices that are running TouchWiz ROMs. If you have another device with a non-AOSP ROM, your results may vary. If you think you've found a bug, please take a peek at your Xposed logs (open the Xposed Installer and tap the "Logs" item) and attach anything that might be relevant.
- v1.0 - Initial release
- v1.0.1 - Fix a suspend blocker that may have caused excess battery drain
- v1.1 - Add the custom notification sound setting
- v1.2 - Add the wake on charge setting; Bulgarian translations (by mamutcho)
- v1.3 - (apk removed) Add the wake on undock setting; fix the summary text of the custom ringtone preference
- v.1.3.1 - Fix a potential crash when trying to resolve the custom ringtone name
The mod works fine with my nexus 4 on rooted stock (4.4.2).
I have activated screen on when charging, but there's only one thing that disturbs me.
Before I go to bed I put my phone on the charger, the screen on to tell it's on charge => great!
But during the night, the phone get's fully charged, charging goes off, the battery begins to discharge, after a few seconds charging goes on, and the screen goes on... and it awakes me!
And so on during the whole night...
Would it be possible to add a parameter so that the screen doesn't go on if the charge is over 99℅ for example?