diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index 7809371..cc3c9d8 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -27,8 +27,8 @@ jobs: # Setup the flutter environment. - uses: subosito/flutter-action@v1 with: - channel: 'stable' # 'dev', 'alpha', default to: 'stable' - #flutter-version: '1.22.x' # you can also specify exact version of flutter + #channel: 'stable' # 'dev', 'alpha', default to: 'stable' + flutter-version: '1.22.x' # you can also specify exact version of flutter # Get flutter dependencies. - run: flutter pub get diff --git a/.github/workflows/publish_apk.yml b/.github/workflows/publish_apk.yml index b7956cd..edb1136 100644 --- a/.github/workflows/publish_apk.yml +++ b/.github/workflows/publish_apk.yml @@ -23,8 +23,8 @@ jobs: - name: Setup Flutter uses: subosito/flutter-action@v1 with: - channel: 'stable' # 'dev', 'alpha', default to: 'stable' - #flutter-version: '1.22.x' + #channel: 'stable' # 'dev', 'alpha', default to: 'stable' + flutter-version: '1.22.x' # fix Permission denied - name: Setup Permission run: sudo chown -R $USER $PWD diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c7ac8c..1ec025d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ * 2.x.x 是 Null Safety 版本 * 现在阶段会同时维护这 2 个版本,再往后可能仅维护一个版本 +## 1.5.0 [2022-04-08] +* 更新 Android SDK `v4.460.1330` +* 以后将不在维护非 1x 版本,请及时升级 + ## 1.4.1 [2021-12-07] * 修复 iOS 编译问题 diff --git a/README.md b/README.md index 81343ca..64ccc3a 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@

一款优质的 Flutter 广告插件(腾讯广告、广点通、优量汇)

- + - +

