0

I am building an Android app that communicates with a third-party API. On POST request from my app, some user information (sensitive) must be tokenized -- using functions from a Javascript library provided by the API developers.

My question is, is there any way to use this Javascript library in-app? The only solution I can think of is to set up my own remote server to handle the JS. This seems like a lot of hassle to handle one simple use-case. Is there any way to do this without setting up an outside server?

Thanks.

Levi S
  • 1
  • 1

1 Answers1

0
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
    mWebView.evaluateJavascript("onCheckFailure();",null);
} else {
    mWebView.loadUrl("javascript:onCheckFailure();");
}
Alexey Subach
  • 11,903
  • 7
  • 34
  • 60
Alexander Savin
  • 1,952
  • 1
  • 15
  • 30