E/ViewRootImpl: sendUserActionEvent() returned

Viewed 18608

I have tested my app with other devices. It is working good but when I am installing it on my Samsung Galaxy S8. It is giving me nothing in UI changes but from logcat, I can see /ViewRootImpl: sendUserActionEvent() returned. If anyone knows what is the problem then please share with me the solution TIA

2 Answers

I found a fix for this problem. Unfortunately, on some Samsung devices there is a problem with the built-in camera app that it causes screen rotation which leads to restarting your activity. For that mView becomes null. This happens also with other intents in samsung, not only in the camera. To fix it, you have to add this line in your manifest under your activity:

android:configChanges="orientation|screenSize" Refer here

Check weather your activity is added in manifest file and add i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); while calling another activity.

Related