Skip to content

Commit 94805e2

Browse files
committed
Merge branch 'release/2.6.1'
2 parents ca2d21a + c6aa9c8 commit 94805e2

File tree

10 files changed

+38
-61
lines changed

10 files changed

+38
-61
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.6.1 [2022-09-06]
2+
* [修复] iOS 开屏广告点击后不跳转的问题
3+
* [修复] Android 激励视频通知两次激励的问题
4+
15
## 2.6.0 [2022-09-02]
26
* [升级] 适配 4700 SDK 版本[#30](https://github.com/FlutterAds/flutter_pangle_ads/issues/30)
37
* [新增] 新增进阶激励视频支持[#31](https://github.com/FlutterAds/flutter_pangle_ads/issues/31)

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<h3 align="center">一款优质的 Flutter 广告插件(字节跳动、巨量引擎、穿山甲)</h3>
55

66
<p align="center">
7-
<a href="https://pub.dev/packages/flutter_pangle_ads"><img src=https://img.shields.io/badge/pub-v2.6.0-success></a>
7+
<a href="https://pub.dev/packages/flutter_pangle_ads"><img src=https://img.shields.io/badge/pub-v2.6.1-success></a>
88
<a href="https://github.com/FlutterAds/flutter_pangle_ads"><img src=https://img.shields.io/badge/platform-iOS%20%7C%20Android-brightgreen></a>
99
<a href="https://github.com/FlutterAds/flutter_pangle_ads/actions/workflows/flutter.yml"><img src="https://github.com/FlutterAds/flutter_pangle_ads/actions/workflows/flutter.yml/badge.svg"></a>
1010
<a href="https://github.com/FlutterAds/flutter_pangle_ads"><img src=https://img.shields.io/github/stars/FlutterAds/flutter_pangle_ads?color=brightgreen></a>
@@ -40,7 +40,7 @@
4040

4141
``` Dart
4242
dependencies:
43-
flutter_pangle_ads: ^2.6.0
43+
flutter_pangle_ads: ^2.6.1
4444
```
4545
### 初始化广告
4646

@@ -53,6 +53,12 @@ FlutterPangleAds.initAd(appId);
5353

5454
### 开屏广告
5555

56+
- 全屏
57+
``` Dart
58+
/// [posId] 广告位 id
59+
FlutterPangleAds.showSplashAd(posId);
60+
```
61+
5662
- 半屏广告 + Logo
5763
- [Logo 设置的最佳实践](https://github.com/FlutterAds/flutter_qq_ads/blob/develop/doc/SETTING_LOGO.md)
5864

@@ -67,20 +73,10 @@ FlutterPangleAds.showSplashAd(
6773
);
6874
```
6975

70-
- 全屏开屏广告
71-
``` Dart
72-
FlutterQqAds.showSplashAd(posId);
73-
```
7476
### 新插屏广告
7577
``` Dart
7678
/// [posId] 广告位 id
77-
/// [width] 请求模板广告素材的尺寸宽度(对应 expressViewWidth 参数)
78-
/// [height] 请求模板广告素材的尺寸高度(对应 expressViewWidth 参数)
79-
FlutterPangleAds.showInterstitialAd(
80-
AdsConfig.interstitialId,
81-
width: 300,
82-
height: 300,
83-
);
79+
FlutterPangleAds.showFullScreenVideoAd(AdsConfig.newInterstitialId);
8480
```
8581

8682
### 激励视频
@@ -168,12 +164,18 @@ AdFeedWidget(
168164
```
169165
> `width``height` 需要根据你新建广告位的模板来设置
170166
171-
### 全屏视频(已废弃)
167+
### 旧插屏广告(已废弃)
172168
> 建议使用新插屏
173169
174170
``` Dart
175171
/// [posId] 广告位 id
176-
FlutterPangleAds.showFullScreenVideoAd(AdsConfig.fullScreenVideoId);
172+
/// [width] 请求模板广告素材的尺寸宽度(对应 expressViewWidth 参数)
173+
/// [height] 请求模板广告素材的尺寸高度(对应 expressViewWidth 参数)
174+
FlutterPangleAds.showInterstitialAd(
175+
AdsConfig.interstitialId,
176+
width: 300,
177+
height: 300,
178+
);
177179
```
178180

179181

android/src/main/java/com/zero/flutter_pangle_ads/page/RewardVideoPage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ public void onRewardVerify(boolean rewardVerify, int rewardAmount, String reward
113113
String logString ="verify:" + rewardVerify + " amount:" + rewardAmount +
114114
" name:" + rewardName + " errorCode:" + code + " errorMsg:" + msg;
115115
Log.e(TAG, "onRewardVerify " + logString);
116-
sendEvent(new AdRewardEvent(posId,0, rewardVerify, rewardAmount, rewardName, code, msg, customData, userId));
116+
// sendEvent(new AdRewardEvent(posId,0, rewardVerify, rewardAmount, rewardName, code, msg, customData, userId));
117117
}
118118

119119
@Override
120120
public void onRewardArrived(boolean isRewardValid, int rewardType, Bundle extraInfo) {
121121
RewardBundleModel rewardBundleModel = new RewardBundleModel(extraInfo);
122122
String logString = "rewardType:"+rewardType+" verify:" + isRewardValid + " amount:" + rewardBundleModel.getRewardAmount() +
123123
" name:" + rewardBundleModel.getRewardName() + " errorCode:" + rewardBundleModel.getServerErrorCode() + " errorMsg:" + rewardBundleModel.getServerErrorMsg();
124-
Log.e(TAG, "onRewardVerify " + logString);
124+
Log.e(TAG, "onRewardArrived " + logString);
125125
sendEvent(new AdRewardEvent(posId,rewardType, isRewardValid, rewardBundleModel.getRewardAmount(), rewardBundleModel.getRewardName(), rewardBundleModel.getServerErrorCode(), rewardBundleModel.getServerErrorMsg(), customData, userId));
126126
}
127127

example/android/app/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2626

2727
android {
2828
compileSdkVersion 31
29-
// ndkVersion "23.2.8568313" // 本地跑时可以去掉,CI 需要指定
3029
lintOptions {
3130
disable 'InvalidPackage'
3231
}
3332

3433
defaultConfig {
35-
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
3634
applicationId "com.zero.flutter_pangle_ads_example"
3735
minSdkVersion 19
3836
targetSdkVersion 31
@@ -43,8 +41,6 @@ android {
4341

4442
buildTypes {
4543
release {
46-
// TODO: Add your own signing config for the release build.
47-
// Signing with the debug keys for now, so `flutter run --release` works.
4844
signingConfig signingConfigs.debug
4945
}
5046
}

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@
380380
"$(inherited)",
381381
"$(PROJECT_DIR)/Flutter",
382382
);
383-
PRODUCT_BUNDLE_IDENTIFIER = com.zero.flutterPangleAdsExample;
383+
PRODUCT_BUNDLE_IDENTIFIER = com.zero.flutterPangleAdsExample1;
384384
PRODUCT_NAME = "$(TARGET_NAME)";
385385
VERSIONING_SYSTEM = "apple-generic";
386386
};
@@ -512,7 +512,7 @@
512512
"$(inherited)",
513513
"$(PROJECT_DIR)/Flutter",
514514
);
515-
PRODUCT_BUNDLE_IDENTIFIER = com.zero.flutterPangleAdsExample;
515+
PRODUCT_BUNDLE_IDENTIFIER = com.zero.flutterPangleAdsExample1;
516516
PRODUCT_NAME = "$(TARGET_NAME)";
517517
VERSIONING_SYSTEM = "apple-generic";
518518
};
@@ -539,7 +539,7 @@
539539
"$(inherited)",
540540
"$(PROJECT_DIR)/Flutter",
541541
);
542-
PRODUCT_BUNDLE_IDENTIFIER = com.zero.flutterPangleAdsExample;
542+
PRODUCT_BUNDLE_IDENTIFIER = com.zero.flutterPangleAdsExample1;
543543
PRODUCT_NAME = "$(TARGET_NAME)";
544544
VERSIONING_SYSTEM = "apple-generic";
545545
};