@@ -29,14 +29,15 @@ - ✅ [信息流](#信息流) ## 下载体验 - + +> 回复 `优量汇体验` ## 入门使用 ### 引入依赖 ``` Dart dependencies: - flutter_qq_ads: ^1.4.1 # 非 Null Safety 版本 + flutter_qq_ads: ^1.5.0 # 非 Null Safety 版本 flutter_qq_ads: ^2.4.1 # Null Safety 版本 ``` @@ -162,7 +163,7 @@ AspectRatio( /// [width] 宽度 /// [height] 高度,0:代表自适应广告高度 /// [count] 获取广告数量,建议 1~3 个 -List feedAdList = await FlutterPangleAds.loadFeedAd( +List feedAdList = await FlutterQqAds.loadFeedAd( AdsConfig.feedId, width: 375, height: 0, @@ -174,7 +175,7 @@ List feedAdList = await FlutterPangleAds.loadFeedAd( > 当你的广告不再需要时,请一定执行清除操作 ``` Dart /// [list] 信息流广告 id 列表 -bool result = await FlutterPangleAds.clearFeedAd(feedAdList); +bool result = await FlutterQqAds.clearFeedAd(feedAdList); ``` - 页面中展示信息流广告 @@ -299,11 +300,19 @@ pod install ## 支持开源 -支持开源项目最好的方式就是点个免费的 [Star](https://github.com/FlutterAds/flutter_qq_ads) ⭐️ +- 开源不易,需要花费大量休息时间加班熬夜来维护,你可以通过下方二维码赞赏支持我。 -## FlutterAds 系列插件 + + coffee + + +- 用爱发电,给本项目点个免费的 [Star](https://github.com/FlutterAds/flutter_qq_ads) ⭐️ 也是非常好的支持。 + +## FlutterAds 广告插件系列 |插件|描述| |-|-| |[flutter_qq_ads](https://github.com/FlutterAds/flutter_qq_ads)|腾讯广告、广点通、优量汇 Flutter 广告插件| |[flutter_pangle_ads](https://github.com/FlutterAds/flutter_pangle_ads)|字节跳动、穿山甲 Flutter 广告插件| -|[flutter_gromore_ads](https://github.com/FlutterAds/flutter_gromore_ads)|字节跳动、穿山甲、Gromore 聚合 Flutter 广告插件(开发中)| +|[flutter_gromore_ads](https://github.com/FlutterAds/flutter_gromore_ads)|字节跳动、穿山甲、Gromore 聚合 Flutter 广告插件| + + diff --git a/android/build.gradle b/android/build.gradle index d7404b9..8290f7b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -33,10 +33,10 @@ android { } dependencies { - implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'com.google.android.material:material:1.3.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.legacy:legacy-support-v4:1.0.0' // 广告 SDK - implementation 'com.qq.e.union:union:4.430.1300' + implementation 'com.qq.e.union:union:4.460.1330' } diff --git a/android/src/main/java/com/zero/flutter_qq_ads/PluginDelegate.java b/android/src/main/java/com/zero/flutter_qq_ads/PluginDelegate.java index 9129e38..e89deec 100644 --- a/android/src/main/java/com/zero/flutter_qq_ads/PluginDelegate.java +++ b/android/src/main/java/com/zero/flutter_qq_ads/PluginDelegate.java @@ -6,7 +6,6 @@ import androidx.annotation.NonNull; -import com.qq.e.comm.managers.GDTADManager; import com.qq.e.comm.managers.GDTAdSdk; import com.zero.flutter_qq_ads.load.FeedAdLoad; import com.zero.flutter_qq_ads.load.FeedAdManager; diff --git a/android/src/main/java/com/zero/flutter_qq_ads/load/FeedAdLoad.java b/android/src/main/java/com/zero/flutter_qq_ads/load/FeedAdLoad.java index ccf149f..bb53ea3 100644 --- a/android/src/main/java/com/zero/flutter_qq_ads/load/FeedAdLoad.java +++ b/android/src/main/java/com/zero/flutter_qq_ads/load/FeedAdLoad.java @@ -26,7 +26,7 @@ * 信息流加载对象 */ public class FeedAdLoad extends BaseAdPage implements NativeExpressAD.NativeExpressADListener { - private final String TAG = FeedAdManager.class.getSimpleName(); + private final String TAG = FeedAdLoad.class.getSimpleName(); private MethodChannel.Result result; /** @@ -106,7 +106,7 @@ private void sendBroadcastEvent(NativeExpressADView adView, String event) { intent.setAction(PluginDelegate.KEY_FEED_VIEW + "_" + adView.hashCode()); intent.putExtra("event", event); boolean result = LocalBroadcastManager.getInstance(activity).sendBroadcast(intent); - Log.i(TAG, "onADClosed sendBroadcast:" + result); +// Log.i(TAG, "sendBroadcastEvent sendBroadcast:" + result); } @Override @@ -114,22 +114,12 @@ public void onADLeftApplication(NativeExpressADView nativeExpressADView) { } - @Override - public void onADOpenOverlay(NativeExpressADView nativeExpressADView) { - - } - - @Override - public void onADCloseOverlay(NativeExpressADView nativeExpressADView) { - - } - @Override public void onNoAD(AdError error) { String msg = String.format(Locale.getDefault(), "onError, error code: %d, error msg: %s", error.getErrorCode(), error.getErrorMsg()); Log.i(TAG, "onError, adError=" + msg); sendErrorEvent(error.getErrorCode(), error.getErrorMsg()); - this.result.success(new List[]{}); + this.result.success(new ArrayList()); } } diff --git a/android/src/main/java/com/zero/flutter_qq_ads/page/AdBannerView.java b/android/src/main/java/com/zero/flutter_qq_ads/page/AdBannerView.java index 8ee6252..6ea4fb0 100644 --- a/android/src/main/java/com/zero/flutter_qq_ads/page/AdBannerView.java +++ b/android/src/main/java/com/zero/flutter_qq_ads/page/AdBannerView.java @@ -115,17 +115,4 @@ public void onADLeftApplication() { Log.i(TAG, "onADLeftApplication"); } - @Override - public void onADOpenOverlay() { - Log.i(TAG, "onADOpenOverlay"); -// sendEvent(AdEventAction.onAdClicked); - } - - @Override - public void onADCloseOverlay() { - Log.i(TAG, "onADCloseOverlay"); -// sendEvent(AdEventAction.onAdClosed); - } - - } \ No newline at end of file diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 6b4c0f7..f2872cf 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 8.0 + 9.0 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index dd682f9..fe861e5 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -149,7 +149,6 @@ 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 2A710B39D8AA4257F4D2F5F9 /* [CP] Embed Pods Frameworks */, 0DD52AD8226E90C038FBB76E /* [CP] Copy Pods Resources */, ); buildRules = ( @@ -225,23 +224,6 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 2A710B39D8AA4257F4D2F5F9 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 4e51665..6827b94 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: 1.4.1+16 +version: 1.5.0+18 environment: sdk: ">=2.7.0 <3.0.0" @@ -24,7 +24,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.0 - flutter_pangle_ads: ^1.4.0 + # flutter_pangle_ads: ^2.5.0 loadany: ^0.1.4 dev_dependencies: diff --git a/ios/Classes/Event/FAQAdEventAction.h b/ios/Classes/Event/FAQAdEventAction.h index 05f78d4..0ca5bf0 100644 --- a/ios/Classes/Event/FAQAdEventAction.h +++ b/ios/Classes/Event/FAQAdEventAction.h @@ -18,6 +18,10 @@ static NSString *const onAdExposure=@"onAdExposure"; static NSString *const onAdClosed=@"onAdClosed"; // 广告点击 static NSString *const onAdClicked=@"onAdClicked"; +// 广告跳过 +static NSString *const onAdSkip=@"onAdSkip"; +// 广告播放或计时完毕 +static NSString *const onAdComplete=@"onAdComplete"; // 获得广告激励 static NSString *const onAdReward=@"onAdReward"; // 广告事件操作 diff --git a/ios/flutter_qq_ads.podspec b/ios/flutter_qq_ads.podspec index 11306b6..7e7f950 100644 --- a/ios/flutter_qq_ads.podspec +++ b/ios/flutter_qq_ads.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'flutter_qq_ads' - s.version = '1.4.1' + s.version = '1.5.0' s.summary = '一款优质的 Flutter 广告插件(腾讯广告、广点通、优量汇)' s.description = <<-DESC 一款优质的 Flutter 广告插件(腾讯广告、广点通、优量汇). diff --git a/pubspec.yaml b/pubspec.yaml index 13f69dd..782c455 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_qq_ads description: FlutterAds 致力于构建优质的 Flutter 广告插件,这是其中一款基于「腾讯广告、广点通、优量汇」SDK 的插件 -version: 1.4.1 +version: 1.5.0 homepage: https://github.com/FlutterAds environment: