Permalink
Browse files

Updating Ads Sample app with AdsAPI v2.0.3

  • Loading branch information...
pgpbpadilla committed Dec 27, 2013
1 parent 15e0d2b commit 71cfd89124e18529682a7746bb989c1828218f40
View
@@ -0,0 +1,23 @@
+# built application files
+*.apk
+*.ap_
+
+# files for the dex VM
+*.dex
+
+# Java class files
+*.class
+
+# generated files
+bin/
+gen/
+
+# Ignore gradle files
+.gradle/
+build/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Proguard folder generated by Eclipse
+proguard/
@@ -5,7 +5,7 @@
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8"
- android:targetSdkVersion="8"/>
+ android:targetSdkVersion="18"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
View
Binary file not shown.
@@ -11,5 +11,5 @@
#proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt
# Project target.
-target=android-10
+target=android-18
android.library=false
@@ -88,7 +88,11 @@ public static SecretKeySpec getSecretKeySpec(String strSeedKey) throws Exception
if ((strSeedKey != null) && (strSeedKey.length() > 0)) {
byte[] byteBSSIDValue = strSeedKey.getBytes();
try {
- SecureRandom rng = SecureRandom.getInstance("SHA1PRNG");
+ SecureRandom rng;
+ if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1)
+ rng = SecureRandom.getInstance("SHA1PRNG", "Crypto");
+ else
+ rng = SecureRandom.getInstance("SHA1PRNG");
rng.setSeed(byteBSSIDValue);
KeyGenerator kg = KeyGenerator.getInstance("AES");
kg.init(128, rng);
@@ -98,8 +98,8 @@ public void onCreate(Bundle savedInstanceState) {
} catch (Exception e) {
Log.e(TAG, "Eror :" + e.fillInStackTrace());
}*/
- appKey = UPDATE_APP_KEY_HERE;
- secret = UPDATE_SECRET_KEY_HERE;
+ appKey = "UPDATE_APP_KEY_HERE";
+ secret = "UPDATE_SECRET_KEY_HERE";
// Category always in lower case
if(null == appKey || null == secret){

0 comments on commit 71cfd89

Please sign in to comment.