|
26 | 26 | import com.adjust.sdk.OnDeeplinkResponseListener;
|
27 | 27 | import com.adjust.sdk.OnEventTrackingFailedListener;
|
28 | 28 | import com.adjust.sdk.OnEventTrackingSucceededListener;
|
| 29 | +import com.adjust.sdk.OnDeeplinkResolvedListener; |
29 | 30 | import com.adjust.sdk.OnPurchaseVerificationFinishedListener;
|
30 | 31 | import com.adjust.sdk.OnSessionTrackingFailedListener;
|
31 | 32 | import com.adjust.sdk.OnSessionTrackingSucceededListener;
|
@@ -92,6 +93,7 @@ public void executeCommand(final Command sentCommand) {
|
92 | 93 | case "trackAdRevenueV2" : trackAdRevenueV2(); break;
|
93 | 94 | case "trackSubscription": trackSubscription(); break;
|
94 | 95 | case "verifyPurchase": verifyPurchase(); break;
|
| 96 | + case "processDeeplink" : processDeeplink(); break; |
95 | 97 | //case "testBegin": testBegin(); break;
|
96 | 98 | // case "testEnd": testEnd(); break;
|
97 | 99 | }
|
@@ -370,20 +372,7 @@ public boolean launchReceivedDeeplink(Uri deeplink) {
|
370 | 372 | public void onAttributionChanged(AdjustAttribution attribution) {
|
371 | 373 | Log.d("TestApp", "attribution = " + attribution.toString());
|
372 | 374 |
|
373 |
| - MainActivity.testLibrary.addInfoToSend("trackerToken", attribution.trackerToken); |
374 |
| - MainActivity.testLibrary.addInfoToSend("trackerName", attribution.trackerName); |
375 |
| - MainActivity.testLibrary.addInfoToSend("network", attribution.network); |
376 |
| - MainActivity.testLibrary.addInfoToSend("campaign", attribution.campaign); |
377 |
| - MainActivity.testLibrary.addInfoToSend("adgroup", attribution.adgroup); |
378 |
| - MainActivity.testLibrary.addInfoToSend("creative", attribution.creative); |
379 |
| - MainActivity.testLibrary.addInfoToSend("clickLabel", attribution.clickLabel); |
380 |
| - MainActivity.testLibrary.addInfoToSend("adid", attribution.adid); |
381 |
| - MainActivity.testLibrary.addInfoToSend("costType", attribution.costType); |
382 |
| - if (attribution.costAmount != null) { |
383 |
| - MainActivity.testLibrary.addInfoToSend("costAmount", attribution.costAmount.toString()); |
384 |
| - } |
385 |
| - MainActivity.testLibrary.addInfoToSend("costCurrency", attribution.costCurrency); |
386 |
| - MainActivity.testLibrary.addInfoToSend("fbInstallReferrer", attribution.fbInstallReferrer); |
| 375 | + MainActivity.testLibrary.setInfoToSend(attribution.toMap()); |
387 | 376 | MainActivity.testLibrary.sendInfoToServer(localBasePath);
|
388 | 377 | }
|
389 | 378 | });
|
@@ -844,6 +833,19 @@ public void onVerificationFinished(AdjustPurchaseVerificationResult result) {
|
844 | 833 | }
|
845 | 834 | });
|
846 | 835 | }
|
| 836 | + |
| 837 | + private void processDeeplink() { |
| 838 | + String deeplink = command.getFirstParameterValue("deeplink"); |
| 839 | + Uri deeplinkUri = Uri.parse(deeplink); |
| 840 | + final String localBasePath = basePath; |
| 841 | + Adjust.processDeeplink(deeplinkUri, context, new OnDeeplinkResolvedListener() { |
| 842 | + @Override |
| 843 | + public void onDeeplinkResolved(String resolvedLink) { |
| 844 | + MainActivity.testLibrary.addInfoToSend("resolved_link", resolvedLink); |
| 845 | + MainActivity.testLibrary.sendInfoToServer(localBasePath); |
| 846 | + } |
| 847 | + }); |
| 848 | + } |
847 | 849 | /*
|
848 | 850 | private void testBegin() {
|
849 | 851 | if (command.containsParameter("teardown")) {
|
|
0 commit comments