Adjust extension

I’ve created another extension. This one is for Adjust analytics. https://www.adjust.com

But the code base of the extension can be used as a template for other extensions, primarily for iOS and Android.

17 Likes

Enabled android manifest merging.

5 Likes

We’re looking to add Adjust to one of our games, but noticed the SDK is out of date. Are there any plans to upgrade the Adjust SDK to a newer one, ideally 4.29.5?

Not yet, none of my clients requested it. But it shouldn’t be too hard for you to upgrade. If API didn’t change much, just unpack the latest sdk into the extension and see if it compiles. If it works you can make a pull request into the repo.

3 Likes

We’ve decided to try to use the SDK as is. Bundling with Defold 1.2.184 on iOS works, bundling on Android fails with this error:

warning: [options] bootstrap class path not set in conjunction with -source 6
	warning: [options] source value 6 is obsolete and will be removed in a future release
	warning: [options] target value 1.6 is obsolete and will be removed in a future release
	warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
	Note: Some input files use or override a deprecated API.
	Note: Recompile with -Xlint:deprecation for details.
	Note: /tmp/job9936964842783630575/upload/gpgs/src/java/com/defold/gpgs/GpgsJNI.java uses or overrides a deprecated API.
	Note: /tmp/job9936964842783630575/upload/gpgs/src/java/com/defold/gpgs/GpgsJNI.java uses unchecked or unsafe operations.
	Note: Recompile with -Xlint:unchecked for details.
	Note: /tmp/job9936964842783630575/upload/defunityads/src/android/com/agulev/defunityads/DefUnityAds.java uses or overrides a deprecated API.
	Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/android/installreferrer/BuildConfig;
	Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/android/installreferrer/api/InstallReferrerClient;
	Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/android/installreferrer/api/InstallReferrerClient$1;
	Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/android/installreferrer/api/InstallReferrerClient$Builder;
	Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/android/installreferrer/api/InstallReferrerClient$InstallReferrerResponse;
	Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/android/installreferrer/api/InstallReferrerClientImpl;
	Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/android/installreferrer/api/InstallReferrerClientImpl$1;
	Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/android/installreferrer/api/InstallReferrerClientImpl$ClientState;
	Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/android/installreferrer/api/InstallReferrerClientImpl$InstallReferrerServiceConnection;
	java.lang.RuntimeException: Translation has been interrupted
	at com.android.dx.command.dexer.Main.processAllFiles(Main.java:614)
	at com.android.dx.command.dexer.Main.runMultiDex(Main.java:365)
	at com.android.dx.command.dexer.Main.runDx(Main.java:286)
	at com.android.dx.command.dexer.Main.main(Main.java:244)
	at com.android.dx.command.Main.main(Main.java:95)
Caused by: java.lang.InterruptedException: Too many errors
	at com.android.dx.command.dexer.Main.processAllFiles(Main.java:606)
	... 4 more

It looks like there is a conflict with UnityAds… maybe?

Yes. You can remove the installreferer.jar from adjust extension extension-adjust/adjust/lib/android at master · Lerg/extension-adjust · GitHub

Ideally it has to be updated to use build.gradle file without the need to add jar files manually.

5 Likes

I copied the extension to the project, removed the file and now it builds fine. Thanks so much! Happy Friday!

5 Likes

Does anyone have an account on Adjust? I want to check whether this version of this SDK works today.

Have you tried Adjust recently? Is the current extension still working?

Haven’t been using for a while. Maybe works but it’s worth updating it. Maybe a simple SDK update would be enough (without touching the code).

Hello totebo I am releasing a project that has Facebook and Adjust SDKs and I have a deprecation problem with the Adjust SKD, I don’t know much about doing all those things you are talking about. I was wondering if you could share with me the updated extension you have, I would really appreciate that, you would help me A LOT!

Hello :3 I was wondering if you could share a link with me where somebody explains how to do that SDK update? I am in a little trouble, I need to release a project like right now and the actual version of Adjust seems to be using deprecated classes. I cannot build an APK and I would really REALLY appreciate if you could like give me little advise.

This happens when I try to bundle Adjust with Facebook SDK, for a reason both of them together doesn’t seem to work.

I followed these instructions, that worked.

The steps are something like:

  1. Add the extension dependency to game.project
  2. Project > Fetch Libraries
  3. Copy the extension folder to the project directly. You can do this inside the Defold editor by selecting the folder for the extension, copy, then selecting the topmost Defold folder and paste.
  4. Remove the extension dependency.
  5. Project > Fetch Libraries
  6. Remove the installreferer.jar file from the copied folder.
4 Likes

It worked… I cannot believe it… I WILL NEVER FORGEEEEEETT YOUUUUUU!!!

3 Likes

Ha! I’m glad it worked! :grin: