Class AngularNativeConfig

    • Constructor Detail

    • Method Detail

      • getJsonConverter

         final BridgeComponentJsonConverter getJsonConverter()

        Set a custom JSON converter to easily decode Message.dataJson to a data object in received messages and to encode a data object back to json to reply with a custom message back to the web.

      • setJsonConverter

         final Unit setJsonConverter(BridgeComponentJsonConverter jsonConverter)

        Set a custom JSON converter to easily decode Message.dataJson to a data object in received messages and to encode a data object back to json to reply with a custom message back to the web.

      • getDebugLoggingEnabled

         final Boolean getDebugLoggingEnabled()

        Enables/disables debug logging. This should be disabled in production environments. Disabled by default.

        Important: You should not enable debug logging in production release builds.

      • setDebugLoggingEnabled

         final Unit setDebugLoggingEnabled(Boolean debugLoggingEnabled)

        Enables/disables debug logging. This should be disabled in production environments. Disabled by default.

        Important: You should not enable debug logging in production release builds.

      • getWebViewDebuggingEnabled

         final Boolean getWebViewDebuggingEnabled()

        Enables/disables debugging of web contents loaded into WebViews. Disabled by default.

        Important: You should not enable debugging in production release builds.

      • setWebViewDebuggingEnabled

         final Unit setWebViewDebuggingEnabled(Boolean webViewDebuggingEnabled)

        Enables/disables debugging of web contents loaded into WebViews. Disabled by default.

        Important: You should not enable debugging in production release builds.

      • getApplicationUserAgentPrefix

         final String getApplicationUserAgentPrefix()

        Set a custom user agent application prefix for every WebView instance. The library will automatically append a substring to your prefix which includes:

        • "AngularNative Native Android; WebNavigation Native Android;"

        • "bridge-components: your bridge components;"

        • The WebView's default Chromium user agent string

      • setApplicationUserAgentPrefix

         final Unit setApplicationUserAgentPrefix(String applicationUserAgentPrefix)

        Set a custom user agent application prefix for every WebView instance. The library will automatically append a substring to your prefix which includes:

        • "AngularNative Native Android; WebNavigation Native Android;"

        • "bridge-components: your bridge components;"

        • The WebView's default Chromium user agent string

      • getUserAgent

         final String getUserAgent()

        Gets the user agent that the library builds to identify the app and its registered bridge components. This includes:

        • Your (optional) custom applicationUserAgentPrefix

        • "AngularNative Native Android; WebNavigation Native Android;"

        • "bridge-components: your bridge components;"

      • userAgentWithWebViewDefault

         final String userAgentWithWebViewDefault(Context context)

        Gets the full user agent that is used for every WebView instance. This includes:

        • Your (optional) custom applicationUserAgentPrefix

        • "AngularNative Native Android; WebNavigation Native Android;"

        • "bridge-components: your bridge components;"

        • The WebView's default Chromium user agent string