diff options
| author | Juan Linietsky | 2016-01-08 17:53:00 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-01-08 17:53:00 -0300 |
| commit | 40ba22631bbb7fc4c6b88d01402e132dbaceaf2b (patch) | |
| tree | 4629c457d390ba7c7eef4c3d31ebb803fc8179ce /platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java | |
| parent | 401622cc229317bd218f070dd07a3bd8db582f16 (diff) | |
| download | godot-40ba22631bbb7fc4c6b88d01402e132dbaceaf2b.tar.gz godot-40ba22631bbb7fc4c6b88d01402e132dbaceaf2b.tar.zst godot-40ba22631bbb7fc4c6b88d01402e132dbaceaf2b.zip | |
Diffstat (limited to 'platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java')
| -rw-r--r-- | platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java b/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java new file mode 100644 index 000000000..6735d387f --- /dev/null +++ b/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java @@ -0,0 +1,56 @@ +package org.godotengine.godot; + +import android.content.Context; +import android.content.SharedPreferences; +import android.util.Log; + +import com.google.android.vending.expansion.downloader.impl.DownloaderService; + +/** + * This class demonstrates the minimal client implementation of the + * DownloaderService from the Downloader library. + */ +public class GodotDownloaderService extends DownloaderService { + // stuff for LVL -- MODIFY FOR YOUR APPLICATION! + private static final String BASE64_PUBLIC_KEY = "REPLACE THIS WITH YOUR PUBLIC KEY"; + // used by the preference obfuscater + private static final byte[] SALT = new byte[] { + 1, 43, -12, -1, 54, 98, + -100, -12, 43, 2, -8, -4, 9, 5, -106, -108, -33, 45, -1, 84 + }; + + /** + * This public key comes from your Android Market publisher account, and it + * used by the LVL to validate responses from Market on your behalf. + */ + @Override + public String getPublicKey() { + SharedPreferences prefs = getApplicationContext().getSharedPreferences("app_data_keys", Context.MODE_PRIVATE); + Log.d("GODOT", "getting public key:" + prefs.getString("store_public_key", null)); + return prefs.getString("store_public_key", null); + +// return BASE64_PUBLIC_KEY; + } + + /** + * This is used by the preference obfuscater to make sure that your + * obfuscated preferences are different than the ones used by other + * applications. + */ + @Override + public byte[] getSALT() { + return SALT; + } + + /** + * Fill this in with the class name for your alarm receiver. We do this + * because receivers must be unique across all of Android (it's a good idea + * to make sure that your receiver is in your unique package) + */ + @Override + public String getAlarmReceiverClassName() { + Log.d("GODOT", "getAlarmReceiverClassName()"); + return GodotDownloaderAlarmReceiver.class.getName(); + } + +} |
