Comments (2)
Hi. FYI Google rejected my App until I added this code:
On "public class InAppBrowserClient extends WebViewClient":
// Rejected by Google Play - Failed to validate the certificate chain
@Override
public void onReceivedSslError(WebView view, final SslErrorHandler handler, SslError error) {
final AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(webView.getContext(), R.style.AlertDialogCustom));
String message = "SSL Certificate error.";
switch (error.getPrimaryError()) {
case SslError.SSL_NOTYETVALID:
message = "The certificate is not yet valid.";
break;
case SslError.SSL_EXPIRED:
message = "The certificate has expired.";
break;
case SslError.SSL_IDMISMATCH:
message = "Hostname mismatch.";
break;
case SslError.SSL_UNTRUSTED:
message = "The certificate authority is not trusted.";
break;
case SslError.SSL_DATE_INVALID:
message = "The date of the certificate is invalid.";
break;
case SslError.SSL_INVALID:
message = "A generic error occurred.";
break;
case SslError.SSL_MAX_ERROR: /* Deprecated in API level 14*/
message = "The number of different SSL errors.";
break;
}
message += " Do you want to continue anyway?";
builder.setTitle("SSL Certificate Error");
builder.setMessage(message);
builder.setPositiveButton("continuar", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
handler.proceed();
}
});
builder.setNegativeButton("cancelar", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
handler.cancel();
closeDialog();
}
});
final AlertDialog dialog = builder.create();
dialog.show();
}
from cordova-plugin-inappbrowser.
Hi guys,
I'm wondering if anyone has had any further experience with this? I have local area network system that intends to use a phone app as a controller. I require access to the phone's gyro and accelerometer so, as far as I can tell, I need to use https to gain access to this.
Since it's a local area server that the phone is interacting with I need to use a self-signed certificate, and am unable to use a CA for two reasons:
- The app could be used on networks not connected to the internet
- My server IP can change across networks.
The thing I don't understand is that the app works as it should when I load the apk locally (using debug), but when I upload a release to the app store and download it, it doesn't work, and I'm rather given a popup message "The connection the server was unsuccessful".
Has anyone had any similar experience? Or possibly any sort of work around for it? Would help me so much! So far I've sent a message to Google Play Store and hoping to get a response from them as well. Will post here as well once I have feedback.
from cordova-plugin-inappbrowser.
Related Issues (20)
- 6.0.0 Update throws error while archiving iOS project: "'Cordova/CDVWebViewProcessPoolFactory.h' file not found" HOT 1
- "browser.on('loaderror')" does not work properly on iOS.
- executeScript not working in colab HOT 4
- How to build this plugin for node_modules? HOT 2
- Add option to respect/ignore safe area on iOS
- ref.executeScript can't write clipboard HOT 5
- window.open doesnt work inside the opened webview HOT 2
- Warning when submitting to play store - JavaScript Interface Injection HOT 3
- @awesome-cordova-plugins/in-app-browser, this plugin is not sending the device id to azure while login + iOS HOT 3
- Angular 15 webpage not loading correctly in inappbrowser (Android < 11) HOT 1
- Hide Location & toolbar on scroll
- No visible @interface for 'UIApplication' when building an app for iOS HOT 2
- Can't Retrieve HTMLCollection Object HOT 1
- "The certificate authority is not trusted" - Trying to open my server page HOT 1
- beforeload preventing page navigation HOT 1
- Cannot load URL: Frame Load Interrupted being thrown on URL with a 302 redirect HOT 1
- InAppBrowser not fullscreen
- Unable to get events for _system as target HOT 1
- NullPointerException after resume
- beforeload event behaviour difference between android and ios
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-inappbrowser.