Hi , I would like to make an application for android which can read out some datas like battery

AnthonyITAnthonyIT ATMember ✭✭

Hi , I would like to make an application for android which can read out some datas like battery level - now I try to update the text view . But I `ve no idea how - sombody pls can help ??

here the source code :

        TextView txt_status = FindViewById<TextView>(Resource.Id.batteryleveltxt_wert);
    var battery = RegisterReceiver(null, filter);
            //level
            int level = battery.GetIntExtra(BatteryManager.ExtraLevel, -1);
            txt_status.Text = level.ToString();

Answers

Sign In or Register to comment.