Setting up the SDK

Before Integrating

Adjoe Sdk 2.0.7 fully support Androidx and targetSdkVersion 31.

Before you can integrate and test the SDK, you must request an SDK hash and set up your devices for testing.

Requesting the SDK hash

The SDK hash is a 32 character hexadecimal string (e.g. 1234567890abcdefgh1234567890abcd). It uniquely identifies your app to the adjoe SDK and must therefore be kept secret. You can obtain it by requesting it from your adjoe contact person.

Setting up test devices

IMPORTANT: This step must be executed before the SDK is initialized for the first time on the affected device! Note that you can always add more devices as test devices in the future, but only if you haven't initialized the SDK on the device before.

To easily test your integration of the adjoe SDK on a certain device, you can set it up as a test device. This device will then receive more apps to install and the rewards are reached faster, making it less cumbersome for you to test the integration.

To set up a device as a test device for adjoe, simply send the device's Google Advertising ID to your adjoe contact person and wait for the confirmation. You can obtain the Google Advertising ID (GAID) of your device by going to Settings > Google > Ads > My Ad-ID.

Note: When you reset the GAID, you must again register the device as a test device with the new GAID.

Add the SDK to your app

Download the latest version of the adjoe SDK for Adobe Air here: AdjoeSDK-default-2.0.7.ane.

Copy the AdjoeSDK-*.ane to your library folder and add it to the list of extensions in your main ...-app.xml:

...
<extensions>
  ...
  <extensionID>io.adjoe.sdk</extensionID>
</extensions> 

Add manifest elements

You need to add the following elements to your app's AndroidManifest. Make sure to replace <APPLICATION_ID> with your app's applicationId.

  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS"
	tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
...
<application>
	...
	<activity
		android:name="io.adjoe.sdk.AdjoeActivity"
		android:theme="@style/Theme.AppCompat.NoActionBar"
		android:hardwareAccelerated="true"
		android:exported="false"
		android:configChanges="orientation|screenSize">
	</activity>

	<service
		android:name="io.adjoe.sdk.AppTrackingService"
		android:exported="false" />
	<service
		android:name="io.adjoe.sdk.AppTrackingJob"
		android:exported="false"
		android:permission="android.permission.BIND_JOB_SERVICE" />

	<receiver
		android:name="io.adjoe.sdk.AppTrackingAlarmReceiver"
		android:exported="false" />

	<service
		android:name="io.adjoe.sdk.DeviceStatusService"
		android:exported="false" />

	<receiver
		android:name="io.adjoe.sdk.AdjoeActionReceiver"
		android:exported="false">
		<intent-filter>
			<action android:name="io.adjoe.sdk.ADJOE_ACTION"/>
		</intent-filter>
	</receiver>

	<receiver
		android:name="io.adjoe.sdk.DeviceStatusTracker"
		android:exported="false">
		<intent-filter>
			<action android:name="android.intent.action.BOOT_COMPLETED"/>
			<action android:name="android.intent.action.USER_PRESENT"/>
		</intent-filter>
	</receiver>

	<receiver
		android:name="io.adjoe.sdk.AdjoePackageInstallReceiver">
		<intent-filter>
			<action android:name="android.intent.action.PACKAGE_ADDED"/>
			<data android:scheme="package"/>
		</intent-filter>
	</receiver>

	<provider
		android:name="io.adjoe.sdk.SharedPreferencesProvider"
		android:authorities="${applicationId}.io.adjoe.sdk.contentprovider.sharedpreferences.AUTHORITY"
		android:exported="false"
		android:multiprocess="false"
		/>

	<provider
		android:name="io.adjoe.sdk.DatabaseContentProvider"
		android:authorities="${applicationId}.io.adjoe.sdk.contentprovider.database.AUTHORITY"
		android:exported="false"
		android:multiprocess="false"
		/>

	<receiver android:name="io.adjoe.sdk.NotificationBroadcastReceiver"
		android:exported="false"/>
</application>
</manifest>

Please make sure you replace the `${applicationId}` with your actual application id

Last updated