Unsupported APIs warning in play store

Hi

Im using ionic3, the App is very simple, in home page i am opening InAppBrowser.
when app is published in store i got warnings, pls let me know what can be done to fix them

warning 1

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z
at android.os.StrictMode.lambda$static$1(StrictMode.java:428)
at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
at java.lang.Class.getDeclaredMethodInternal(Native Method)
at java.lang.Class.getMethod(Class.java:2064)
at java.lang.Class.getDeclaredMethod(Class.java:2047)
at aGt.a(PG:4)
at aGN.a(PG:10)
at aGu.a(PG:50)
at clB.(PG:4)
at ckV.run(PG:7)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)

warning 2

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V
at android.os.StrictMode.lambda$static$1(StrictMode.java:428)
at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
at java.lang.Class.getDeclaredMethodInternal(Native Method)
at java.lang.Class.getPublicMethodRecursive(Class.java:2075)
at java.lang.Class.getMethod(Class.java:2063)
at java.lang.Class.getMethod(Class.java:1690)
at coC.a(PG:7)
at org.chromium.content.browser.selection.SmartSelectionClient.(PG:5)
at cpj.a(Unknown Source:7)
at org.chromium.android_webview.AwContents.e(PG:241)
at org.chromium.android_webview.AwContents.d(PG:208)
at org.chromium.android_webview.AwContents.(PG:79)
at vN.run(PG:15)
at aEm.a(PG:13)
at aEn.run(PG:2)
at org.chromium.base.ThreadUtils.b(PG:30)
at aEm.a(PG:7)
at com.android.webview.chromium.WebViewChromiumFactoryProvider.b(PG:6)
at com.android.webview.chromium.WebViewChromium.init(PG:107)
at android.webkit.WebView.(WebView.java:422)
at android.webkit.WebView.(WebView.java:348)
at android.webkit.WebView.(WebView.java:331)
at android.webkit.WebView.(WebView.java:318)
at org.apache.cordova.engine.SystemWebView.(SystemWebView.java:47)
at org.apache.cordova.engine.SystemWebView.(SystemWebView.java:43)
at com.ionicframework.cordova.webview.IonicWebViewEngine.(IonicWebViewEngine.java:41)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:80)
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:206)
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:202)
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:146)
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:224)
at org.client.ericssonpartnermobile.MainActivity.onCreate(MainActivity.java:39)
at android.app.Activity.performCreate(Activity.java:7144)
at android.app.Activity.performCreate(Activity.java:7135)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:184)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V
at android.os.StrictMode.lambda$static$1(StrictMode.java:428)
at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
at java.lang.Class.getDeclaredMethodInternal(Native Method)
at java.lang.Class.getPublicMethodRecursive(Class.java:2075)
at java.lang.Class.getMethod(Class.java:2063)
at java.lang.Class.getMethod(Class.java:1690)
at org.chromium.content.browser.selection.SmartSelectionMetricsLogger.create(SmartSelectionMetricsLogger.java:7)
at org.chromium.content.browser.selection.SmartSelectionClient.(SmartSelectionClient.java:5)
at org.chromium.content_public.browser.SelectionClient$$CC.createSmartSelectionClient$$STATIC$$(Unknown Source:7)
at org.chromium.android_webview.AwContents.setNewAwContentsPreO(AwContents.java:226)
at org.chromium.android_webview.AwContents.setNewAwContents(AwContents.java:184)
at org.chromium.android_webview.AwContents.(AwContents.java:80)
at com.android.webview.chromium.X.run(WebViewChromium.java:14)
at org.chromium.android_webview.WebViewChromiumRunQueue.drainQueue(WebViewChromiumRunQueue.java:13)
at org.chromium.android_webview.WebViewChromiumRunQueue$1.run(WebViewChromiumRunQueue.java:2)
at org.chromium.base.ThreadUtils.runOnUiThread(ThreadUtils.java:31)
at org.chromium.android_webview.WebViewChromiumRunQueue.addTask(WebViewChromiumRunQueue.java:7)
at com.android.webview.chromium.WebViewChromiumFactoryProvider.v(WebViewChromiumFactoryProvider.java:6)
at com.android.webview.chromium.WebViewChromium.init(WebViewChromium.java:88)
at android.webkit.WebView.(WebView.java:422)
at android.webkit.WebView.(WebView.java:348)
at android.webkit.WebView.(WebView.java:331)
at android.webkit.WebView.(WebView.java:318)
at org.apache.cordova.engine.SystemWebView.(SystemWebView.java:47)
at org.apache.cordova.engine.SystemWebView.(SystemWebView.java:43)
at com.ionicframework.cordova.webview.IonicWebViewEngine.(IonicWebViewEngine.java:41)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:80)
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:206)
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:202)
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:146)
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:224)
at org.client.ericssonpartnermobile.MainActivity.onCreate(MainActivity.java:39)
at android.app.Activity.performCreate(Activity.java:7144)
at android.app.Activity.performCreate(Activity.java:7135)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:184)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

warning 3

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->(Landroid/content/Context;I)V
at android.os.StrictMode.lambda$static$1(StrictMode.java:428)
at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
at java.lang.Class.getDeclaredConstructorInternal(Native Method)
at java.lang.Class.getConstructor0(Class.java:2325)
at java.lang.Class.getConstructor(Class.java:1725)
at coC.a(PG:6)
at org.chromium.content.browser.selection.SmartSelectionClient.(PG:5)
at cpj.a(Unknown Source:7)
at org.chromium.android_webview.AwContents.e(PG:241)
at org.chromium.android_webview.AwContents.d(PG:208)
at org.chromium.android_webview.AwContents.(PG:79)
at vN.run(PG:15)
at aEm.a(PG:13)
at aEn.run(PG:2)
at org.chromium.base.ThreadUtils.b(PG:30)
at aEm.a(PG:7)
at com.android.webview.chromium.WebViewChromiumFactoryProvider.b(PG:6)
at com.android.webview.chromium.WebViewChromium.init(PG:107)
at android.webkit.WebView.(WebView.java:422)
at android.webkit.WebView.(WebView.java:348)
at android.webkit.WebView.(WebView.java:331)
at android.webkit.WebView.(WebView.java:318)
at org.apache.cordova.engine.SystemWebView.(SystemWebView.java:47)
at org.apache.cordova.engine.SystemWebView.(SystemWebView.java:43)
at com.ionicframework.cordova.webview.IonicWebViewEngine.(IonicWebViewEngine.java:41)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:80)
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:206)
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:202)
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:146)
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:224)
at org.client.ericssonpartnermobile.MainActivity.onCreate(MainActivity.java:39)
at android.app.Activity.performCreate(Activity.java:7144)
at android.app.Activity.performCreate(Activity.java:7135)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:184)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->(Landroid/content/Context;I)V
at android.os.StrictMode.lambda$static$1(StrictMode.java:428)
at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
at java.lang.Class.getDeclaredConstructorInternal(Native Method)
at java.lang.Class.getConstructor0(Class.java:2325)
at java.lang.Class.getConstructor(Class.java:1725)
at org.chromium.content.browser.selection.SmartSelectionMetricsLogger.create(SmartSelectionMetricsLogger.java:6)
at org.chromium.content.browser.selection.SmartSelectionClient.(SmartSelectionClient.java:5)
at org.chromium.content_public.browser.SelectionClient$$CC.createSmartSelectionClient$$STATIC$$(Unknown Source:7)
at org.chromium.android_webview.AwContents.setNewAwContentsPreO(AwContents.java:226)
at org.chromium.android_webview.AwContents.setNewAwContents(AwContents.java:184)
at org.chromium.android_webview.AwContents.(AwContents.java:80)
at com.android.webview.chromium.X.run(WebViewChromium.java:14)
at org.chromium.android_webview.WebViewChromiumRunQueue.drainQueue(WebViewChromiumRunQueue.java:13)
at org.chromium.android_webview.WebViewChromiumRunQueue$1.run(WebViewChromiumRunQueue.java:2)
at org.chromium.base.ThreadUtils.runOnUiThread(ThreadUtils.java:31)
at org.chromium.android_webview.WebViewChromiumRunQueue.addTask(WebViewChromiumRunQueue.java:7)
at com.android.webview.chromium.WebViewChromiumFactoryProvider.v(WebViewChromiumFactoryProvider.java:6)
at com.android.webview.chromium.WebViewChromium.init(WebViewChromium.java:88)
at android.webkit.WebView.(WebView.java:422)
at android.webkit.WebView.(WebView.java:348)
at android.webkit.WebView.(WebView.java:331)
at android.webkit.WebView.(WebView.java:318)
at org.apache.cordova.engine.SystemWebView.(SystemWebView.java:47)
at org.apache.cordova.engine.SystemWebView.(SystemWebView.java:43)
at com.ionicframework.cordova.webview.IonicWebViewEngine.(IonicWebViewEngine.java:41)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:80)
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:206)
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:202)
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:146)
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:224)
at org.client.ericssonpartnermobile.MainActivity.onCreate(MainActivity.java:39)
at android.app.Activity.performCreate(Activity.java:7144)
at android.app.Activity.performCreate(Activity.java:7135)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:184)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

like this i got 9 warnings

plugins used are

cordova-plugin-device 2.0.2 “Device”
cordova-plugin-inappbrowser 3.0.0 “InAppBrowser”
cordova-plugin-ionic-keyboard 2.1.3 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 4.0.1 “cordova-plugin-ionic-webview”
cordova-plugin-splashscreen 5.0.2 “Splashscreen”
cordova-plugin-statusbar 2.4.2 “StatusBar”
cordova-plugin-whitelist 1.3.3 “Whitelist”

1 Like

i got this, kindly suggest a solution

Request a new public API

If you cannot find an alternative to using a non-SDK interface for a feature in your app, you can create a feature request for a new public API to be added to the SDK.

When creating a feature request, provide the following the following information:

  • Which greylisted API(s) you are using currently, including the full descriptor seen in the Accessing hidden ... logcat message.
  • Why you need to use these APIs, including details about the high-level feature that the API is necessary for, not just low level details.
  • Why any related public SDK APIs are insufficient for your purposes.
  • Any other alternatives you have tried and why these didn’t work out.

When you provide these details in your feature request, you increase the likelihood that a new public API will be granted.

https://developer.android.com/distribute/best-practices/develop/restrictions-non-sdk-interfaces

But i am not native app developer, do not know what to do

I just noticed similar errors for an internal play store build I did earlier in May. It was the first build I submitted after updating the Cordova Android platform to version 8. My app is using Ionic v4.

This just looks like certain APIs inside and the cordova-android project need to be updated soon. As they’re just warnings for now, there’s no need to be concerned. But it is something that the cordova-android repo should update.

I would suggest opening an issue on the cordova-android repo (maybe even sending a PR?) so that it can be tracked.

This has nothing really to do with Ionic, but is do the cordova.

1 Like