Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view the battery usage settings in android?

Tags:

android

I want to view battery usage setting through application settings->about phone->Battery use

How to view this through application please help me

like image 387
tamil Avatar asked Dec 12 '22 11:12

tamil


2 Answers

To show power usage information to the user, you can start activity using Intent.ACTION_POWER_USAGE_SUMMARY

Intent intentBatteryUsage = new Intent(Intent.ACTION_POWER_USAGE_SUMMARY);        
    startActivity(intentBatteryUsage);
like image 124
Sandy Avatar answered Jan 12 '23 05:01

Sandy


@Tamil, to turn on/off Bluetooth, first u have to make object("mBTadapter") of bluetoothAdapter class, then call

mBTAdapter.enable();

or

mBTAdapter.disable();

programetically,,

like image 21
Abdul Wahab Avatar answered Jan 12 '23 07:01

Abdul Wahab