Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes when enabling #24

Closed
recallmenot opened this issue Mar 23, 2023 · 17 comments
Closed

App crashes when enabling #24

recallmenot opened this issue Mar 23, 2023 · 17 comments
Assignees
Labels
bug Something isn't working

Comments

@recallmenot
Copy link

On a rooted hotdog (One Plus 7 Pro), when I enable the limit, the app crashes, and from then on every time I want to open it.
Have to reinstall it from fdroid to be able to open it again.
Latest crdroid (android 13).
https://paste.crdroid.net/qWWbKG

@recallmenot
Copy link
Author

recallmenot commented Mar 23, 2023

repeated the experiment with the second file from: #21, existence verified with TotalCommander
same result: https://paste.crdroid.net/irDvbO

@Kelvino9
Copy link

Kelvino9 commented Jun 9, 2023

Same issue on OnePlus 8T with Android 13 (LineageOS 20)

@lord-ne
Copy link

lord-ne commented Jun 14, 2023

I got the same issue when installing from the release in this repo, but I didn't get it when compiling from source

@upbox-org
Copy link

upbox-org commented Jun 18, 2023

I have the same problem, probably related.
Android 13 (CalyxOS) Pixel 7 Pro, Magisk 26.1 Zygisk
Error:
java.lang.IllegalArgumentException: io.github.muntashirakon.bcl: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. at android.app.PendingIntent.checkFlags(PendingIntent.java:401) at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:671) at android.app.PendingIntent.getBroadcast(PendingIntent.java:658) at io.github.muntashirakon.bcl.EnableWidget.buildButtonPendingIntent(EnableWidget.kt:2) at io.github.muntashirakon.bcl.EnableWidget.updateWidget(EnableWidget.kt:3) at io.github.muntashirakon.bcl.activities.MainFragment$$ExternalSyntheticLambda3.onCheckedChanged(Unknown Source:21) at android.widget.CompoundButton.setChecked(CompoundButton.java:222) at androidx.appcompat.widget.SwitchCompat.setChecked(SwitchCompat.java:1) at androidx.appcompat.widget.SwitchCompat.toggle(SwitchCompat.java:1) at android.widget.CompoundButton.performClick(CompoundButton.java:144) at android.view.View.performClickInternal(View.java:7483) at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0) at android.view.View$PerformClick.run(View.java:29357) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7884) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

@shuvashish76
Copy link

shuvashish76 commented Sep 22, 2023

Also crashing for Android 12, if you turn on "Enable charge limit option". After that it crashing just by clicking the app icon from launcher.
App version : 1.0.0

Logs

FATAL EXCEPTION: main
Process: io.github.muntashirakon.bcl, PID: 32235
java.lang.IllegalArgumentException: io.github.muntashirakon.bcl: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
	at android.app.PendingIntent.checkFlags(PendingIntent.java:377)
	at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:647)
	at android.app.PendingIntent.getBroadcast(PendingIntent.java:634)
	at io.github.muntashirakon.bcl.EnableWidget.buildButtonPendingIntent(EnableWidget.kt:2)
	at io.github.muntashirakon.bcl.EnableWidget.updateWidget(EnableWidget.kt:3)
	at io.github.muntashirakon.bcl.activities.MainFragment$$ExternalSyntheticLambda3.onCheckedChanged(Unknown Source:21)
	at android.widget.CompoundButton.setChecked(CompoundButton.java:222)
	at androidx.appcompat.widget.SwitchCompat.setChecked(SwitchCompat.java:1)
	at io.github.muntashirakon.bcl.activities.MainFragment.onStart(MainFragment.kt:3)
	at androidx.fragment.app.FragmentStateManager.start(FragmentStateManager.java:8)
	at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:11)
	at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:73)
	at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:5)
	at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:22)
	at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:1)
	at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1457)
	at android.app.Activity.performStart(Activity.java:8259)
	at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3776)
	at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
	at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2311)
	at android.os.Handler.dispatchMessage(Handler.java:111)
	at android.os.Looper.loopOnce(Looper.java:238)
	at android.os.Looper.loop(Looper.java:357)
	at android.app.ActivityThread.main(ActivityThread.java:8090)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)

@huychiendev
Copy link

it also doesn't work with Xiaomi note 11 MIUI 14 android 13
But with miui 14 android 12 still works

Looking forward to having it fixed

@MuntashirAkon
Copy link
Owner

Sorry, I quite forgot about the issue. I'll publish a new release in the next week if I'm available.

@ford--prefect
Copy link

Same problem still persisting - whats the status of the new release?

@MuntashirAkon
Copy link
Owner

Unfortunately, I've become too busy to make any open source contribution this month. I'll see if I can do it in the weekend.

@ford--prefect
Copy link

I don't want to be a pest but the month (and hopefully your stressful time) has past. Any prospect to get a release done? Thanks and don't feel pressed, please.

@hapklaar
Copy link

Does anyone have a working apk? @lord-ne you say you fixed it by compiling yourself. Could you maybe share your apk?

@varad-kadam
Copy link

Facing the same issue.
Pixel 7, A14, Stock ROM

Is there any update?

@hapklaar
Copy link

Facing the same issue. Pixel 7, A14, Stock ROM

Is there any update?

I had great success on my old Samsung tablet with this app: https://github.com/sriharshaarangi/BatteryChargeLimit. Might want to try that.

@varad-kadam
Copy link

I had great success on my old Samsung tablet with this app: https://github.com/sriharshaarangi/BatteryChargeLimit. Might want to try that.

I believe this app is forked from the same and ment to be an update.
However, I'll try it out as well, fingers crossed there are no issues.

@recallmenot
Copy link
Author

for anyone interested:

AccA works for me.

https://github.com/MatteCarra/AccA

https://f-droid.org/en/packages/mattecarra.accapp/

@MuntashirAkon MuntashirAkon added the bug Something isn't working label Mar 9, 2024
@MuntashirAkon MuntashirAkon self-assigned this Mar 9, 2024
@MuntashirAkon
Copy link
Owner

Fixed in ea9cdc0

@theotheroracle
Copy link

yippee !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests