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

Search This thread

babyshanks

Senior Member
Oct 28, 2013
295
105
Minneapolis
Thanks for this. The one feature I would absolutely love is the ability to disable screen on when placed on pad.

Sent from my SM-N900T using XDA Premium 4 mobile app
 
  • Like
Reactions: Gu$houn*

dtreth

Senior Member
Dec 12, 2013
59
20
OK so I setup the logs, put it on the charger, and it vibrated. I guess it needed a second restart, but it works just fine now.

Thanks for the great utility.
 

kalowski

New member
Mar 7, 2008
2
0
Hallo
I have installed the wireless charging from hier.but it plays no sound.i have note3 rooted with stockrom.mfg
 

eldarerathis

Senior Member
Jun 21, 2010
159
316
Hallo
I have installed the wireless charging from hier.but it plays no sound.i have note3 rooted with stockrom.mfg

Is there any information in the Xposed logs? Launch the Xposed framework installer, then go to the "Logs" item on the main page to view them.

It's possible that Samsung have made changes to their framework code that cause the hooks to fail, but I don't have a TouchWiz device to test on, unfortunately. Examining the logs might help provide some insight into whether of not that is indeed causing the problem you're having.
 

punishit

Member
Jun 20, 2012
13
4
Also didn't work with Galaxy S4.
Nothing changed, still popup dialog, screen wakes up and plays sound or vibrate.

In the Log there is I think nothing special:

08.01.2014 17:23:04 UTC
Loading Xposed v42 (for com.android.commands.am.Am)...
Loading modules from /data/app/com.eldarerathis.xposedmodule.wirelesschargingxposed-1.apk
Loading class com.eldarerathis.xposedmodule.wirelesschargingxposed.WirelessChargingXposed
 

drewmey

Senior Member
Oct 15, 2012
77
18
I second this one...

Thanks for this. The one feature I would absolutely love is the ability to disable screen on when placed on pad.

Sent from my SM-N900T using XDA Premium 4 mobile app

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.
 

eldarerathis

Senior Member
Jun 21, 2010
159
316
Thanks for this. The one feature I would absolutely love is the ability to disable screen on when placed on pad.

Sent from my SM-N900T using XDA Premium 4 mobile app

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 :(
 

drewmey

Senior Member
Oct 15, 2012
77
18
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 :(

If the Wake on Plug setting is available in some sort of other MOD/Module, I won't ask you to go through that trouble. Hadn't heard of it because I am just running an old version of LiquidSmooth on my Samsung GS3. Thanks for looking into it. Either way, it would make a great addition to the module.
 

mistermojorizin

Senior Member
Dec 21, 2011
853
188
Google Pixel 5
it doesn't work for me on the droid maxx. I can add a vibration, and i can even add my own custom sound to be played when wirelessly chargin, but i can't get rid of the stock sound. In fact the custom sound plays at the same time as the stock sound, lol. No way to mute the wireless charging sound tho.
 

sgp77

Senior Member
Aug 25, 2012
66
14
I noticed the clipping and some other aberrations on CM without any kind of Xposed modifications, so I'm wondering if it's something in the system that's causing it. I'm hoping that's not it, but if it is then I'm not sure if I can fix it :(
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.
 

eldarerathis

Senior Member
Jun 21, 2010
159
316
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.
 

Lanhoj

Member
Jul 26, 2011
39
17
Can you please add a "Wake on discharge" option?
So if the screen is off & I remove it from the wireless charger it can wake the screen automatically.

Thanks.
 

CatsAreGods

Senior Member
Nov 26, 2012
202
64
Rescue
Just decided to try this, running Franco kernel on Nexus 4 with a few other Xposed modules. After reboot, this crashes (1.3) as soon as I select it. Refused to install V1.2 at all. Mystified...

Sent from my Nexus 4 using Tapatalk

---------- Post added at 05:46 PM ---------- Previous post was at 04:53 PM ----------

Following up my own post...

Uninstalled 1.3, then 1.2 installed just fine and worked! Cosmic rays?

Sent from my Nexus 4 using Tapatalk
 

s_special

Senior Member
Mar 12, 2011
473
67
This is in now, and is listed as "Wake on Undock". Grab version 1.3 and give it a try!

The OP has been updated with the new version.

uploadfromtaptalk1389579453093.jpg I get this notice on 1.3. I rebooted. I even un-installed and re installed. Any suggestions?
 

eldarerathis

Senior Member
Jun 21, 2010
159
316
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!
 

CatsAreGods

Senior Member
Nov 26, 2012
202
64
Rescue
1.31 isn't crashing, but I'm not getting the notification sound or screen waking up either.

Sent from my Nexus 4 using Tapatalk

---------- Post added at 08:51 PM ---------- Previous post was at 08:10 PM ----------

1.31 isn't crashing, but I'm not getting the notification sound or screen waking up either.

Sent from my Nexus 4 using Tapatalk

...consistently, anyway. It just worked, go figure. :)

Sent from my Nexus 4 using Tapatalk
 

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.