Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

E/ViewRootImpl: sendUserActionEvent() returned

Tags:

android

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

like image 822
Zunayed Arifin Avatar asked Jun 06 '19 11:06

Zunayed Arifin


1 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

like image 95
tuanvn91 Avatar answered Nov 09 '22 19:11

tuanvn91