diff --git a/CHANGELOG.md b/CHANGELOG.md index 4783548..ec94a0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/README.md b/README.md index efc91af..da0cc59 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

一款优质的 Flutter 广告插件(字节跳动、巨量引擎、穿山甲)

- + @@ -40,7 +40,7 @@ ``` Dart dependencies: - flutter_pangle_ads: ^2.6.0 + flutter_pangle_ads: ^2.6.1 ``` ### 初始化广告 @@ -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) @@ -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); ``` ### 激励视频 @@ -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, +); ``` diff --git a/android/src/main/java/com/zero/flutter_pangle_ads/page/RewardVideoPage.java b/android/src/main/java/com/zero/flutter_pangle_ads/page/RewardVideoPage.java index 4e47ee1..070e20f 100644 --- a/android/src/main/java/com/zero/flutter_pangle_ads/page/RewardVideoPage.java +++ b/android/src/main/java/com/zero/flutter_pangle_ads/page/RewardVideoPage.java @@ -113,7 +113,7 @@ 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 @@ -121,7 +121,7 @@ public void onRewardArrived(boolean isRewardValid, int rewardType, Bundle extraI 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)); } diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index e6527be..3ce82b9 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -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 @@ -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 } } diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 42f08df..901abd0 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -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"; }; @@ -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"; }; @@ -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"; }; diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist index 827a391..7b5946f 100644 --- a/example/ios/Runner/Info.plist +++ b/example/ios/Runner/Info.plist @@ -2,13 +2,8 @@ - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - NSUserTrackingUsageDescription - 为了向您提供更优质、安全的个性化服务及内容,需要您允许使用相关权限 + CADisableMinimumFrameDurationOnPhone + CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable @@ -29,6 +24,13 @@ $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSUserTrackingUsageDescription + 为了向您提供更优质、安全的个性化服务及内容,需要您允许使用相关权限 UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -48,7 +50,5 @@ UIViewControllerBasedStatusBarAppearance - CADisableMinimumFrameDurationOnPhone - diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 6a285b6..c5312f5 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.6.0+16 +version: 2.6.1+16 environment: sdk: ">=2.12.0 <3.0.0" diff --git a/ios/Classes/Page/SplashViewController.m b/ios/Classes/Page/SplashViewController.m index cccd52b..5548012 100644 --- a/ios/Classes/Page/SplashViewController.m +++ b/ios/Classes/Page/SplashViewController.m @@ -7,10 +7,6 @@ #import "SplashViewController.h" -@interface SplashViewController () - -@end - @implementation SplashViewController - (void)viewDidLoad { @@ -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 diff --git a/ios/flutter_pangle_ads.podspec b/ios/flutter_pangle_ads.podspec index 6d534c3..36fd70e 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.6.0' + s.version = '2.6.1' s.summary = '一款优质的 Flutter 广告插件(字节跳动、穿山甲)' s.description = <<-DESC FlutterAds 致力于构建优质的 Flutter 广告插件 diff --git a/pubspec.yaml b/pubspec.yaml index f888d4a..e5d7810 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_pangle_ads description: 一款优质的 Flutter 广告插件(字节跳动、穿山甲) -version: 2.6.0 +version: 2.6.1 homepage: https://github.com/FlutterAds environment: