My app is crashing on some devices with an error android.content.ActivityNotFoundException. After looking up in Android Vitals Crashes section, the following function is causing it to crash:
private void openUrl(String url) {
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
}
It is an intent to open play store page of my app with url as my play store app link. I couldn't able to reproduce the crash in any of my devices. Any help will be appreciated.