[MOD][Xposed][4.2.2+] - Wireless Charging Xposed

Search This thread

s_special

Senior Member
Mar 12, 2011
473
67
This module is perfect now! I was searching for a way to control 'wake on wireless Undock'. Ty
 
A new version (1.2) has been added to the OP, and will be going up on Google Play/Xposed shortly. It adds a "Wake on Charge" option. Enabling this (default behavior) will cause the display to turn on when you start charging your device. Disabling it will cause the display to remain off. There are also Bulgarian translations added to the app, courtesy of mamutcho.

I've tried this setting on both a Nexus 5 and a Nexus 7 (2013) running the stock ROM, and Wake on Charge doesn't seem to be working. I put my phone on the wireless charger and the screen stays off, even with that setting enabled. Wake On Removing from Wireless Charger works great though!

Updated: Seems to be working fine now... I'm not sure what changed, but now my phone wakes up when I drop it on the wireless charger!
 
Last edited:

drewmey

Senior Member
Oct 15, 2012
77
18
A new version (1.2) has been added to the OP, and will be going up on Google Play/Xposed shortly. It adds a "Wake on Charge" option. Enabling this (default behavior) will cause the display to turn on when you start charging your device. Disabling it will cause the display to remain off. There are also Bulgarian translations added to the app, courtesy of mamutcho.

Thanks for getting the Wake on Charge so quickly! Appreciate it!
 

Gu$houn*

Senior Member
Dec 10, 2010
879
430
Prague
Okay, the v1.31 version behaves strange in my case /nexus 4, purity 4/1/, when I turn all off it keeps the LED indication of charging on after I take my phone from the qi, same if the wake on undock is turned on, LED is on and the screen doesn't wake untill I push power button. :(
Nevermind, the main thing - the annoying sound, is gone ...

P.
 

hackel

Senior Member
Sep 14, 2011
127
30
Minneapolis
Thank you for developing this great module! Do you think it would be possible to add an option to automatically unlock the device when removing it from the wireless charger? I know this isn't secure so many people wouldn't want it, but I think it would be great.
 
Last edited:

eldarerathis

Senior Member
Jun 21, 2010
159
316
I've tried this setting on both a Nexus 5 and a Nexus 7 (2013) running the stock ROM, and Wake on Charge doesn't seem to be working. I put my phone on the wireless charger and the screen stays off, even with that setting enabled. Wake On Removing from Wireless Charger works great though!

Updated: Seems to be working fine now... I'm not sure what changed, but now my phone wakes up when I drop it on the wireless charger!


The wake on charge in particular seems a little finicky the first time. Rebooting twice seems to help it stick, as does setting it up in a very particular order. Install/enable => reboot => change settings => reboot again seems to work reliably. I'm not sure why it's so picky at the moment, but after the first little fit it seems to consistently keep working for me. Let me know if you experience any weirdness in subsequent charges, though.

Okay, the v1.31 version behaves strange in my case /nexus 4, purity 4/1/, when I turn all off it keeps the LED indication of charging on after I take my phone from the qi, same if the wake on undock is turned on, LED is on and the screen doesn't wake untill I push power button. :(
Nevermind, the main thing - the annoying sound, is gone ...

P.

That's a little odd. Is the charging LED a stock thing for the Nexus 4, or is it added by your ROM/kernel? I'm using the CM11 charging LED settings on my N5 and it doesn't seem to misbehave at the moment. The coloration that I configured works (red/yellow/green for battery level) and it turns on/off correctly. Are you using any kind of custom LED settings, in your ROM or with something like Lightflow?
 

eldarerathis

Senior Member
Jun 21, 2010
159
316
Thank you for developing this great module! So you think it would be possible to add an option to automatically unlock the device when removing it from the wireless charger? I know this isn't secure so many people wouldn't want it, but I think it would be great.

This actually is something that was thinking about looking in to. Since I generally use the wireless charger overnight, when I pick it up in the morning I usually want to check weather/traffic/etc, so auto-unlock would be convenient (for me, anyway).
 
  • Like
Reactions: hackel

Gu$houn*

