Adjustのリンク短縮ソリューションは、複雑で長いリンクをより簡潔で短いリンクに変換します。短縮リンクはディープリンクとキャンペーン情報を保持し、アプリがインストールされていない場合は、ユーザーをApp Storeに誘導します。
このセクションで説明するメソッドを使用して、短縮リンクを解析します。
Adjust SDKでディープリンクを設定
Adjust SDKに、以下のサポートを追加してください。
Adjust SDKを設定して短縮リンクを解析
public static void processAndResolveDeeplink(Uri url, Context context, OnDeeplinkResolvedListener callback)
Adjust SDKは、onCreate
またはonNewIntent
メソッドを使ってアクティビティ内のintentオブジェクトにディープリンク情報を送信します。ディープリンクは、 intent
オブジェクトのdata
プロパティで利用可能です。アプリが起動し、これらのメソッドのいずれかが起動すれば、ディープリンクにアクセスできます。processAndResolveDeeplink
メソッドを呼び出して、ディープリンクでユーザーをアプリに誘導した短縮AdjustリンクURLを解析します。
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val webpageURL = intent.data
val adjustDeeplink = AdjustDeeplink(webpageURL)
Adjust.processAndResolveDeeplink(adjustDeeplink, this) { resolvedLink ->
// resolvedLink contains either resolved URL (if it was unshortened)
// or just echoed URL if it was not shortened
Log.d("Example", resolvedLink)
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent intent = getIntent();
Uri webpageURL = intent.getData();
AdjustDeeplink adjustDeeplink = new AdjustDeeplink(webpageURL);
Adjust.processAndResolveDeeplink(adjustDeeplink, this, new OnDeeplinkResolvedListener() {
public void onDeeplinkResolved(String resolvedLink) {
// resolvedLink contains either resolved URL (if it was unshortened)
// or just echoed URL if it was not shortened
Log.d("Example", resolvedLink);
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
val webpageURL = intent.data
val adjustDeeplink = AdjustDeeplink(webpageURL)
Adjust.processAndResolveDeeplink(adjustDeeplink, this) { resolvedLink ->
// resolvedLink contains either resolved URL (if it was unshortened)
// or just echoed URL if it was not shortened
Log.d("Example", resolvedLink)
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
Uri webpageURL = intent.getData();
AdjustDeeplink adjustDeeplink = new AdjustDeeplink(webpageURL);
Adjust.processAndResolveDeeplink(adjustDeeplink, this, new OnDeeplinkResolvedListener() {
public void onDeeplinkResolved(String resolvedLink) {
// resolvedLink contains either resolved URL (if it was unshortened)
// or just echoed URL if it was not shortened
Log.d("Example", resolvedLink);
processAndResolveDeeplink
メソッドに送信したリンクが短縮されていた場合、 resolvedLink
は拡張された元のリンクを返します。メソッドにパスしたリンクが短縮されていない場合、 resolvedLink
にはパスした同じリンクが含まれます。