Skip to content

Commit

Permalink
Merge branch 'release/2.6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
BytesZero committed Sep 6, 2022
2 parents ca2d21a + c6aa9c8 commit 94805e2
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 61 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.6.1 [2022-09-06]
* [修复] iOS 开屏广告点击后不跳转的问题
* [修复] Android 激励视频通知两次激励的问题

## 2.6.0 [2022-09-02]
* [升级] 适配 4700 SDK 版本[#30](https://github.com/FlutterAds/flutter_pangle_ads/issues/30)
* [新增] 新增进阶激励视频支持[#31](https://github.com/FlutterAds/flutter_pangle_ads/issues/31)
Expand Down
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h3 align="center">一款优质的 Flutter 广告插件(字节跳动、巨量引擎、穿山甲)</h3>

<p align="center">
<a href="https://pub.dev/packages/flutter_pangle_ads"><img src=https://img.shields.io/badge/pub-v2.6.0-success></a>
<a href="https://pub.dev/packages/flutter_pangle_ads"><img src=https://img.shields.io/badge/pub-v2.6.1-success></a>
<a href="https://github.com/FlutterAds/flutter_pangle_ads"><img src=https://img.shields.io/badge/platform-iOS%20%7C%20Android-brightgreen></a>
<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>
<a href="https://github.com/FlutterAds/flutter_pangle_ads"><img src=https://img.shields.io/github/stars/FlutterAds/flutter_pangle_ads?color=brightgreen></a>
Expand Down Expand Up @@ -40,7 +40,7 @@

``` Dart
dependencies:
flutter_pangle_ads: ^2.6.0
flutter_pangle_ads: ^2.6.1
```
### 初始化广告

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

### 开屏广告

- 全屏
``` Dart
/// [posId] 广告位 id
FlutterPangleAds.showSplashAd(posId);
```

- 半屏广告 + Logo
- [Logo 设置的最佳实践](https://github.com/FlutterAds/flutter_qq_ads/blob/develop/doc/SETTING_LOGO.md)

Expand All @@ -67,20 +73,10 @@ FlutterPangleAds.showSplashAd(
);
```

- 全屏开屏广告
``` Dart
FlutterQqAds.showSplashAd(posId);
```
### 新插屏广告
``` Dart
/// [posId] 广告位 id
/// [width] 请求模板广告素材的尺寸宽度(对应 expressViewWidth 参数)
/// [height] 请求模板广告素材的尺寸高度(对应 expressViewWidth 参数)
FlutterPangleAds.showInterstitialAd(
AdsConfig.interstitialId,
width: 300,
height: 300,
);
FlutterPangleAds.showFullScreenVideoAd(AdsConfig.newInterstitialId);
```

### 激励视频
Expand Down Expand Up @@ -168,12 +164,18 @@ AdFeedWidget(
```
> `width``height` 需要根据你新建广告位的模板来设置
### 全屏视频(已废弃)
### 旧插屏广告(已废弃)
> 建议使用新插屏
``` Dart
/// [posId] 广告位 id
FlutterPangleAds.showFullScreenVideoAd(AdsConfig.fullScreenVideoId);
/// [width] 请求模板广告素材的尺寸宽度(对应 expressViewWidth 参数)
/// [height] 请求模板广告素材的尺寸高度(对应 expressViewWidth 参数)
FlutterPangleAds.showInterstitialAd(
AdsConfig.interstitialId,
width: 300,
height: 300,
);
```


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ public void onRewardVerify(boolean rewardVerify, int rewardAmount, String reward
String logString ="verify:" + rewardVerify + " amount:" + rewardAmount +
" name:" + rewardName + " errorCode:" + code + " errorMsg:" + msg;
Log.e(TAG, "onRewardVerify " + logString);
sendEvent(new AdRewardEvent(posId,0, rewardVerify, rewardAmount, rewardName, code, msg, customData, userId));
// sendEvent(new AdRewardEvent(posId,0, rewardVerify, rewardAmount, rewardName, code, msg, customData, userId));
}

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

Expand Down
4 changes: 0 additions & 4 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 31
// ndkVersion "23.2.8568313" // 本地跑时可以去掉,CI 需要指定
lintOptions {
disable 'InvalidPackage'
}

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

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
Expand Down
6 changes: 3 additions & 3 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.zero.flutterPangleAdsExample;
PRODUCT_BUNDLE_IDENTIFIER = com.zero.flutterPangleAdsExample1;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
Expand Down Expand Up @@ -512,7 +512,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.zero.flutterPangleAdsExample;
PRODUCT_BUNDLE_IDENTIFIER = com.zero.flutterPangleAdsExample1;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
Expand All @@ -539,7 +539,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.zero.flutterPangleAdsExample;
PRODUCT_BUNDLE_IDENTIFIER = com.zero.flutterPangleAdsExample1;
PRODUCT_NAME = "$(TARGET_NAME)";
VERSIONING_SYSTEM = "apple-generic";
};
Expand Down
18 changes: 9 additions & 9 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSUserTrackingUsageDescription</key>
<string>为了向您提供更优质、安全的个性化服务及内容,需要您允许使用相关权限</string>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand All @@ -29,6 +24,13 @@
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSUserTrackingUsageDescription</key>
<string>为了向您提供更优质、安全的个性化服务及内容,需要您允许使用相关权限</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand All @@ -48,7 +50,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.6.0+16
version: 2.6.1+16

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
25 changes: 0 additions & 25 deletions ios/Classes/Page/SplashViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@

#import "SplashViewController.h"

@interface SplashViewController ()

@end

@implementation SplashViewController

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

//- (void)splashAdDidClickSkip:(BUSplashAd *)splashAd {
// NSLog(@"%s",__FUNCTION__);
// [self dismissPage];
// // 发送广告事件
// [self.sp sendEventAction:onAdSkip];
//}

//- (void)splashAdDidCloseOtherController:(BUSplashAd *)splashAd interactionType:(BUInteractionType)interactionType{
// NSLog(@"%s",__FUNCTION__);
// [self dismissPage];
//}
//
//- (void)splashAdCountdownToZero:(BUSplashAd *)splashAd {
// NSLog(@"%s",__FUNCTION__);
// [self dismissPage];
// // 发送广告事件
// [self.sp sendEventAction:onAdComplete];
//}


@end
2 changes: 1 addition & 1 deletion ios/flutter_pangle_ads.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'flutter_pangle_ads'
s.version = '2.6.0'
s.version = '2.6.1'
s.summary = '一款优质的 Flutter 广告插件(字节跳动、穿山甲)'
s.description = <<-DESC
FlutterAds 致力于构建优质的 Flutter 广告插件
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_pangle_ads
description: 一款优质的 Flutter 广告插件(字节跳动、穿山甲)
version: 2.6.0
version: 2.6.1
homepage: https://github.com/FlutterAds

environment:
Expand Down

0 comments on commit 94805e2

Please sign in to comment.