Senior Member
Dec 10, 2010
879
430
Prague
That's a little odd. Is the charging LED a stock thing for the Nexus 4, or is it added by your ROM/kernel? I'm using the CM11 charging LED settings on my N5 and it doesn't seem to misbehave at the moment. The coloration that I configured works (red/yellow/green for battery level) and it turns on/off correctly. Are you using any kind of custom LED settings, in your ROM or with something like Lightflow?
My ROM /purity/ has built in LED control but I use Light Manager app to control the colors.
But it's not bothering me, I just would like the wake on undock function to work properly. I will try it again, don't know where the problem could be.:(

P.
[sntfrmnxs4]
 

Gu$houn*

Senior Member
Dec 10, 2010
879
430
Prague
So, I completely uninstall this module and reinstall it /with reboots of course/, did a little research and found out this:
All off - LED persists for cca 5-10s
Wake on - working flawlessly
Undock on - LED persists for cca 10-20s, than the screen wakes
Wake & undock on - LED persist for cca 60-90s, than the screen wakes

//with every setup I did it 3 times, the device was locked by a screen off shortcut, the screen was left to turn off in its own after wake on charge
//also discovered that if I turn the screen on/off after locking by the shortcut, the upcoming LED persistence is cut cca in half
//nexus 4 & purity 4/1 & jolie 2.0.0-4

Don't know, where the problem could be ...

P.
[sntfrmnxs4]
 
  • Like
Reactions: eldarerathis

eldarerathis

Senior Member
Jun 21, 2010
159
316
So, I completely uninstall this module and reinstall it /with reboots of course/, did a little research and found out this:
All off - LED persists for cca 5-10s
Wake on - working flawlessly
Undock on - LED persists for cca 10-20s, than the screen wakes
Wake & undock on - LED persist for cca 60-90s, than the screen wakes

//with every setup I did it 3 times, the device was locked by a screen off shortcut, the screen was left to turn off in its own after wake on charge
//also discovered that if I turn the screen on/off after locking by the shortcut, the upcoming LED persistence is cut cca in half
//nexus 4 & purity 4/1 & jolie 2.0.0-4

Don't know, where the problem could be ...

P.
[sntfrmnxs4]

Hm, okay. Thanks for doing some test cases. I might have to take a look at Purity's frameworks source and see if there's anything particularly different going on (esp. with respect to the LED) that might be causing this weird behavior.
 
  • Like
Reactions: Gu$houn*

Gu$houn*

Senior Member
Dec 10, 2010
879
430
Prague
Hm, okay. Thanks for doing some test cases. I might have to take a look at Purity's frameworks source and see if there's anything particularly different going on (esp. with respect to the LED) that might be causing this weird behavior.
I tried version v1.2 and there the wake options is not working, it keeps waking up no matter if it is checked/unchecked. So I installed back v1.3.1 and using the wake on/undock off setup which works correctly ...
So no need for you to waste your time with research on purity's framework source ... but thanks for your attitude.:good:

P.
 

juston80

Senior Member
Jun 7, 2010
61
6
Hi eldarerathis, it would be convenient but unfortunately the note 3 jb 4.3 does not work (1.3.1) you can make it compatible? thank you very much for the excellent work.
 

zicovsky

Senior Member
Dec 11, 2010
150
15
Guys, this is driving me crazy. My phone gets 100% charged during my sleep and the screen wakes up and lights the entire room, waking me up. Can this module help me disable the notification when fully charged?

I can't believe Samsung let this like this, don't people charge the phone during sleep?
 

lucas.ban

New member
Nov 5, 2012
1
0
Any chance of adding an option to have the device treat the wireless charger as a dock. So that, for example, daydream could be set to activate in dock mode when my device is wirelessly charging on my desk, but not when it is plugged in at night.
 

stephane.rosi

Member
Sep 19, 2011
14
10
Hi!

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?

Thanks!

--
Steph
 

eldarerathis

Senior Member
Jun 21, 2010
159
316
Any chance of adding an option to have the device treat the wireless charger as a dock. So that, for example, daydream could be set to activate in dock mode when my device is wirelessly charging on my desk, but not when it is plugged in at night.

That's an interesting idea. I don't know a whole lot about how devices determine when they're in dock mode, but I could look into it.

Hi!

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?

Thanks!

--
Steph

This is an idea I've actually started playing with a bit, and I'm working to implement. Originally I was looking to make the app always trigger the notifications, regardless of battery level, because it makes it easier to test things (otherwise I have to let my battery run down a bit; it won't trigger above a certain percentage). Ultimately I ended up creating a "notification threshold" concept, where you could define how low your battery level needs to be in order for the notifications to trigger. It's still buggy right now, but once I get it ironed out, you'd be able to set the threshold at, say, 90% so that the little bounces between 98-100 won't fire any of the notifications.

RE: the various people with Samsung devices - I would like to get this working for you, but it might be a bit of a slow process since I don't have readily accessible Samsung devices that support wireless charging. I'll be sure to keep you posted in this thread if I make any good progress, though.
 

Naphthalin

New member
Jan 28, 2014
3
0
RE: the various people with Samsung device - I would like to get this working for you, but it might be a bit of a slow process since I don't have readily accessible Samsung devices that support wireless charging. I'll be sure to keep you posted in this thread if I make any good progress, though.

It would be real nice :), because it did not work on Galaxy S3 with Firmware 4.3 original rooted Rom.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 31
    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).

    Now that Lollipop has rolled out, I am no longer supporting this. I have no way to test it because I don't use Xposed anymore. Sorry. However, I'm working on getting a subset of these settings into the native Android settings instead. Once I've got that down I can post links to the relevant repos here, so that others can cherry pick the changes into their ROMs if desired.

    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:

    1. Play the system's notification sound when you put your device on the charger
    2. Vibrate when you put your device on the charger
    3. Play a custom notification sound instead of the system one
    4. 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.

    Having problems?

    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:

    1. Install the module and activate it in your Xposed Installer
    2. Reboot your device
    3. 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.

    Changelog:
    • 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
    3
    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:

    1. Play the system's notification sound when you put your device on the charger
    2. Vibrate when you put your device on the charger
    3. Play a custom notification sound instead of the system one
    4. 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.

    Having problems?

    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:

    1. Install the module and activate it in your Xposed Installer
    2. Reboot your device
    3. 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.

    Changelog:
    • 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

    "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."

    This statement/stance/business model/free market alone, is worth the donation 10 times over, if i get in a position to need this i hope i have the forsight to remember this great approach.......automatic donation.......plus, nice mod
    3
    View attachment 2511956 I get this notice on 1.3. I rebooted. I even un-installed and re installed. Any suggestions?

    Bah, made a stupid mistake in the code that tries to resolve the name of custom ringtones. It was choking on the URI of the system ringtone. A 1.3.1 build is posted now (here and on the Xposed repo/Google Play) that should fix the issue. I also removed 1.3 from the OP.

    Sorry about that!
    2
    Any chance of adding an option to have the device treat the wireless charger as a dock. So that, for example, daydream could be set to activate in dock mode when my device is wirelessly charging on my desk, but not when it is plugged in at night.

    That's an interesting idea. I don't know a whole lot about how devices determine when they're in dock mode, but I could look into it.

    Hi!

    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?

    Thanks!

    --
    Steph

    This is an idea I've actually started playing with a bit, and I'm working to implement. Originally I was looking to make the app always trigger the notifications, regardless of battery level, because it makes it easier to test things (otherwise I have to let my battery run down a bit; it won't trigger above a certain percentage). Ultimately I ended up creating a "notification threshold" concept, where you could define how low your battery level needs to be in order for the notifications to trigger. It's still buggy right now, but once I get it ironed out, you'd be able to set the threshold at, say, 90% so that the little bounces between 98-100 won't fire any of the notifications.

    RE: the various people with Samsung devices - I would like to get this working for you, but it might be a bit of a slow process since I don't have readily accessible Samsung devices that support wireless charging. I'll be sure to keep you posted in this thread if I make any good progress, though.
    2
    A new version (1.2) has been added to the OP, and will be going up on Google Play/Xposed shortly. It adds a "Wake on Charge" option. Enabling this (default behavior) will cause the display to turn on when you start charging your device. Disabling it will cause the display to remain off. There are also Bulgarian translations added to the app, courtesy of mamutcho.