Skip to content

Commit 02f22c6

Browse files
Merge pull request #35 from scopely/v5.9.1.0-scopely
V5.9.1.0 scopely
2 parents 58b14a5 + 62bfb43 commit 02f22c6

File tree

692 files changed

+14714
-6015
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

692 files changed

+14714
-6015
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
One line summary of the issue here
2+
3+
- [ ] I am submitting a bug report for existing functionality
4+
- [ ] I visited https://developers.mopub.com/ and found no answer
5+
- [ ] I checked https://twittercommunity.com/c/advertiser-api/mopub to make sure that this issue has not already been filed
6+
- [ ] I checked to make sure that this issue has not already been filed
7+
8+
#### MoPub SDK Version:
9+
10+
#### Android Studio Version:
11+
12+
#### Gradle Version:
13+
14+
#### Device model and OS Version:
15+
16+
#### Ad Unit IDs used in reproducing the issue:
17+
18+
#### Steps to reproduce the behavior:
19+
Please list all relevant steps to reproduce the observed behavior.
20+
21+
#### Expected behavior:
22+
As concisely as possible, describe the expected behavior.
23+
24+
#### Observed behavior:
25+
As concisely as possible, describe the observed behavior.
26+
27+
#### Evidence:
28+
Device log files, Network log file, etc.

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "mopub-sdk-common"]
2+
path = mopub-sdk-common
3+
url = [email protected]:mopub/mopub-sdk-common.git

CHANGELOG.md

