Android app crashed on Samsung devices after changing font style

I have an application problem, when I tried to change the device font (Samsung Galaxy Tab3), my application worked. In this scenario, the application is running in the background while performing operations to change the font.

Steps: - launch the app - open device settings using the status bar - change the font style of the device - return to the app using recent apps - crash

I have tried to test this scenario on other devices and cannot reproduce it. My app crashed only on samsung device and only when system font style changes.

Please help me find the cause of the crash.

Thanks for the advanced one.

here, I attached the log crash:
07-22 12:26:09.359: E/AndroidRuntime(8110): FATAL EXCEPTION: main
07-22 12:26:09.359: E/AndroidRuntime(8110): java.lang.NullPointerException
07-22 12:26:09.359: E/AndroidRuntime(8110):     at com.acs.nomad.app.widget.h.a(Unknown Source)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at com.acs.nomad.app.b.ap.m(Unknown Source)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at com.acs.nomad.app.d.v.onPause(Unknown Source)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:890)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at android.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1129)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at android.app.BackStackRecord.popFromBackStack(BackStackRecord.java:662)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at android.app.FragmentManagerImpl.popBackStackState(FragmentManager.java:1450)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at android.app.FragmentManagerImpl$2.run(FragmentManager.java:444)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1401)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at android.app.FragmentManagerImpl$1.run(FragmentManager.java:426)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at android.os.Handler.handleCallback(Handler.java:615)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at android.os.Handler.dispatchMessage(Handler.java:92)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at android.os.Looper.loop(Looper.java:137)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at android.app.ActivityThread.main(ActivityThread.java:4949)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at java.lang.reflect.Method.invokeNative(Native Method)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at java.lang.reflect.Method.invoke(Method.java:511)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1043)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:810)
07-22 12:26:09.359: E/AndroidRuntime(8110):     at dalvik.system.NativeStart.main(Native Method)

      

+3


source to share


1 answer


Android Android does not have change device font style

It should be a Samsung TouchWiz thing. Perhaps you should check out the dedicated SDKs from Samsung.



But if I were you, I would listen to the font style change through the broadcast receiver. Find out which broadcast to listen to with the Broadcast Monitor app from Google Play.

And then I would swallow the nullpointer exception and I would restart the Activity every time it happened. I realize this is a radical move, but until you know how the font style throws a nullpointer exception, this is probably the only work around.

0


source







All Articles