Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Runtime crash in SimpleChromeCustomTabs #20

Closed
vidhis88 opened this issue Apr 8, 2016 · 1 comment
Closed

Runtime crash in SimpleChromeCustomTabs #20

vidhis88 opened this issue Apr 8, 2016 · 1 comment
Labels

Comments

@vidhis88
Copy link

vidhis88 commented Apr 8, 2016

Caused by android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=Http: pkg=com.android.chrome (has extras) }
    at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1904)
    at android.app.Instrumentation.execStartActivity(Instrumentation.java:1624)
    at android.app.Activity.startActivityForResult(Activity.java:3761)
    at android.app.Activity.startActivity(Activity.java:4028)
    at android.support.customtabs.CustomTabsIntent.launchUrl(CustomTabsIntent.java:163)
    at com.novoda.simplechromecustomtabs.navigation.SimpleChromeCustomTabsWebNavigator.navigateTo(SimpleChromeCustomTabsWebNavigator.java:37)

The line 37 executes when the the connected condition is true for the SimpleChromeCustomTabsWebNavigator class so it is contradictory to not find the activity.
Connection is established in the onResume() and disconnected in onPause() of the base activity.

Crash stats:
Devices affected -
Samsung 59%
HTC 19%
LG 11%
Others 11%

OS -
Lollipop 77%
Marshmallow 18%
Kitkat 4 5%

So pretty much affects all Android devices.

@juankysoriano
Copy link
Contributor

I think there is a problem in your code. Given the stacktrace you are pasting:

 No Activity found to handle Intent { act=android.intent.action.VIEW dat=Http: pkg=com.android.chrome (has extras) }

It seems that you are instructing SimpleChromeCustomTabs to navigate to Http:. Make sure you provide a correct Uri to navigate to.

As an additional note the following code will crash for you with exactly the same stacktrace:

Intent intent = new Intent(Intent.ACTION_VIEW).setData(url);
startActivity(intent);

Where url is your desired Uri, in your example Http:

Closing this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants