question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getBatteryState: java.lang.IllegalArgumentException

See original GitHub issue

version: 1.2.5

java.lang.IllegalArgumentException: 
  at android.app.ContextImpl.registerReceiverInternal (ContextImpl.java:1838)
  at android.app.ContextImpl.registerReceiver (ContextImpl.java:1794)
  at android.app.ContextImpl.registerReceiver (ContextImpl.java:1788)
  at android.content.ContextWrapper.registerReceiver (ContextWrapper.java:489)
  at com.evernote.android.job.util.Device.getBatteryStatus (Device.java:55)

Ref: https://github.com/nextcloud/android/issues/2645

As this is from google play console, we do not have any further informations 😕

We are calling this in 2 classes:

  • UploadFileOperation which extends at top most a Runnable
  • FileUploader which extends at top most a Service

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
vRallevcommented, Jun 11, 2018

Yes, please don’t use internal classes.

0reactions
tobiasKaminskycommented, Jun 11, 2018

As Device.getBatteryStatus() is now restricted, do you suggest to use the official android check instead?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Caused by: java.lang.IllegalArgumentException - Stack Overflow
IllegalArgumentException : No view found because it is getting crash before returning the view to the fragment. Intent intent = getActivity().
Read more >
core/java/android/hardware/input/InputManager.java
import java.lang.annotation. ... throw new IllegalArgumentException("descriptor must not be null."); ... public int getBatteryStatus(int deviceId) {.
Read more >
InputManagerService.java - Android Code Search
throw new IllegalStateException("Injection should not result in TARGET_MISMATCH". + " when it is not targeted into to a specific uid.");.
Read more >
ArrowOS/android_frameworks_base - Gitiles
IllegalArgumentException ; method public android.media. ... Builder setBufferSizeInBytes(int) throws java.lang. ... getBatteryStatus() == BatteryManager.
Read more >
Error "java.lang.IllegalArgumentException: Could not extract ...
Error "java.lang.IllegalArgumentException: Could not extract threshold value for the specified model with goal" is reported when generating a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found