Project Information
- Repository: https://github.com/MahmoudMabrok/QuranyApp
- Project Name: Qurany App
- My Submitted Issue: here
- My GitHub Account: here
Expected behavior
I expected that I could minimize and maximize the app again while listening to the Ayah.
Actual behavior
When I tried to minimize and maximize the app while listening to the Ayah, then the app crashed.
How to reproduce
Here is every possible detail to reproduce the bug.
- Open the app.
- Go to the "Listen" tab.
- Give the Ayah's number in the start from and end at the field.
- Then click on the "LISTEN" button.
- When the Ayah start to play, minimize and maximize the app and see a crash.
- App version: 2.5.1
- Operating system: Android 6.0.1
Recording Of The Bug
LogCat
07-02 01:30:09.218 27728 27728 E AndroidRuntime: FATAL EXCEPTION: main
07-02 01:30:09.218 27728 27728 E AndroidRuntime: Process: education.mahmoud.quranyapp, PID: 27728
07-02 01:30:09.218 27728 27728 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setEnabled(boolean)' on a null object reference
07-02 01:30:09.218 27728 27728 E AndroidRuntime: at education.mahmoud.quranyapp.feature.listening_activity.ListenFragment$7.onCompletion(Unknown Source)
07-02 01:30:09.218 27728 27728 E AndroidRuntime: at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:3717)
07-02 01:30:09.218 27728 27728 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
07-02 01:30:09.218 27728 27728 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
07-02 01:30:09.218 27728 27728 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7325)
07-02 01:30:09.218 27728 27728 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
07-02 01:30:09.218 27728 27728 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
07-02 01:30:09.218 27728 27728 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)