Questions tagged [battery]

A battery is a portable electrical power source which is often used in mobile devices.

battery
Filter by
Sorted by
Tagged with
-1 votes
0 answers
10 views

The battery model cannot be queried by running the upower -d command

When I typed upower -d, it printed Device: /org/freedesktop/UPower/devices/battery_Battery native-path: Battery power supply: yes updated: 2021年01月01日 星期五 00时00分44秒 (8 ...
user24345420's user avatar
0 votes
0 answers
17 views

How to access battery usage information of other apps/processes in Android?

I am writing an application in android studio, similar to a task manager, where you can choose a different running application, and you will get how much of the battery is being currently used by that ...
Alexi124's user avatar
0 votes
0 answers
22 views

Turning location services on and off a few times a day drains the battery more than keeping location services on?

I am trying to implement a power saving app for Android and I can't figure out if turning on and off location services periodically, a few times a day, not very often, is worse for the battery than ...
Teodora Grecu's user avatar
0 votes
0 answers
21 views

How to get MetricKit SignPost Metrics data formulated into battery usage % for feature wise usage in iOS app?

I am trying to access feature-wise battery usage in my app. For this I used MetricKit and put signposts at start and end of a flow of feature. I got one of the payloads like this: { "...
Gaurav Mishra's user avatar
-2 votes
1 answer
45 views

How to programatically set time of latest full charge on Android?

How, if at all, is it possible to manually alter the timestamp of latest full battery charge a system call on Android? How does the adb command alter the value?
David Jonsson's user avatar
-3 votes
1 answer
72 views

Android Studio, Linux Laptop and High Power Usage of Specific USB Devices

I'm new to Linux and could use a clue stick to track down why the battery usage of my laptop goes up when Android Studio (AS) is running. I know Android Studio uses more of the processor and memory ...
Bink's user avatar
  • 2,127
1 vote
1 answer
71 views

How do bluetooth speakers / headsets / devices exchange battery level information? (especially with an Android device)

I'm trying to implement a Bluetooth battery monitoring tool on Linux but there is absolutely no information regarding which protocols are used by manufacturers to send the battery level of a device to ...
Dennis Orlando's user avatar
0 votes
0 answers
50 views

Bring Rechargeable Li-ion battery to shipping mode by using TI library

Search for the right SMBus command, word to write and target address, in order to bring the rechargeable Li-ion battery to shipping mode by using TI (Texas Instruments) library. The following VB code ...
cnm's user avatar
  • 113
0 votes
0 answers
21 views

Error occurs regarding thermal modelling of a cylindrical lithium ion battery in 3D in COMSOL Multiphysics

After running the application in the library and replace the cathode material with another material, following error occurs. Undefined variable. Variable: comp1.liion.cs Geometry: geom1 Domain: 3 ...
dasuni hewawasam's user avatar
3 votes
1 answer
69 views

Battery State of Charge (SOC) updating in Gekko

I am trying to model the battery charging/discharging process with optimization program in Gekko. I used the following energy balance equation for the model: Renewable power [t] - (charge[t] + surplus[...
Reza_nadimi's user avatar
0 votes
0 answers
67 views

zVirtualBattery CLSID

I am trying to install a simulated battery, but I first tried to install the program in Windows 8 and it gave an error while installing WDTF. I changed my computer to Windows 11 and now when I try to ...
Interception's user avatar
0 votes
0 answers
24 views

how to measure the battery usage for android process running in shell

I need to calculate the power consumption of running an artificial intelligence model on a mobile phone. I can currently only do this by running run.sh in the shell or put it into an application. I'm ...
Winnietheking's user avatar
0 votes
1 answer
73 views

Implementation of Battery in Android Emulators Under Maui

Is there a setting or permission missing? When we execute the code if (Battery.Default.PowerSource == BatteryPowerSource.Battery) the thread in which it is running vanishes and does not throw an ...
DumbestGuyOnSaturn's user avatar
0 votes
2 answers
124 views

How to detect If a digital pin is blinking (from high to low) in C?

I am writing a firmware application. I must read a GPIO pin connected to a smart battery, which communicates the state of the battery. A high value in the pin means the battery is in an unknow state, ...
cercio's user avatar
  • 77
0 votes
1 answer
912 views

Powering an Esp32 Project with USB-C and a Lithium Ion Battery

I have the Aitrip Esp32 Lite (see attached pinout image below). Here's what I am wondering - the devboard has an on board charging receptacle (JST) for a lithium ion battery. Using the devboard's on-...
zebetz's user avatar
  • 27
0 votes
1 answer
203 views

Issue with Pybamm Tutorial

I am going through the PYbamm tutorial of setting parametres from the official site. parameter_values["Current function [A]"] = 10 parameter_values["Open-circuit voltage at 100% SOC [V]&...
VikramVaidyanathan Triple V Ve's user avatar
0 votes
0 answers
41 views

Firemonkey Android App for GPS location crashes shortly after location update

I have an Android app written in Firemonkey (Delphi 11.1) that requires the GPS accuracy to be logged as well. I managed to get the GPS information from Android using the AndroidAPI.JNI ...
Andre Coetzer's user avatar
0 votes
0 answers
43 views

Battery Storage modelling for a data centre

I am trying to build an optimisation model (minimise costs) to procure electricity on an hourly basis to a data centre using wind,solar,grid and battery storage with an objective to achieve a certain ...
Charles's user avatar
0 votes
0 answers
24 views

Broadcast receiver in Android Studio

How to solve this on Android Studio in Java Language? You have to make two applications that: The First app is broadcast receiver The second app is twit broadcast app And you should show us: broadcast ...
Reem Abdl's user avatar
1 vote
1 answer
136 views

How to more accurately calculate a LiFePO4 12.8V battery percentage?

Grafana Data static const uint8_t lifepo4[NUM_BATT_READINGS][2] = { {144, 100}, {136, 100}, {134, 99}, {133, 90}, {132, 70}, {131, 40}, {130, 30}, {129, 20}, {128, 17}, {125, 14}, {120, ...
Jdelmore's user avatar
0 votes
0 answers
72 views

How to implement pyomo constraints using logical checks of pyomo model variables?

EDIT: The block of code below is working now, I may have missed something in my IDE, but I am having issues with other similar constraints. I believe the problem is using endogenous if statements, but ...
masebee's user avatar
  • 25
0 votes
0 answers
70 views

Battery Runtime Remaining Expression in Zabbix

I'm using this expression in a trigger in Zabbix to shutdown a server when the battery runtime remaining is less than 15 minutes: last(/xxxx UPS 3000 SNMP/battery.runtime_remaining[...
Joel Delgado Garrido's user avatar
0 votes
0 answers
44 views

is there support for a home battery on google home. Enable triggers for starting devices when home battery is full

i want to develop a smart home application linking my home battery (coupled to solar panels) to Google Home. This would allow for efficient use of the solar energy by activating certain devices or ...
kdd's user avatar
  • 656
1 vote
1 answer
70 views

Read "time to fully charged"

I am testing several laptops with Windows installed and I need to write code that takes the time (in seconds or minutes) "until fully charged" - the value that windows shows, as well as the ...
Boris Tashev's user avatar
0 votes
0 answers
40 views

I want to get battery stats of usage of every hour of 24 hour. how can it get it?

I have implemented workmanager , alarm manager and job scheduler also to get the battery level after every hour. but most of the android mobiles devices restrict the all of them to work continuesly . ...
Waqas Yousaf's user avatar
-1 votes
1 answer
209 views

How to Get current charge percentage in decimal in java for android [duplicate]

I need to get the current charge percentage in decimal values like -> 50.3,20.4,etc... Is there any way to do the same in android with Kotlin/Java. Anyone Please help me with this. Algorithm / Code ...
Krithick's user avatar
0 votes
1 answer
39 views

Removing the batteries from the remote kills the app

If the remote control uses bluetooth control, then if the battery is removed / inserted into the remote control, the following events occur: onPause() -> onSaveInstanceState() -> onCreate() ->...
Dmitriy's user avatar
  • 425
1 vote
0 answers
119 views

How to get BATTERY_PROPERTY_CHARGE_COUNTER on api 21 Android

Why does getIntProperty return zero on the api device 21 val batteryManager = context.getSystemService(Context.BATTERY_SERVICE) as BatteryManager val BatteryCapacity = batteryManager.getIntProperty(...
Arman's user avatar
  • 35
1 vote
1 answer
276 views

Sample code from bq769x0 arduino library does not compile

I try to use arduino library from github: https://github.com/LibreSolar/bq769x0-arduino-library/blob/master/bq769x0.h but it doesn't even compile. Error is connected with : #if BQ769X0_DEBUG void ...
Wiktor Łuczak's user avatar
0 votes
0 answers
78 views

Does StartMonitoringSignificantLocationChanges works in Low Power Mode

I want to add StartmonitoringSignificantLocationChanges in my app, but does it work in low power mode? Apple's documentation says that the background activity will turn off, does this apply to ...
Empiric10's user avatar
4 votes
1 answer
1k views

How to create a Battery Badge that shows current Battery Level in SwiftUI

What I want to do is almost identical to the badge on MacOS and iOS devices I tried to use SFSymbols for this but it only supports %0, %25, %50, %75 and %100 but I want to update my battery badge to ...
user avatar
-1 votes
1 answer
36 views

how to drawText transparent with background Path in Canvas Drawable?

how to drawText transparent with background Path in Canvas Drawable? https://i.stack.imgur.com/RkS41.jpg
user20269297's user avatar
-1 votes
1 answer
278 views

Read battery consumption in linux

I would like to monitor my system current Watt usage. The tricky part is that I have 2 batteries (BAT0 and BAT1). I know that I can read the current power of BAT1 from this file: sys/class/...
GooDinosaur's user avatar
4 votes
0 answers
329 views

Measure battery usage for iOS from Xcode 14

There is a Energy Profile in Xcode 12. But can't see this any more in Xcode 14. And even more, it's always showing Insufficient Metrics Data for our 5k users app in Xcode organizer. I'm wondering what ...
Bagusflyer's user avatar
  • 12.8k
3 votes
0 answers
219 views

What should I use instead of navigator.getBattery()

I am looking for a navigator.getBattery() alternative. What I want to achieve is, that when you have under 30% of battery and you're not charging, it tells you to go charge. Right now I have this: ...
thisistemporary's user avatar
0 votes
1 answer
716 views

Uncaught TypeError: navigator.getBattery is not a function

I'm developping a website which is meant to be used on mobile devices using Google Chrome, the purpose is to list information such as time (hh:mm) and battery level. I saw the Battery Web API but I'm ...
AlexandreLemoine's user avatar
-1 votes
1 answer
229 views

Is it possible to get value for current battery level via ADB shell command?

With the below adb command I am able to get current battery level(as shown in image. adb shell dumpsys battery | findstr /r /c:level I am getting response as level: 12 Is there any way to get only ...
Shoaib Akhtar's user avatar
0 votes
1 answer
2k views

Is it possible to fetch current battery level via ADB shell command?

Suppose If change the battery level to any desired value(say from current 50 to 20) adb shell dumpsys battery set level 20 Now I want adb command to fetch the current battery level(ie 20). With the ...
Shoaib Akhtar's user avatar
0 votes
1 answer
54 views

How to measure Battery Drainage Ratio?

I were using some of foreground service continuously in background and also was tracking location in background. Now I have reduced it depending on some of time frame logic, but I want to know how ...
Rujul Gandhi's user avatar
  • 1,350
1 vote
1 answer
83 views

VB.NET : Battery percentage code isn't updated in real-time

I made a program with Visual Studio to display battery percentage using a Label and ProgressBar, the problem I had is that the battery percentage isn't updated in real time although I already put ...
Fabieen Rae's user avatar
1 vote
1 answer
85 views

Information about the time remaining won't appear. Why?

The HTML5 Battery Status API (Remake, code shown below) has a problem. The time left (until the battery runs out) is not showing up. I tried copying the JavaScript from the original project on CodePen....
Christian Samu's user avatar
0 votes
1 answer
451 views

Battery management using MATLAB Simulink and Stateflow

I am designing a battery model and its control to undergo cyclic charge and discharge. The battery model is created by using a simscape electrical battery block (Table-based). The control is modeled ...
Joshni's user avatar
  • 3
4 votes
0 answers
207 views

Battery optimization not available on WearOS

I'm developing a tracking application that runs on Wear OS watches. I have some troubles when the watch goes to sleep. As soon as the watch goes to Deep Idle mode, all sensors acquisition stops. For ...
Loïc Zimmermann's user avatar
0 votes
1 answer
771 views

How to completely prevent Android Lock Screen

I made an field guide app for biology. It does tons of stuff, for example, recordings of wildlife sounds, and it is made to run the whole day with a single battery charge. Since it is intended to be ...
Luis A. Florit's user avatar
0 votes
1 answer
406 views

How to accurately estimate the time remaining in a PC/Laptop battery?

I am making a C++ program on Windows in Visual Studio 2017. I want this program to calculate how long the battery will last on the laptop/PC the program is running on. I want to make this program ...
coolbean4's user avatar
0 votes
1 answer
474 views

Turn off App-Info Battery Optimization from Kotlin

I am running an app which needs to run a service in the background using IMU (accelerometer and gyroscope data) in the background, while the app is in background and the screen is off. After sometime, ...
Sanskar Biswal's user avatar
0 votes
1 answer
118 views

How hard is it to control laptop's battery charge or to limit? [closed]

I wonder if it is possible to write a program which would limit the battery charge of a laptop. I know some manufacturers like Asus, Lenovo etc. have such build-in software, but I am curious if anyone ...
Svetoslav Stoyanov's user avatar
0 votes
1 answer
2k views

How to persistently get Battery level and Charging status in Android (Kotlin)?

I want to get the battery level and charging status(plugged or unplugged) persistently for my app, i.e every 3-4 seconds, or better, only when it changes. Currently I am doing this:         val bm = ...
coderGtm's user avatar
  • 101
0 votes
2 answers
347 views

What is the correct way to set a standby interval for an Android App?

I'm maintaining an app that is used by several companies, each of them with their own devices. One of them bought new tablets (Samsung A8 LTE with Android 11) and they started to have some problems. ...
Antonio P.'s user avatar
1 vote
0 answers
210 views

Android. Show notification in exact time

I have a question, that has been asked here many times, but I still can't find correct solution. I need to implement in an app a feature, that will show notification in exact time (for example, show ...
Lim's user avatar
  • 11

1
2 3 4 5
18