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 @@
-
+
@@ -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 @@