Skip to content

Commit

Permalink
Merge branch 'release/1.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
BytesZero committed Apr 8, 2022
2 parents b26aef6 + 8c74fbc commit 670dd83
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 65 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 编译问题

Expand Down
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<h3 align="center">一款优质的 Flutter 广告插件(腾讯广告、广点通、优量汇)</h3>

<p align="center">
<a href="https://github.com/FlutterAds/flutter_qq_ads"><img src=https://img.shields.io/badge/version-v1.4.1-success></a>
<a href="https://github.com/FlutterAds/flutter_qq_ads"><img src=https://img.shields.io/badge/version-v1.5.0-success></a>
<a href="https://github.com/FlutterAds/flutter_qq_ads"><img src=https://img.shields.io/badge/null_safety-v2.4.1-success></a>
<a href="https://github.com/FlutterAds/flutter_qq_ads"><img src=https://img.shields.io/badge/platform-iOS%20%7C%20Android-brightgreen></a>
<a href="https://github.com/FlutterAds/flutter_qq_ads/actions/workflows/flutter.yml"><img src="https://github.com/FlutterAds/flutter_qq_ads/actions/workflows/flutter.yml/badge.svg?branch=develop"></a>
<a href="https://github.com/FlutterAds/flutter_qq_ads/actions/workflows/flutter.yml"><img src="https://github.com/FlutterAds/flutter_qq_ads/actions/workflows/flutter.yml/badge.svg?branch=2x"></a>
<a href="https://github.com/FlutterAds/flutter_qq_ads"><img src=https://img.shields.io/github/stars/FlutterAds/flutter_qq_ads?color=brightgreen></a>
<a href="https://github.com/FlutterAds/flutter_qq_ads/blob/develop/LICENSE"><img src=https://img.shields.io/badge/license-MIT-brightgreen></a>
</p>
Expand All @@ -29,14 +29,15 @@
-[信息流](#信息流)

## 下载体验
<a href="https://www.pgyer.com/app/qrcode/fadsqq"><img src="https://www.pgyer.com/app/qrcode/fadsqq" width='100' height='100'></a>
<a href="https://www.pgyer.com/app/qrcode/fadsqq"><img src="https://raw.githubusercontent.com/yy1300326388/yy1300326388/main/images/gzh/gzh_qrcode.jpeg" width='100' height='100'></a>
> 回复 `优量汇体验`
## 入门使用
### 引入依赖

``` 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 版本
```

Expand Down Expand Up @@ -162,7 +163,7 @@ AspectRatio(
/// [width] 宽度
/// [height] 高度,0:代表自适应广告高度
/// [count] 获取广告数量,建议 1~3 个
List<int> feedAdList = await FlutterPangleAds.loadFeedAd(
List<int> feedAdList = await FlutterQqAds.loadFeedAd(
AdsConfig.feedId,
width: 375,
height: 0,
Expand All @@ -174,7 +175,7 @@ List<int> feedAdList = await FlutterPangleAds.loadFeedAd(
> 当你的广告不再需要时,请一定执行清除操作
``` Dart
/// [list] 信息流广告 id 列表
bool result = await FlutterPangleAds.clearFeedAd(feedAdList);
bool result = await FlutterQqAds.clearFeedAd(feedAdList);
```
- 页面中展示信息流广告

Expand Down Expand Up @@ -299,11 +300,19 @@ pod install

## 支持开源

支持开源项目最好的方式就是点个免费的 [Star](https://github.com/FlutterAds/flutter_qq_ads) ⭐️
- 开源不易,需要花费大量休息时间加班熬夜来维护,你可以通过下方二维码赞赏支持我。

## FlutterAds 系列插件
<a href="https://raw.githubusercontent.com/yy1300326388/yy1300326388/main/images/pay_qr_code/pay_qr_code.png">
<img width="300" alt="coffee" src="https://raw.githubusercontent.com/yy1300326388/yy1300326388/main/images/pay_qr_code/pay_qr_code.png">
</a>

- 用爱发电,给本项目点个免费的 [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 广告插件|


4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 3 additions & 13 deletions android/src/main/java/com/zero/flutter_qq_ads/load/FeedAdLoad.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -106,30 +106,20 @@ 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
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<Integer>());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


}
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>9.0</string>
</dict>
</plist>
18 changes: 0 additions & 18 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
2A710B39D8AA4257F4D2F5F9 /* [CP] Embed Pods Frameworks */,
0DD52AD8226E90C038FBB76E /* [CP] Copy Pods Resources */,
);
buildRules = (
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions 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: 1.4.1+16
version: 1.5.0+18

environment:
sdk: ">=2.7.0 <3.0.0"
Expand All @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions ios/Classes/Event/FAQAdEventAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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";
// 广告事件操作
Expand Down
2 changes: 1 addition & 1 deletion ios/flutter_qq_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_qq_ads'
s.version = '1.4.1'
s.version = '1.5.0'
s.summary = '一款优质的 Flutter 广告插件(腾讯广告、广点通、优量汇)'
s.description = <<-DESC
一款优质的 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_qq_ads
description: FlutterAds 致力于构建优质的 Flutter 广告插件,这是其中一款基于「腾讯广告、广点通、优量汇」SDK 的插件
version: 1.4.1
version: 1.5.0
homepage: https://github.com/FlutterAds

environment:
Expand Down

0 comments on commit 670dd83

Please sign in to comment.