example/ios/Runner/Info.plist

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>NSAppTransportSecurity</key>
6-
<dict>
7-
<key>NSAllowsArbitraryLoads</key>
8-
<true/>
9-
</dict>
10-
<key>NSUserTrackingUsageDescription</key>
11-
<string>为了向您提供更优质、安全的个性化服务及内容,需要您允许使用相关权限</string>
5+
<key>CADisableMinimumFrameDurationOnPhone</key>
6+
<true/>
127
<key>CFBundleDevelopmentRegion</key>
138
<string>$(DEVELOPMENT_LANGUAGE)</string>
149
<key>CFBundleExecutable</key>
@@ -29,6 +24,13 @@
2924
<string>$(FLUTTER_BUILD_NUMBER)</string>
3025
<key>LSRequiresIPhoneOS</key>
3126
<true/>
27+
<key>NSAppTransportSecurity</key>
28+
<dict>
29+
<key>NSAllowsArbitraryLoads</key>
30+
<true/>
31+
</dict>
32+
<key>NSUserTrackingUsageDescription</key>
33+
<string>为了向您提供更优质、安全的个性化服务及内容,需要您允许使用相关权限</string>
3234
<key>UILaunchStoryboardName</key>
3335
<string>LaunchScreen</string>
3436
<key>UIMainStoryboardFile</key>
@@ -48,7 +50,5 @@
4850
</array>
4951
<key>UIViewControllerBasedStatusBarAppearance</key>
5052
<false/>
51-
<key>CADisableMinimumFrameDurationOnPhone</key>
52-
<true/>
5353
</dict>
5454
</plist>

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: FlutterAds 穿山甲广告 SDK 插件示例
44
# The following line prevents the package from being accidentally published to
55
# pub.dev using `pub publish`. This is preferred for private packages.
66
publish_to: "none" # Remove this line if you wish to publish to pub.dev
7-
version: 2.6.0+16
7+
version: 2.6.1+16
88

