code: private String getDefaultBrowserAgent(Context context) {
          String userAgent = "";
          if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
              try {
                  userAgent = WebSettings.getDefaultUserAgent(context);
              } catch (Exception ignore) {
                  // A known Android issue. Webview packages are not accessible while any updates for chrome is in progress.
                  // https://bugs.chromium.org/p/chromium/issues/detail?id=506369
              }
          }
          return userAgent;
      }
docs: PRS : User agent is checked only from api-17