akvo / akvo-flow-mobile

Akvo Flow app
GNU General Public License v3.0
18 stars 16 forks source link

Crash when no app to view videos #1729

Closed valllllll2000 closed 2 years ago

valllllll2000 commented 4 years ago

When a user tries to view a video but there are no Video viewing app available (rare but can happen) there is a crash

Reported by Firebase:

Fatal Exception: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=content://org.akvo.flow.fileprovider/videos/b612092e-59c8-4d5a-88e4-ac82d42f4264.mp4 typ=video/mp4 flg=0x1 }
       at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1854)
       at android.app.Instrumentation.execStartActivity(Instrumentation.java:1544)
       at android.app.Activity.startActivityForResult(Activity.java:4391)
       at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java)
       at android.app.Activity.startActivityForResult(Activity.java:4335)
       at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java)
       at android.app.Activity.startActivity(Activity.java:4702)
       at android.app.Activity.startActivity(Activity.java:4670)
       at org.akvo.flow.ui.Navigator.navigateToVideoView(Navigator.java)
       at org.akvo.flow.ui.view.media.video.VideoQuestionView.onVideoViewClicked(VideoQuestionView.java)

Check if there is an app to open video otherwise display a message why video cannot be viewed

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.