-
Notifications
You must be signed in to change notification settings - Fork 937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autojs 可以对接穿山甲的 gromore吗? #300
Labels
Doubt ❔ 疑惑
Any doubts about this repository
Feedback Awaited 🕒 等待反馈
Waiting for the feedback from issue creater and issue will be closed if duration is over one month
Comments
通过 AutoJs6 的外部插件加载功能 (runtime.loadJar/runtime.loadDex), 理论上可以集成 GroMore 或其他类似的广告 SDK. 但能否正常执行脚本代码, 以及实现预期的功能, 需要你亲自尝试. 以下是一种可能的实现方式用于参考: runtime.loadJar("./groMore.jar");
// 如果以下声明语句报错, 可以尝试移出这些声明代码.
const TTAdSdk = "com.bytedance.sdk.openadsdk.TTAdSdk";
const AdSlot = "com.bytedance.sdk.openadsdk.AdSlot";
const TTAdNative = "com.bytedance.sdk.openadsdk.TTAdNative";
const appId = "your_app_id";
const codeId = "your_ad_slot_id";
TTAdSdk.init(context, {
appId,
debug: true,
});
let adSlot = new AdSlot.Builder()
.setCodeId(codeId)
.setSupportDeepLink(true)
.setAdCount(1)
.build();
let adManager = TTAdSdk.getAdManager();
let adNative = adManager.createAdNative(context);
adNative.loadRewardVideoAd(adSlot, new TTAdNative.RewardVideoAdListener({
onError(code, message) {
console.log(`广告加载失败: ${message}`);
},
onRewardVideoAdLoad(ad) {
console.log("广告加载成功");
ad.showRewardVideoAd(context);
},
onRewardVideoCached() {
console.log("广告缓存完成");
}
})); |
groMore.jar 这个在哪下载 |
在gromore
你的办法非常帮,您之前采用过类似方案,成功过吗?哈 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Doubt ❔ 疑惑
Any doubts about this repository
Feedback Awaited 🕒 等待反馈
Waiting for the feedback from issue creater and issue will be closed if duration is over one month
autojs 可以对接穿山甲的 gromore吗?谢谢
The text was updated successfully, but these errors were encountered: