Open SzymonDe opened 6 years ago
source code did not check or catch the exception.
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(urlString)); context.startActivity(browserIntent);
i have the same problem too. do you think this is related to no browser is installed on the phone ??
there are so many problems and it seems that the google developer is not working since monday.. we got this sdk 2 days before ultimum and we have so many problems :( :( :(
The stack is not relate to ActiviyNotFoundException. But the source code still have some bugs.So I customized the code. :). I think it's worth to do it for now.
Hi. I was able to fix the problem using try-catch statement in ConsentForm.java.
private void handleOpenBrowser(String urlString) {
if (TextUtils.isEmpty(urlString)) {
listener.onConsentFormError("No valid URL for browser navigation.");
return;
}
try {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(urlString));
context.startActivity(browserIntent);
} catch (Exception e) {
Toast.makeText(context, "Can not open the link. Visit: " + urlString, Toast.LENGTH_LONG).show();
}
}
I add also try-catch in my app source.
try {
consentForm.show();
} catch (Exception e) {
// ...........
}
These changes allowed me to reduce "tgkill" crasches to 0.
Regards Szymon Dyja
Hi SzymonDe maybe your solution is not bad but then the consent form will never load on theses devices to get consent :(
Hi i have still the same problem and crashes ! now on Sony Xperia X Compact (F5321), 3072MB RAM, Android 8.0
Is no one from google developers here willing to take a look at this problem ? Almost one week now nothing happened anymore here.
where is a solution ?
@SnnYsf I think it's fixed in the latest update
Hi.
After adding the Consent SDK, the application displays errors in the Google Play console. Errors occur in about 2 per 1000 updates and apply only to European users.
I was able to make a similar error when I turned off the browser in my device. Then, after clicking the link to the Privacy policy (Google Partners or own link) in Consent Form, an error occurred.
I wonder if the Constent SDK should not check if the user has a web browser installed..
The error snapshots look like:
I added the Google Analytics tracking code to onConsentFormError(String errorDescription) and caught the following errors:
The error occurs regardless of the android version and the brand of the device.
I will be grateful for suggestions and information if someone has a similar problem.
Regards Szymon