/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.expansion.downloader;
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 SampleDownloaderService extends DownloaderService {
// Some random RSA key, not actually suitable for the Google Play store.
// Replace this with the public key from your Google Play profile.
// We'll let DexGuard encrypt it.
private static final String BASE64_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+T3PmaVTzJZYt75vi4+EQKDp6wgtFTzAwTRENX0Tw0EIT+55zNfMaI4LfgSjF6jCl7zxl7hH7u8NG9/MmrdNMsR5w9Tob9qsH0kPoK0TXh7wFY00umEKEj+v+7gxsLqzyAS1OPka7KZXTFU8QWcbcTf2FOmk2v/tn/p212gwlcQIDAQAB";
// Generate your own 20 random bytes, and put them here.
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() {
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() {
return SampleAlarmReceiver.class.getName();
}
}