Skip to content

Commit e54e0ae

Browse files
committed
2.3.0 fix auto import
1 parent 03a787f commit e54e0ae

38 files changed

+899
-42
lines changed

Assets/DemoUI/mainUI.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Collections;
1+
using System.Collections;
22
using System.Collections.Generic;
33
using UnityEngine;
44
using UnityEngine.UI;
@@ -70,6 +70,10 @@ void Start () {
7070
Debug.Log ("OneWaySDK RewardedAd Close for tag: " + tag +" state is: " + state);
7171
};
7272

73+
OneWaySDK.onRewardedAdFinishEvent += ( tag ,state, sessionId) =>{
74+
Debug.Log ("OneWaySDK RewardedAd Finish for tag: " + tag +" state is: " + state +" sessionId is: " + sessionId);
75+
};
76+
7377

7478

7579

Assets/Plugins/Android/OneWaySDK-jar/AndroidManifest.xml

+19-6
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,29 @@ required for displaying ads.
88
package="mobi.oneway.sdk"
99
android:versionName="1.0"
1010
android:versionCode="1">
11-
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
12-
<uses-permission android:name="android.permission.INTERNET" />
13-
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
14-
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
15-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
11+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
12+
<uses-permission android:name="android.permission.INTERNET" />
13+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
14+
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
15+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
16+
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
1617
<application>
1718
<activity
1819
android:name="mobi.oneway.sdk.AdShowActivity"
19-
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
20+
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
2021
android:hardwareAccelerated="true"
2122
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
23+
24+
<provider
25+
android:name="mobi.oneway.sdk.common.OWProvider"
26+
android:authorities="${applicationId}.provider"
27+
android:exported="false"
28+
android:grantUriPermissions="true">
29+
<!--元数据-->
30+
<meta-data
31+
android:name="android.support.FILE_PROVIDER_PATHS"
32+
android:resource="@xml/ow_file_paths" />
33+
</provider>
34+
2235
</application>
2336
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
buildscript {
2+
repositories {
3+
google()
4+
jcenter()
5+
}
6+
dependencies {
7+
classpath 'com.android.tools.build:gradle:3.2.0'
8+
}
9+
}
10+
11+
apply plugin: 'android-library'
12+
13+
dependencies {
14+
implementation fileTree(dir: 'bin', include: ['*.jar'])
15+
implementation fileTree(dir: 'libs', include: ['*.jar'])
16+
implementation fileTree(dir: 'libs', include: ['*.jar'])
17+
implementation 'com.android.support:appcompat-v7:28.0.0'
18+
19+
implementation 'com.liulishuo.okdownload:okdownload:1.0.3'
20+
implementation 'com.liulishuo.okdownload:sqlite:1.0.3'
21+
implementation 'com.liulishuo.okdownload:okhttp:1.0.3'
22+
23+
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
24+
}
25+
26+
android {
27+
sourceSets {
28+
main {
29+
manifest.srcFile 'AndroidManifest.xml'
30+
//java.srcDirs = ['src']
31+
res.srcDirs = ['res']
32+
assets.srcDirs = ['assets']
33+
jniLibs.srcDirs = ['libs']
34+
}
35+
}
36+
37+
compileSdkVersion 28
38+
buildToolsVersion '28.0.3'
39+
defaultConfig {
40+
targetSdkVersion 26
41+
}
42+
43+
lintOptions {
44+
abortOnError false
45+
}
46+
}
47+

Assets/Plugins/Android/OneWaySDK-jar/libs/OnewaySdk-2.1.0_release.jar.meta Assets/Plugins/Android/OneWaySDK-jar/build.gradle.meta

+1-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

Assets/Plugins/Android/OneWaySDK-jar/libs/OneWaySdkPlugin.jar.meta

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Binary file not shown.

Assets/Plugins/Android/OneWaySDK-jar/libs/OnewaySdk-2.3.0_release.jar.meta

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
target=android-19
1+
target=android-26
22
android.library=true

Assets/Plugins/Android/OneWaySDK-jar/res.meta

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Plugins/Android/OneWaySDK-jar/res/xml.meta

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<paths>
4+
<!--
5+
主要用于在 7.0 以上系统上调起安装。 apk 下载目录会依次尝试获取
6+
系统下载目录(sdcard/Download) -> App 外部目录(files, cache) -> App 内部目录 (files, cache)
7+
-->
8+
<files-path
9+
name="files"
10+
path="" />
11+
<external-path
12+
name="sdcard"
13+
path="" />
14+
<cache-path
15+
name="cache"
16+
path="" />
17+
<external-files-path
18+
name="exFiles"
19+
path="" />
20+
<external-cache-path
21+
name="exCache"
22+
path="" />
23+
</paths>
24+
</resources>

Assets/Plugins/Android/OneWaySDK-jar/res/xml/ow_file_paths.xml.meta

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Plugins/OneWaySDK/OneWaySDK.cs

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using UnityEngine;
1+
using UnityEngine;
22
using System.Collections;
33
using System.Runtime.InteropServices;
44
using System;
@@ -128,6 +128,7 @@ public static void noop(){}
128128
public static event Action <string> onRewardedAdShowEvent;
129129
public static event Action <string> onRewardedAdClickEvent;
130130
public static event Action <string,string> onRewardedAdCloseEvent;
131+
public static event Action <string,string,string> onRewardedAdFinishEvent;
131132

132133
//InterstitialAd
133134
public static event Action onInterstitialAdReadyEvent;
@@ -181,6 +182,16 @@ void onRewardedAdClose (string info) {
181182
}
182183
}
183184

185+
//finish
186+
void onRewardedAdFinish (string info) {
187+
Dictionary<string,object> attrs = (Dictionary<string,object>) MiniJSONV.Json.Deserialize(info);
188+
try{
189+
onRewardedAdFinishEvent(attrs["tag"].ToString(),attrs["state"].ToString(),attrs["sessionId"].ToString());
190+
}catch(Exception e){
191+
Debug.LogWarning("-------------- OneWaySDK Warning : Method 'onRewardedAdFinishEvent' not implemented --------------\n" + e.Message);
192+
}
193+
}
194+
184195

185196

186197
//InterstitialAd

Assets/Plugins/OneWaySDK/iOS/OWAdsBase.h.meta

+81-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Plugins/OneWaySDK/iOS/OWInterstitialAd.h

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
- (void)oneWaySDKInterstitialAdDidShow:(NSString *)tag;
1616

17+
- (void)oneWaySDKInterstitialAdDidFinish:(NSString *)tag withState:(NSNumber *)state session:(NSString *)session;
18+
1719
- (void)oneWaySDKInterstitialAdDidClose:(NSString *)tag withState:(NSNumber *)state;
1820

1921
- (void)oneWaySDKInterstitialAdDidClick:(NSString *)tag;

0 commit comments

Comments
 (0)