Lines changed: 97 additions & 12 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ Sign up for an account at [http://app.mopub.com/](http://app.mopub.com/).
88

99
You can find integration documentation on our [wiki](https://github.com/mopub/mopub-android-sdk/wiki/Getting-Started) and additional help documentation on our [developer help site](http://dev.twitter.com/mopub).
1010

11-
To file an issue with our team visit the [MoPub Forum](https://twittercommunity.com/c/fabric/mopub) or email [[email protected]](mailto:[email protected]).
12-
13-
**Please Note: We no longer accept GitHub Issues.**
11+
To file an issue with our team visit the [MoPub Forum](https://twittercommunity.com/c/advertiser-api/mopub) or email [[email protected]](mailto:[email protected]).
1412

1513
## New Pull Requests?
1614

@@ -39,7 +37,7 @@ The MoPub SDK is available via:
3937
}
4038
4139
dependencies {
42-
implementation('com.mopub:mopub-sdk:5.4.0@aar') {
40+
implementation('com.mopub:mopub-sdk:5.9.1@aar') {
4341
transitive = true
4442
}
4543
}
@@ -61,27 +59,27 @@ The MoPub SDK is available via:
6159
// ... other project dependencies
6260
6361
// For banners
64-
implementation('com.mopub:mopub-sdk-banner:5.4.0@aar') {
62+
implementation('com.mopub:mopub-sdk-banner:5.9.1@aar') {
6563
transitive = true
6664
}
6765
6866
// For interstitials
69-
implementation('com.mopub:mopub-sdk-interstitial:5.4.0@aar') {
67+
implementation('com.mopub:mopub-sdk-interstitial:5.9.1@aar') {
7068
transitive = true
7169
}
7270
7371
// For rewarded videos. This will automatically also include interstitials
74-
implementation('com.mopub:mopub-sdk-rewardedvideo:5.4.0@aar') {
72+
implementation('com.mopub:mopub-sdk-rewardedvideo:5.9.1@aar') {
7573
transitive = true
7674
}
7775
7876
// For native static (images).
79-
implementation('com.mopub:mopub-sdk-native-static:5.4.0@aar') {
77+
implementation('com.mopub:mopub-sdk-native-static:5.9.1@aar') {
8078
transitive = true
8179
}
8280
8381
// For native video. This will automatically also include native static
84-
implementation('com.mopub:mopub-sdk-native-video:5.4.0@aar') {
82+
implementation('com.mopub:mopub-sdk-native-video:5.9.1@aar') {
8583
transitive = true
8684
}
8785
}
@@ -91,7 +89,7 @@ The MoPub SDK is available via:
9189
9290
2. **Zipped Source**
9391
94-
The MoPub SDK is also distributed as zipped source code that you can include in your application. MoPub provides two prepackaged archives of source code:
92+
The MoPub SDK is also distributed as zipped source code that you can include in your application:
9593
9694
**[MoPub Android SDK.zip](http://bit.ly/YUdWhH)**
9795
_Includes everything you need to serve MoPub ads. No third party ad networks are included._
@@ -109,25 +107,23 @@ The MoPub SDK is available via:
109107
## New in this Version
110108
Please view the [changelog](https://github.com/mopub/mopub-android-sdk/blob/master/CHANGELOG.md) for a complete list of additions, fixes, and enhancements in the latest release.
111109
112-
- Upgraded target SDK version to 28 and support libraries to 28.0.0.
113-
- Upgraded ExoPlayer dependency to 2.8.3.
114-
- Moved `AdvancedBiddingInitializationAsyncTask` and `RefreshAdvertisingInfoAsyncTask` to the parallel executor.
115-
- MRAID `isViewable` now more closely follows our impression tracking instead of the ad being marked viewable as soon as it loads.
110+
- **Bug Fixes**
111+
- Now sends ad width in pixels instead of dips when setting a `MoPubAdSize`.
116112
117113
## Requirements
118114
119115
- Android 4.1 (API Version 16) and up (**Updated in 4.12.0**)
120-
- android-support-v4.jar, r28 (**Updated in 5.4.0**)
121-
- android-support-annotations.jar, r28 (**Updated in 5.4.0**)
122-
- android-support-v7-recyclerview.jar, r28 (**Updated in 5.4.0**)
123-
- MoPub Volley Library (mopub-volley-2.0.0.jar - available on JCenter) (**Updated in 5.0.0**)
124-
- **Recommended** Google Play Services 15.0.1
116+
- androidx.legacy:legacy-support-v4:1.0.0 (**Updated in 5.9.0**)
117+
- androidx.annotation:annotation:1.1.0 (**Updated in 5.9.0**)
118+
- androidx.recyclerview:recyclerview:1.0.0 (**Updated in 5.9.0**)
119+
- MoPub Volley Library (mopub-volley-2.1.0.jar - available on JCenter) (**Updated in 5.6.0**)
120+
- **Recommended** Google Play Services (com.google.android.gms:play-services-ads-identifier:16.0.0 and com.google.android.gms:play-services-base:16.0.1) (**Updated in 5.6.0**)
125121
126122
## Upgrading to SDK 5.0
127123
128124
Please see the [Getting Started Guide](https://developers.mopub.com/docs/android/getting-started/) for instructions on upgrading from SDK 4.X to SDK 5.0.
129125
130-
For GDPR-specific upgrading instructions, also see the [GDPR Integration Guide](https://developers.mopub.com/docs/publisher/gdpr).
126+
For GDPR-specific upgrading instructions, also see the [GDPR Integration Guide](https://developers.mopub.com/docs/publisher/gdpr-guide).
131127
132128
## <a name="upgradeRepositoryViewability"></a>Upgrading from 4.15.0 and Prior
133129
In 4.16.0, dependencies were added to viewability libraries provided by AVID and Moat. Apps upgrading from previous versions must add
@@ -141,7 +137,7 @@ Normally, to add the MoPub SDK to your app via JCenter, your `build.gradle` woul
141137
142138
```
143139
dependencies {
144-
implementation('com.mopub:mopub-sdk:5.4.0@aar') {
140+
implementation('com.mopub:mopub-sdk:5.9.1@aar') {
145141
transitive = true
146142
}
147143
}
@@ -150,7 +146,7 @@ Update to the following to exclude one or both viewability vendors:
150146
151147
```
152148
dependencies {
153-
implementation('com.mopub:mopub-sdk:5.4.0@aar') {
149+
implementation('com.mopub:mopub-sdk:5.9.1@aar') {
154150
transitive = true
155151
exclude module: 'libAvid-mopub' // To exclude AVID
156152
exclude module: 'moat-mobile-app-kit' // To exclude Moat
@@ -165,7 +161,7 @@ mopub.avidEnabled=false
165161
mopub.moatEnabled=false
166162
```
167163
##### Disable via API
168-
If you would like to opt out of viewability measurement but do not want to modify the MoPub SDK, a function is provided for your convenience. At any point, call `MoPub.disableViewability(vendor);`. This method can can be called with any of the enum values available in `ExternalViewabilitySessionManager.ViewabilityVendor`: `AVID` will disable AVID but leave Moat enabled, `MOAT` will disable Moat but leave AVID enabled, and `ALL` will disable all viewability measurement.
164+
If you would like to opt out of viewability measurement but do not want to modify the MoPub SDK, a function is provided for your convenience. At any point, call `MoPub.disableViewability(vendor);`. This method can be called with any of the enum values available in `ExternalViewabilitySessionManager.ViewabilityVendor`: `AVID` will disable AVID but leave Moat enabled, `MOAT` will disable Moat but leave AVID enabled, and `ALL` will disable all viewability measurement.
169165
170166
## Working with Android 6.0 Runtime Permissions
171167
If your app's target SDK is 23 or higher _**and**_ the user's device is running Android 6.0 or higher, you are responsible for supporting [runtime permissions](http://developer.android.com/training/permissions/requesting.html), one of the [changes](http://developer.android.com/about/versions/marshmallow/android-6.0-changes.html) introduced in Android 6.0 (API level 23). In addition to listing any dangerous permissions your app needs in the manifest, your app also has to explicitly request the dangerous permission(s) during runtime by calling method `requestPermissions()` in the [`ActivityCompat`](http://developer.android.com/reference/android/support/v4/app/ActivityCompat.html) class.
@@ -174,7 +170,7 @@ If your app's target SDK is 23 or higher _**and**_ the user's device is running
174170
- Dangerous permission [`ACCESS_COARSE_LOCATION`](http://developer.android.com/reference/android/Manifest.permission.html#ACCESS_COARSE_LOCATION) is needed to pass network location data to MoPub.
175171
- Dangerous permission [`ACCESS_FINE_LOCATION`](http://developer.android.com/reference/android/Manifest.permission.html#ACCESS_FINE_LOCATION) is needed to pass GPS location data to MoPub.
176172
- Granting `ACCESS_FINE_LOCATION` also allows network location data to be passed to MoPub without the need to also grant `ACCESS_COARSE_LOCATION`.
177-
- Dangerous permission [`WRITE_EXTERNAL_STORAGE`](http://developer.android.com/reference/android/Manifest.permission.html#WRITE_EXTERNAL_STORAGE) is optional and only required for MRAID 2.0 storePicture ads.
173+
- _**Note:** SDK Version 5.9.0 removes the requirement for the dangerous permission [`WRITE_EXTERNAL_STORAGE`](http://developer.android.com/reference/android/Manifest.permission.html#WRITE_EXTERNAL_STORAGE)._
178174
- _**Note:** The user can deny granting any dangerous permissions during runtime, so please make sure your app can handle this properly._
179175
- _**Note:** The user can revoke any permissions granted previously by going to your app's Settings screen, so please make sure your app can handle this properly._
180176
@@ -187,4 +183,4 @@ If your app's target SDK is 23 or higher _**and**_ the user's device is running
187183
188184
## License
189185
190-
We have launched a new license as of version 3.2.0. To view the full license, visit [http://www.mopub.com/legal/sdk-license-agreement/](http://www.mopub.com/legal/sdk-license-agreement/).
186+
To view the full license, visit [http://www.mopub.com/legal/sdk-license-agreement/](http://www.mopub.com/legal/sdk-license-agreement/).

build.gradle

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018 Twitter, Inc.
1+
// Copyright 2018-2019 Twitter, Inc.
22
// Licensed under the MoPub SDK License Agreement
33
// http://www.mopub.com/legal/sdk-license-agreement/
44

@@ -9,11 +9,7 @@ buildscript {
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.1.3'
13-
classpath 'com.novoda:bintray-release:0.8.0'
12+
classpath 'com.android.tools.build:gradle:3.4.1'
13+
classpath 'com.novoda:bintray-release:0.9.1'
1414
}
1515
}
16-
17-
task wrapper(type: Wrapper) {
18-
gradleVersion = '4.4'
19-
}

extras/README.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

gradle.properties

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# Copyright 2018 Twitter, Inc.
1+
# Copyright 2018-2019 Twitter, Inc.
22
# Licensed under the MoPub SDK License Agreement
33
# http://www.mopub.com/legal/sdk-license-agreement/
44

55
org.gradle.jvmargs=-Xmx8192m -XX:MaxPermSize=2048m
6-
org.gradle.daemon=false
6+
org.gradle.daemon=true
7+
org.gradle.parallel=true
8+
android.useAndroidX=true
9+
android.enableJetifier=true
10+
mopub.avidEnabled=false
11+
mopub.moatEnabled=false

gradle/wrapper/gradle-wrapper.jar

1.93 KB
Binary file not shown.
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
# Copyright 2018 Twitter, Inc.
2-
# Licensed under the MoPub SDK License Agreement
3-
# http://www.mopub.com/legal/sdk-license-agreement/
4-
5-
#Thu Jul 12 13:45:05 PDT 2018
61
distributionBase=GRADLE_USER_HOME
72
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
84
zipStoreBase=GRADLE_USER_HOME
95
zipStorePath=wrapper/dists
10-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

gradlew

Lines changed: 58 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,59 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
2+
3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
218

319
##############################################################################
420
##
521
## Gradle start up script for UN*X
622
##
723
##############################################################################
824

9-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10-
DEFAULT_JVM_OPTS=""
25+
# Attempt to set APP_HOME
26+
# Resolve links: $0 may be a link
27+
PRG="$0"
28+
# Need this for relative symlinks.
29+
while [ -h "$PRG" ] ; do
30+
ls=`ls -ld "$PRG"`
31+
link=`expr "$ls" : '.*-> \(.*\)$'`
32+
if expr "$link" : '/.*' > /dev/null; then
33+
PRG="$link"
34+
else
35+
PRG=`dirname "$PRG"`"/$link"
36+
fi
37+
done
38+
SAVED="`pwd`"
39+
cd "`dirname \"$PRG\"`/" >/dev/null
40+
APP_HOME="`pwd -P`"
41+
cd "$SAVED" >/dev/null
1142

1243
APP_NAME="Gradle"
1344
APP_BASE_NAME=`basename "$0"`
1445

46+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48+
1549
# Use the maximum available, or set MAX_FD != -1 to use that value.
1650
MAX_FD="maximum"
1751

18-
warn ( ) {
52+
warn () {
1953
echo "$*"
2054
}
2155

22-
die ( ) {
56+
die () {
2357
echo
2458
echo "$*"
2559
echo
@@ -30,6 +64,7 @@ die ( ) {
3064
cygwin=false
3165
msys=false
3266
darwin=false
67+
nonstop=false
3368
case "`uname`" in
3469
CYGWIN* )
3570
cygwin=true
@@ -40,26 +75,11 @@ case "`uname`" in
4075
MINGW* )
4176
msys=true
4277
;;
78+
NONSTOP* )
79+
nonstop=true
80+
;;
4381
esac
4482

45-
# Attempt to set APP_HOME
46-
# Resolve links: $0 may be a link
47-
PRG="$0"
48-
# Need this for relative symlinks.
49-
while [ -h "$PRG" ] ; do
50-
ls=`ls -ld "$PRG"`
51-
link=`expr "$ls" : '.*-> \(.*\)$'`
52-
if expr "$link" : '/.*' > /dev/null; then
53-
PRG="$link"
54-
else
55-
PRG=`dirname "$PRG"`"/$link"
56-
fi
57-
done
58-
SAVED="`pwd`"
59-
cd "`dirname \"$PRG\"`/" >/dev/null
60-
APP_HOME="`pwd -P`"
61-
cd "$SAVED" >/dev/null
62-
6383
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6484

6585
# Determine the Java command to use to start the JVM.
@@ -85,7 +105,7 @@ location of your Java installation."
85105
fi
86106

87107
# Increase the maximum file descriptors if we can.
88-
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
108+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
89109
MAX_FD_LIMIT=`ulimit -H -n`
90110
if [ $? -eq 0 ] ; then
91111
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -150,11 +170,19 @@ if $cygwin ; then
150170
esac
151171
fi
152172

153-
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154-
function splitJvmOpts() {
155-
JVM_OPTS=("$@")
173+
# Escape application args
174+
save () {
175+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176+
echo " "
156177
}
157-
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158-
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
178+
APP_ARGS=$(save "$@")
179+
180+
# Collect all arguments for the java command, following the shell quoting and substitution rules
181+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182+
183+
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184+
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185+
cd "$(dirname "$0")"
186+
fi
159187

160-
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
188+
exec "$JAVACMD" "$@"

0 commit comments

Comments
 (0)