0

In navigation graph, i have an Activity(MainActivity) which contains 4 fragments. I navigate that fragments using bottomnavigation view through NAV Graph(JetPack Navigation). I need to play video using Exo Player. So for that reason. i take a fragment which contains recyclerview of videolist. when i pass the intent from VideoListAdapter Class like

             Intent intent=new Intent(context,PlayVideo.class);
             context.startActivity(intent);

for playing full screen video in PlayVideo Actvity

it shows me error of marshal value, & parcel.write.os() , so what have to do?...Please help me.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • You could use another fragment and hide the bottomnavigation, or use a fullscreen fragment – cmak Feb 01 '22 at 05:10
  • It's very difficult to debug a crash without a stack trace. See [Unfortunately MyApp has stopped. How can I solve this?](/q/23353173) for Android-specific advice, and [What is a stack trace, and how can I use it to debug my application errors?](/q/3988788) for advice on what to do once you have the stack trace. If you still need help, edit your question to include the **complete stack trace**, as well as **which line of your code** the stack trace points to. – Ryan M Feb 09 '22 at 22:18

1 Answers1

0

Since you are using navigation component in your app I suggest that you should use fragments instead of Activity.

A quick fix for your problem would be to hide the bottom navigation view. You can access your bottom navigation using:

BottomNavigationView navBar = getActivity().findViewById(R.id.bottomBar);
REX
  • 139
  • 1
  • 8