13

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

Vedprakash Wagh
  • 3,595
  • 3
  • 12
  • 33
Zunayed Arifin
  • 151
  • 1
  • 1
  • 3

2 Answers2

6

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

Community
  • 1
  • 1
tuanvn91
  • 1,159
  • 1
  • 6
  • 8
  • In the question, OP mentioned that he gets `/ViewRootImpl: sendUserActionEvent() returned`. What you are referring too is when ViewRoot is null. – HB. Oct 18 '19 at 07:04
  • This is working for "sendUserActionEvent() returned" as well. It just fixed my problem on Samsung Galaxy Tab S6 with the Samsung Camera Intent. – Dennis Kriechel Sep 30 '20 at 05:02
  • I have added this but still getting this error!!! – StackOverflower Feb 21 '23 at 13:19
0

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

user14678216
  • 2,886
  • 2
  • 16
  • 37
anusha anu
  • 19
  • 6