99
environment:
1010
sdk: ">=2.12.0 <3.0.0"

ios/Classes/Page/SplashViewController.m

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77

88
#import "SplashViewController.h"
99

10-
@interface SplashViewController ()
11-
12-
@end
13-
1410
@implementation SplashViewController
1511

1612
- (void)viewDidLoad {
@@ -103,27 +99,6 @@ - (void)splashAdDidClick:(BUSplashAd *)splashAd {
10399
NSLog(@"%s",__FUNCTION__);
104100
// 发送广告事件
105101
[self.sp sendEventAction:onAdClicked];
106-
[self dismissPage];
107102
}
108103

109-
//- (void)splashAdDidClickSkip:(BUSplashAd *)splashAd {
110-
// NSLog(@"%s",__FUNCTION__);
111-
// [self dismissPage];
112-
// // 发送广告事件
113-
// [self.sp sendEventAction:onAdSkip];
114-
//}
115-
116-
//- (void)splashAdDidCloseOtherController:(BUSplashAd *)splashAd interactionType:(BUInteractionType)interactionType{
117-
// NSLog(@"%s",__FUNCTION__);
118-
// [self dismissPage];
119-
//}
120-
//
121-
//- (void)splashAdCountdownToZero:(BUSplashAd *)splashAd {
122-
// NSLog(@"%s",__FUNCTION__);
123-
// [self dismissPage];
124-
// // 发送广告事件
125-
// [self.sp sendEventAction:onAdComplete];
126-
//}
127-
128-
129104
@end

ios/flutter_pangle_ads.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
Pod::Spec.new do |s|
66
s.name = 'flutter_pangle_ads'
7-
s.version = '2.6.0'
7+
s.version = '2.6.1'
88
s.summary = '一款优质的 Flutter 广告插件(字节跳动、穿山甲)'
99
s.description = <<-DESC
1010
FlutterAds 致力于构建优质的 Flutter 广告插件

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_pangle_ads
22
description: 一款优质的 Flutter 广告插件(字节跳动、穿山甲)
3-
version: 2.6.0
3+
version: 2.6.1
44
homepage: https://github.com/FlutterAds
55

66
environment:

0 commit comments

Comments
 (0)