Skip to content

d3cim/BatteryChargeLimit

 
 

Repository files navigation

BatteryChargeLimit

Source code of the android app that stops charging at a desired level.

For more info: https://forum.xda-developers.com/android/apps-games/root-battery-charge-limit-t3557002

Get it on F-Droid Get it on Google Play

Since version 0.7, the charging limit can be set using Intents. There are two ways for doing so:

  • Using an Intent to Broadcast a message of action "com.slash.batterychargelimit.CHANGE_LIMIT", supplying the percentage by the Intent extra "android.intent.extra.TEXT" (Intent.EXTRA_TEXT). For example in Tasker, the extra could look like android.intent.extra.TEXT:80 to set the limit to 80%. This is technically more clean and therefore recommended!
  • Starting Activity com.slash.batterychargelimit.LimitChangeActivity with a ACTION_SEND intent, using MIME type "text/x-battery-limit" and supplying the percentage as String with Intent extra "android.intent.extra.TEXT" (Intent.EXTRA_TEXT). This will cause the receiving Activity to pop up for a short moment. The Intent should be provided with FLAG_ACTIVITY_NO_HISTORY, otherwise the main activity of this app will become the foreground Activity after sending the Intent.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 100.0%