diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml
index cb1de7b..fa116e4 100644
--- a/.github/workflows/flutter.yml
+++ b/.github/workflows/flutter.yml
@@ -7,11 +7,10 @@ on:
branches:
- develop
- master
- - 2x
+ - release/*
pull_request:
branches:
- develop
- - 2x
# on: push # Default will running for every branch.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7e34329..a126c57 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 2.5.0 [2022-03-18]
+* [修复] `splashButtonType` 新版 SKD 不存在的问题 [#20](https://github.com/FlutterAds/flutter_pangle_ads/issues/20)
+* 升级 iOS SDK 到 `v4.3.0.4`
+* 升级 Android SDK 到 Pro 版 `v4.3.0.8`
+
## 2.4.0 [2021-11-30]
* [新增] 信息流广告类型
* 升级 Android SDK 到 Pro 版 `v4.0.2.2`
diff --git a/README.md b/README.md
index 0b4f743..f695038 100644
--- a/README.md
+++ b/README.md
@@ -4,10 +4,9 @@
一款优质的 Flutter 广告插件(字节跳动、穿山甲)
-
-
+
-
+
@@ -39,8 +38,7 @@
``` Dart
dependencies:
- flutter_pangle_ads: ^1.4.0 # 非 Null Safety 版本
- flutter_pangle_ads: ^2.4.0 # Null Safety 版本
+ flutter_pangle_ads: ^2.5.0
```
### 初始化广告
@@ -60,12 +58,10 @@ FlutterPangleAds.initAd(appId);
/// [posId] 广告位 id
/// [logo] 如果传值则展示底部logo,不传不展示,则全屏展示
/// [timeout] 加载超时时间
-/// [buttonType] 开屏广告的点击区域,1:全都可以点击 2:仅有下载 Bar 区域可以点击
FlutterPangleAds.showSplashAd(
posId,
logo: 'flutterads_logo',
timeout: 3.5,
- buttonType: 2,
);
```
diff --git a/android/build.gradle b/android/build.gradle
index 8b5ee3c..02f9efe 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -39,5 +39,5 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
// 广告 SDK
- implementation 'com.pangle.cn:ads-sdk-pro:4.0.2.2'
+ implementation 'com.pangle.cn:ads-sdk-pro:4.3.0.8'
}
diff --git a/android/src/main/java/com/zero/flutter_pangle_ads/PluginDelegate.java b/android/src/main/java/com/zero/flutter_pangle_ads/PluginDelegate.java
index 9d1f0eb..1451853 100644
--- a/android/src/main/java/com/zero/flutter_pangle_ads/PluginDelegate.java
+++ b/android/src/main/java/com/zero/flutter_pangle_ads/PluginDelegate.java
@@ -54,8 +54,6 @@ public static PluginDelegate getInstance() {
public static final String KEY_LOGO = "logo";
// timeout 参数
public static final String KEY_TIMEOUT = "timeout";
- // splashButtonType 参数
- public static final String KEY_SPLASH_BUTTON_TYPE = "buttonType";
/**
* 插件代理构造函数构造函数
@@ -221,12 +219,10 @@ public void showSplashAd(MethodCall call, MethodChannel.Result result) {
String posId = call.argument(KEY_POSID);
String logo = call.argument(KEY_LOGO);
double timeout = call.argument(KEY_TIMEOUT);
- int buttonType = call.argument(KEY_SPLASH_BUTTON_TYPE);
Intent intent = new Intent(activity, AdSplashActivity.class);
intent.putExtra(KEY_POSID, posId);
intent.putExtra(KEY_LOGO, logo);
intent.putExtra(KEY_TIMEOUT, timeout);
- intent.putExtra(KEY_SPLASH_BUTTON_TYPE, buttonType);
activity.startActivity(intent);
// 设置进入动画
activity.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
diff --git a/android/src/main/java/com/zero/flutter_pangle_ads/page/AdSplashActivity.java b/android/src/main/java/com/zero/flutter_pangle_ads/page/AdSplashActivity.java
index 60a5d0d..4291823 100644
--- a/android/src/main/java/com/zero/flutter_pangle_ads/page/AdSplashActivity.java
+++ b/android/src/main/java/com/zero/flutter_pangle_ads/page/AdSplashActivity.java
@@ -61,7 +61,6 @@ private void initData() {
// 获取参数
posId = getIntent().getStringExtra(PluginDelegate.KEY_POSID);
String logo = getIntent().getStringExtra(PluginDelegate.KEY_LOGO);
- int buttonType = getIntent().getIntExtra(PluginDelegate.KEY_SPLASH_BUTTON_TYPE, TTAdConstant.SPLASH_BUTTON_TYPE_FULL_SCREEN);
double timeout = getIntent().getDoubleExtra(PluginDelegate.KEY_TIMEOUT, 3.5);
int absTimeout = (int) (timeout * 1000);
// 判断是否有 Logo
@@ -92,7 +91,6 @@ private void initData() {
.setCodeId(posId)
.setSupportDeepLink(true)
.setImageAcceptedSize(width, height)
- .setSplashButtonType(buttonType)
.build();
// 加载广告
splashAD.loadSplashAd(adSlot, this, absTimeout);
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index b1693d5..187dd90 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -26,7 +26,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 29
- ndkVersion "21.4.7075529"
+ ndkVersion "21.4.7075529" // 本地跑时可以去掉,CI 需要指定
lintOptions {
disable 'InvalidPackage'
}
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index 8064728..3ebb275 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -4,7 +4,7 @@ description: FlutterAds 穿山甲广告 SDK 插件示例
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: "none" # Remove this line if you wish to publish to pub.dev
-version: 2.4.0+12
+version: 2.5.0+14
environment:
sdk: ">=2.12.0 <3.0.0"
diff --git a/ios/Classes/Page/SplashPage.m b/ios/Classes/Page/SplashPage.m
index ca0377a..8a0ec52 100644
--- a/ios/Classes/Page/SplashPage.m
+++ b/ios/Classes/Page/SplashPage.m
@@ -13,13 +13,11 @@ @implementation SplashPage
-(void)loadAd:(FlutterMethodCall *)call{
NSString* logo=call.arguments[@"logo"];
double timeout=[call.arguments[@"timeout"] doubleValue];
- int buttonType=[call.arguments[@"buttonType"] intValue];
// 开屏页面
SplashViewController *svc=[[SplashViewController alloc] init];
svc.posId=self.posId;
svc.logo=logo;
svc.timeout=timeout;
- svc.buttonType=buttonType;
svc.sp=self;
//设置全屏
svc.modalPresentationStyle = UIModalPresentationFullScreen;
diff --git a/ios/Classes/Page/SplashViewController.h b/ios/Classes/Page/SplashViewController.h
index 31b749e..a25394d 100644
--- a/ios/Classes/Page/SplashViewController.h
+++ b/ios/Classes/Page/SplashViewController.h
@@ -18,7 +18,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,copy) NSString *posId;
@property (nonatomic,copy) NSString *logo;
@property double timeout;
-@property int buttonType;
@end
NS_ASSUME_NONNULL_END
diff --git a/ios/flutter_pangle_ads.podspec b/ios/flutter_pangle_ads.podspec
index 5af4bed..bcfa227 100644
--- a/ios/flutter_pangle_ads.podspec
+++ b/ios/flutter_pangle_ads.podspec
@@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'flutter_pangle_ads'
- s.version = '2.4.0'
+ s.version = '2.5.0'
s.summary = '一款优质的 Flutter 广告插件(字节跳动、穿山甲)'
s.description = <<-DESC
FlutterAds 致力于构建优质的 Flutter 广告插件
diff --git a/lib/flutter_pangle_ads.dart b/lib/flutter_pangle_ads.dart
index a8afe33..0599a80 100644
--- a/lib/flutter_pangle_ads.dart
+++ b/lib/flutter_pangle_ads.dart
@@ -68,16 +68,14 @@ class FlutterPangleAds {
/// [posId] 广告位 id
/// [logo] 如果传值则展示底部logo,不传不展示,则全屏展示
/// [timeout] 加载超时时间
- /// [buttonType] 开屏广告的点击区域,1:全都可以点击 2:仅有下载 Bar 区域可以点击。具体参考:https://www.csjplatform.com/support/doc/611f0f0c1b039f004611e4da
static Future showSplashAd(String posId,
- {String? logo, double timeout = 3.5, int buttonType = 1}) async {
+ {String? logo, double timeout = 3.5}) async {
final bool result = await _methodChannel.invokeMethod(
'showSplashAd',
{
'posId': posId,
'logo': logo,
'timeout': timeout,
- 'buttonType': buttonType,
},
);
return result;
diff --git a/pubspec.yaml b/pubspec.yaml
index 5aa75c3..ae949e4 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: flutter_pangle_ads
description: 一款优质的 Flutter 广告插件(字节跳动、穿山甲)
-version: 2.4.0
+version: 2.5.0
homepage: https://github.com/FlutterAds
environment: