Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Commit

Permalink
Feat: Added intent for ACTION_POWER_USAGE_SUMMARY (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuragkanojiya1 authored May 11, 2024
1 parent 5259f66 commit a19cf8b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ class BatteryReceiver : BroadcastReceiver() {

val textView = (contextBattery)?.findViewById<TextView>(R.id.batteryText)
textView?.text = "$batteryLevel%"

textView?.setOnClickListener {
val powerUsageIntent = Intent(Intent.ACTION_POWER_USAGE_SUMMARY)
context.startActivity(powerUsageIntent)
}
}
}

0 comments on commit a19cf8b

Please sign in to comment.