Package 

Object UserSync


  • 
    public class UserSync
    
                        

    WebView 連携するためのクラスです。

    Webページを開くWebViewに連携用のスクリプトを設定することで、WebとAppのユーザーの紐付けが行われます。

    なお連携を行うためにはWebページに、KARTEのタグが埋め込まれている必要があります。

    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static UserSync INSTANCE
    • Method Summary

      Modifier and Type Method Description
      final static String appendUserSyncQueryParameter(String url) 指定されたURL文字列にWebView連携用のクエリパラメータを付与します。
      final static String appendUserSyncQueryParameter(Uri uri) 指定されたUriにWebView連携用のクエリパラメータを付与します。
      final static String getUserSyncScript() WebView 連携用のスクリプト(javascript)を返却します。ユーザースクリプトとしてWebViewに設定することで、WebView内のタグと連携されます。なおSDKの初期化が行われていない場合はnullを返却します。
      final static Unit setUserSyncScript(WebView webView) WebViewに連携用のスクリプトを設定します。スクリプトはユーザースクリプトとして設定されます。なおSDKの初期化が行われていない場合は設定されません。
      • Methods inherited from class io.karte.android.core.usersync.UserSync

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • appendUserSyncQueryParameter

        @Deprecated(message = "User sync function using query parameters is deprecated. It will be removed in the future.", replaceWith = @ReplaceWith(imports = {}, expression = "setUserSyncScript(webView)")) final static String appendUserSyncQueryParameter(String url)

        指定されたURL文字列にWebView連携用のクエリパラメータを付与します。

        Parameters:
        url - 連携するページのURL文字列
      • appendUserSyncQueryParameter

        @Deprecated(message = "User sync function using query parameters is deprecated. It will be removed in the future.", replaceWith = @ReplaceWith(imports = {}, expression = "setUserSyncScript(webView)")) final static String appendUserSyncQueryParameter(Uri uri)

        指定されたUriにWebView連携用のクエリパラメータを付与します。

        Parameters:
        uri - 連携するページのUriインスタンス
      • getUserSyncScript

         final static String getUserSyncScript()

        WebView 連携用のスクリプト(javascript)を返却します。

        ユーザースクリプトとしてWebViewに設定することで、WebView内のタグと連携されます。

        なおSDKの初期化が行われていない場合はnullを返却します。

      • setUserSyncScript

         final static Unit setUserSyncScript(WebView webView)

        WebViewに連携用のスクリプトを設定します。

        スクリプトはユーザースクリプトとして設定されます。

        なおSDKの初期化が行われていない場合は設定されません。

        Parameters:
        webView - WebView