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

Commit

Permalink
Added intent for ACTION_POWER_USAGE_SUMMARY
Browse files Browse the repository at this point in the history
  • Loading branch information
anuragkanojiya1 committed May 11, 2024
1 parent 5259f66 commit 9dd03cd
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 9dd03cd

Please sign in to comment.