Shared Secret Provider Builder

The provider builder tool is an ant script that may be used to generate your game specific Shared Secret Provider. The script may be found in the Kongregate SDK under /Android/KongregateSDKLib/tools/providerbuilder. It simply creates a game specific subclass of the KongregateSharedSecretProvider, compiles it, and packages it in a JAR that can be included in your plugins directory. The script is needed because android providers must have a unique name accross all apps installed on the device and we don’t want Kongregate games to conflict with one another.

Requirements

To use the provider builder tool you must have Apache Ant, Java JDK, Android SDK, and the Kongregate SDK.

Usage

  1. Edit build.properties and replace the value of kong.game with the name of your game (alpha numeric, starting with a letter). You may also need to update the other fields to reflect the location of the Kongregate and Android SDKs.

  2. run ant in the providerbuilder directory. This should produce the file out/YourGame.jar

  3. Copy YourGame.jar to your Android Project. For Unity, this may be /Assets/Plugins/Android/Kongregate/libs

  4. Add the ReadSharedData2 permission to your AndroidManifest.xml under the <manifest> tag. Be sure to give it the signature protection level.

     <permission android:name="com.kongregate.permission.ReadSharedData2" android:protectionLevel="signature"/>
     <uses-permission android:name="com.kongregate.permission.ReadSharedData2"/>
    
  5. Add your new YourGameSharedSecretProvider to your AndroidManifest.xml under the <application> tag.

     <provider android:name="com.kongregate.android.test.thirdpartytest.[YourGame]SharedSecretProvider"
               android:authorities="com.kongregate.android.test.thirdpartytest.[YourGame]SharedSecretProvider"
               android:multiprocess="true"
               android:readPermission="com.kongregate.permission.ReadSharedData2"
               android:exported="true"
             />
    
  6. Your Done!