Hey there, it's Saad from 🇧🇩
I write stupid codes to build simple products that solve complex problems. You can find me on:
💬 Drop a mail: [email protected]
Quick Starter Android Boilerplate for Easy bKash Integration
Home Page: https://saadaakash.github.io/bKashQuickStarterAndroid/
Hey there, it's Saad from 🇧🇩
I write stupid codes to build simple products that solve complex problems. You can find me on:
💬 Drop a mail: [email protected]
You need to update WebViewClient interface to handle SSLError.
Otherwise, you will get Alert from google play store after publishing the app. You can try this bunch of code to handle
bkashWebView.webViewClient = object : WebViewClient() {
override fun onReceivedSslError(view: WebView?, handler: SslErrorHandler, error: SslError?) {
val builder = AlertDialog.Builder(context!!)
val message = when (error?.primaryError) {
SSL_UNTRUSTED -> "The certificate authority is not trusted."
SSL_EXPIRED -> "The certificate has expired."
SSL_IDMISMATCH -> "The certificate Hostname mismatch."
SSL_NOTYETVALID -> "The certificate is not yet valid."
SSL_DATE_INVALID -> "The date of the certificate is invalid"
else -> "A generic error occurred"
}
builder.setTitle("SSL Certificate Error")
builder.setMessage(message)
builder.setPositiveButton("Continue") { _,_ -> handler.proceed() }
builder.setNegativeButton("Cancel") { _,_ -> handler.cancel() }
val dialog = builder.create()
dialog.show()
}
override fun shouldOverrideUrlLoading(view: WebView?, url: String?): Boolean {
loadingProgressBar.visibility = View.VISIBLE
if (url == "https://www.bkash.com/terms-and-conditions") {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
return true
}
return false
}
override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) {
loadingProgressBar.visibility = View.VISIBLE
}
override fun onPageFinished(view: WebView?, url: String?) {
bkashWebView.let {
it.loadUrl("javascript:callReconfigure($paymentRequest )")
it.loadUrl("javascript:clickPayButton()")
}
loadingProgressBar.visibility = View.GONE
}
}
I am using your source code and in my first run, it is not showing any message when I click payment to cancel and keeps on the same screen rather than back on the main screen.
And I need a little more information, where to change the merchant id to configure with mine.
In your app, I don't find any place where I can change the merchant details. It will be great if you add this to your documentation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.