Offerwall Implementation with Unity

Implementing the Getjar Offerwall is straightforward if you use Unity. Follow the below steps as well as review the sample implementation included in the Zip distribution (see download instructions below).

Pre-Requisites

  • Unity version 3.5.6 or higher.
  • A Unity project already correctly configured for Android and targeting Android 2.2 “Froyo” (API level 8) or higher.

NOTE: Unity is known to have problems with newer versions of Android 4.3+ when the “Development Build” option (seen below) is checked. If you are targeting Android 4.x you should disable this option.


Step 1: Import necessary files

  1. Download the Unity Zip file from the SDK Download page. This includes both the Unity Plugin Zip file and the Sample Implementation
  2. Save the GetJar.unitypackage file to your file system.
  3. Import the GetJar.unitypackage file into your Unity project. Choose Assets -> Import Package -> Custom Package
  4. Browse to and select the GetJar.unitypackage file you saved in step 2.
  5. In the Importing package dialog make sure that everything is selected and click Import.
  6. In the Unity Project window you should now see the imported elements in the folder structure

Step 2: Update your Android Manifest File

The package import includes an Android manifest file containing the needed entries for the GetJar SDK, which can be found under Plugins -> Android. You will need to manually merge this manifest file with the Manifest File of your App. This includes the new GetjarInterimActivity which was not in previous Getjar Unity integrations.

Step 3: Using The SDK

At this point, you are ready to start using the SDK. Refer to the Javadoc API for API details.

In general, you will mostly be working with the sample script found in StartUpGameObject.cs in the zip distribution. If you attach this to your main game object as the start-up script, it should work out-of-the-box as an example. You should use this example script as a guide to your own implementation.

Step 4: Verify and submit your App for Review

Once you have completed the implementation of the Getjar SDK, follow the steps to check that it is working correctly.

  1. Confirm the Offerwall is being displayed correctly: Navigate to Getjar portion of your in-app item purchase. Confirm you are able to see full information regarding the product, it’s price and Gold amount required for the user to buy it
  2. Verify you are able to Earn Gold: Download an app from the Offerwall. Install, and open to ensure you are rewarded for it. Repeat till you have sufficient gold to purchase your item. Set your items price to 1 gold to make it easy to repeat tests. Note that you need to Open the installed App to earn the Gold reward.
  3. Confirm that user is being returned to purchase flow: Ensure that tapping the client notification brings you back to your app and the Offerwall for the user to install more apps. This is important since you want the user to continue down the purchase funnel, and not get distracted
  4. Purchase your In-App item with Gold: Make the purchase with Getjar gold and confirm that you are indeed granting the purchased item to the user
  5. If you use Licensing, test License restoraton: If you are selling Licensed App Items; after completion of purchase, uninstall your App, and Re-install it. Confirm that the licenses for the user are restored once you authenticate the user to Getjar

Once you have verified that your App is working correctly, email your App to sdk@getjar.com.