From c418de9036101a1e1884820f6d01bbe841d59f7d Mon Sep 17 00:00:00 2001 From: Christopher Williams Date: Fri, 8 Jul 2016 13:31:24 -0400 Subject: [PATCH] [TIMOB-23592] Android: Recompile ti.admob module against latest SDK --- .gitignore | 5 +++++ .travis.yml | 19 +++++++++++++------ android/manifest | 8 ++++---- android/src/ti/admob/ViewProxy.java | 4 +++- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 97cd7b7e..4272c054 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,8 @@ profile *.moved-aside DerivedData ios/admob.xcodeproj/project.xcworkspace/xcuserdata/* +.DS_Store +.project +android/libs +android/build.properties +android/dist diff --git a/.travis.yml b/.travis.yml index 8fd69c8c..cf1c04ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,26 @@ language: objective-c -osx_image: xcode7.1 +osx_image: xcode7.3 env: global: - "ARTIFACTS_AWS_REGION=us-east-1" - "ARTIFACTS_S3_BUCKET=builds.appcelerator.com" - "MODULE_NAME=ti.admob" + - TRAVIS_NODE_VERSION="4" before_install: - MODULE_ROOT=$PWD + - brew update + - brew install nvm + - source $(brew --prefix nvm)/nvm.sh + - nvm install 4 + - npm config delete prefix + - nvm use --delete-prefix v4.4.7 4 install: - cd $MODULE_ROOT - - curl -o install.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/install.sh #change this to appcelerator-modules once PR has been merged - - source install.sh -s "--branch 5_1_X" + - curl -o install.sh https://raw.githubusercontent.com/sgtcoolguy/ci/v8/travis/install.sh + - source install.sh -s "--branch master" script: - - curl -o script.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/script.sh + - curl -o script.sh https://raw.githubusercontent.com/sgtcoolguy/ci/v8/travis/script.sh - source script.sh after_success: # and this only on success - - curl -o deploy.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/deploy.sh - - source deploy.sh + - curl -o deploy.sh https://raw.githubusercontent.com/appcelerator-modules/ci/master/travis/deploy.sh + - source deploy.sh diff --git a/android/manifest b/android/manifest index 6d49f6c6..a66eeb6c 100644 --- a/android/manifest +++ b/android/manifest @@ -2,9 +2,9 @@ # this is your module manifest and used by Titanium # during compilation, packaging, distribution, etc. # -version: 2.1.6 -apiversion: 2 -architectures: armeabi armeabi-v7a x86 +version: 3.0.0 +apiversion: 3 +architectures: armeabi-v7a x86 description: Titanium Admob module for Android author: Brian Kurzius license: Apache License, Version 2.0 @@ -16,4 +16,4 @@ name: admob moduleid: ti.admob guid: 0d005e93-9980-4739-9e41-fd1129c8ff32 platform: android -minsdk: 3.2.3.GA +minsdk: 6.0.0 diff --git a/android/src/ti/admob/ViewProxy.java b/android/src/ti/admob/ViewProxy.java index d054da10..33cdb452 100644 --- a/android/src/ti/admob/ViewProxy.java +++ b/android/src/ti/admob/ViewProxy.java @@ -8,8 +8,9 @@ import org.appcelerator.kroll.KrollDict; import org.appcelerator.kroll.annotations.Kroll; -import org.appcelerator.titanium.TiContext.OnLifecycleEvent; +import org.appcelerator.titanium.TiLifecycle.OnLifecycleEvent; import org.appcelerator.titanium.proxy.TiViewProxy; +import org.appcelerator.titanium.TiBaseActivity; import org.appcelerator.kroll.common.Log; import org.appcelerator.titanium.view.TiUIView; @@ -34,6 +35,7 @@ protected KrollDict getLangConversionTable() { @Override public TiUIView createView(Activity activity) { adMob = new View(this); + ((TiBaseActivity)activity).addOnLifecycleEventListener(this); return adMob; }