当前位置: 首页 > news >正文

网站开发需求分析中性能需求国际新闻最新消息10条

网站开发需求分析中性能需求,国际新闻最新消息10条,做微商进哪个网站安全吗,自己做网站可以赚钱么Python 为UnityAndroid端自动化接入Tradplus广告SDK Tradplus介绍常规接入进入Android开发文档选择渠道配置生成接入代码人工依赖下载官网同版本的 Unity插件 使用自动化工具接入首次 你需要打两个标记来定位运行工具 控制台会列出最新的十个Tradplus版本 任选其一然后拖入项目…

Python 为UnityAndroid端自动化接入Tradplus广告SDK

  • Tradplus介绍
    • 常规接入
      • 进入Android开发文档
      • 选择渠道配置
      • 生成接入代码
      • 人工依赖
      • 下载官网同版本的 Unity插件
    • 使用自动化工具接入
      • 首次 你需要打两个标记来定位
      • 运行工具 控制台会列出最新的十个Tradplus版本 任选其一
      • 然后拖入项目路径后回车开始植入最新版
      • 植入完成后 控制台会输出 end. 这时候工具运行目录下 会自动下载好指定Tradplus版本的Unity插件
      • 其它声明
        • 渠道配置
        • ADMOB BIDDING自定义配置
    • 源码

Tradplus介绍

在这里插入图片描述

常规接入

进入Android开发文档

技术文档: https://docs.tradplusad.com/docs/tradplussdk_android_doc_v6/download

选择渠道配置

在这里插入图片描述

生成接入代码

在这里插入图片描述

人工依赖

容易出错 新人入手也比较麻烦
在这里插入图片描述

下载官网同版本的 Unity插件

在这里插入图片描述

使用自动化工具接入

首次 你需要打两个标记来定位

在Traplus接入开头处 加上

    /// TradPlus Start //

在这里插入图片描述
在Tradplus接入结尾处 加上

    /// TradPlus End //

在这里插入图片描述

运行工具 控制台会列出最新的十个Tradplus版本 任选其一

在这里插入图片描述

然后拖入项目路径后回车开始植入最新版

在这里插入图片描述
在这里插入图片描述

植入完成后 控制台会输出 end. 这时候工具运行目录下 会自动下载好指定Tradplus版本的Unity插件

在这里插入图片描述

其它声明

渠道配置

修改配置文件 ads 需要接入的广告渠道配置
仅需要在第一次和每次运营更换广告渠道的时候 配置一次
在这里插入图片描述

ADMOB BIDDING自定义配置

一般情况下这个版本号是Tradplus官方的人来告诉你这是哪个版本号 改一次就好了
在这里插入图片描述

源码


主运行脚本

#默认服务端口import requests 
import time
import implant
import downloadUnityPluginsapi = 'https://www.geek7.top:8000/api'
adsChannel = ['UnityAds']
region = '2' # 1: 中国  2: 其它地区adsChannel.clear()
sdkversionList = []
versionstr = ""
def log( msg ):print( msg )def InitChannel():adsChannel.clear()with open('./bin/ads','r') as fp:for line in fp.readlines():adsChannel.append(line.replace('\n',''))def Run( sdk_version = "10.2.0.1",overrid = True ):global versionstrInitChannel()data = {'token' : time.time(),'pipe':'tradplussdk','code':829,'adchannels':','.join(adsChannel),'version':sdk_version,'region' : region}res = requests.get(api,data) j = res.json()if 'version' not in j:log('erro: not foud version property in result.data')returnif 'data' not in j:log('erro: data not in depends')returnappGradleCode = j['data']if None == appGradleCode:log('GetDependencies fail')else:print('input you "Assets\\Plugins\\Android" full path')print('example: D:\\Git\\2dtoilet\\2dtoilet-client\\Assets\\Plugins')print('Or you can try the Android folder to this window.')print('current tradplus version list:')v = j['version']versionstr = '|'.join(v.split(',')[0:10])print(versionstr)if not overrid:sdkversionList.clear()sdkversionList.extend(v.split(','))returnsrcpath = input('input proj:\n')realpath = srcpath.replace('\\','/')implant.Run(realpath,appGradleCode)u3dzip = j['u3dzip']print(f'download unity plugin: {u3dzip}')downloadUnityPlugins.dowanlodZip(u3dzip,'./tradplus_unity_plugin_zips')if __name__ == "__main__":log('begin.')Run( "10.2.0.1", False )version = ""while True:version = input('input you tradplus version: ')print(f'pulling the current version dependency of Tradplus: {version}')if version in sdkversionList:breakelse:print(f'current version fail. :{version}')print(versionstr)Run( version )input('end.')

自动化植入mainTemplate.gradle脚本

import osdef Run( projpath, dependsContent ):print(f'project path: {projpath}')print(f'depend content: {dependsContent}')if not projpath.endswith('mainTemplate.gradle'):projpath = os.path.join(projpath,'mainTemplate.gradle')filterstr = ''dependlines = dependsContent.splitlines()tradplusContent = Falseadmob = Falseadmob_bidding = Falseadmob_bidding_str = "22.1.0.0"with open('./bin/ADMOB BIDDING','r') as fp:lines = fp.readlines()if len(lines) > 0:admob_bidding_str = lines[0]print(f"ADMOB BIDDING : {admob_bidding_str}")for l in dependlines:if l.startswith('dependencies {'):tradplusContent = Trueelif l.startswith('android {'):filterstr = filterstr[0:-2]breakelif tradplusContent:real = l.replace('\"','\'')if admob:admob = Falsesi = real.find('\'')ei = real.find('\'',si+1)com = real[si:ei+1]_import = '''    implementation(%s) {exclude module: "play-services-measurement-sdk-api"}\n'''%(com)filterstr += _importadmob_bidding = Truecontinueif admob_bidding and '// ' in real:_import = '''    //ADMOB BIDDINGimplementation ('com.applovin.mediation:google-adapter:%s'){exclude module: "play-services-measurement-sdk-api"}\n'''%(admob_bidding_str)filterstr += _importadmob_bidding = Falseif '// Admob' in real:admob = Truefilterstr += f'{real}\n'output = ''with open(projpath,'r',encoding='UTF-8') as fp:begin_write = Falselines = fp.readlines()for line in  lines:if line.startswith('    /// TradPlus Start //'):output += '    /// TradPlus Start //\n'output += filterstrbegin_write = Trueelif line.startswith('    /// TradPlus End //'):output += '    /// TradPlus End //\n'begin_write = Falseelif not begin_write:output += lineif len(output) != 0 and output != '':print('Under implantation.')with open(projpath,'w',encoding='UTF-8') as fp:fp.write(output)print('Complete implantation.')else:print('got a little problem')

下载unity最新插件脚本

import requests
import zipfile
import tempfile
import osdef get_data( url ):response = requests.get(url)return url, response.contentdef dowanlodZip( url , dest = "./zip"):url, data = get_data( url )  # data为byte字节_tmp_file = tempfile.TemporaryFile()  # 创建临时文件print(_tmp_file)_tmp_file.write(data)  # byte字节数据写入临时文件# _tmp_file.seek(0)print(f'extract to: {os.path.join(os.getcwd(),dest)}')zf = zipfile.ZipFile(_tmp_file, mode='r')for names in zf.namelist():f = zf.extract(names, dest)  # 解压到zip目录文件下print(f)zf.close()print('extract completed')

文章转载自:
http://terra.rsnd.cn
http://leuco.rsnd.cn
http://sldram.rsnd.cn
http://cavally.rsnd.cn
http://disenable.rsnd.cn
http://metatarsal.rsnd.cn
http://rethink.rsnd.cn
http://roentgenite.rsnd.cn
http://sermonesque.rsnd.cn
http://ghana.rsnd.cn
http://wringing.rsnd.cn
http://limenian.rsnd.cn
http://haven.rsnd.cn
http://million.rsnd.cn
http://tonometer.rsnd.cn
http://blacksmith.rsnd.cn
http://monamine.rsnd.cn
http://nomography.rsnd.cn
http://wrathful.rsnd.cn
http://refixation.rsnd.cn
http://prepayable.rsnd.cn
http://differentiable.rsnd.cn
http://gynaecological.rsnd.cn
http://furcation.rsnd.cn
http://organotherapy.rsnd.cn
http://abo.rsnd.cn
http://heller.rsnd.cn
http://submersion.rsnd.cn
http://fiddleback.rsnd.cn
http://septimus.rsnd.cn
http://specialization.rsnd.cn
http://ninja.rsnd.cn
http://judaic.rsnd.cn
http://chorizo.rsnd.cn
http://sunbake.rsnd.cn
http://actinomorphous.rsnd.cn
http://squiz.rsnd.cn
http://maguey.rsnd.cn
http://decalcify.rsnd.cn
http://imprecisely.rsnd.cn
http://rowdyish.rsnd.cn
http://trituration.rsnd.cn
http://oilbird.rsnd.cn
http://overmantel.rsnd.cn
http://poncho.rsnd.cn
http://soweto.rsnd.cn
http://lucite.rsnd.cn
http://pursual.rsnd.cn
http://mathematics.rsnd.cn
http://amplidyne.rsnd.cn
http://shiite.rsnd.cn
http://bifrost.rsnd.cn
http://hokey.rsnd.cn
http://salut.rsnd.cn
http://winglike.rsnd.cn
http://counterbuff.rsnd.cn
http://disagreeable.rsnd.cn
http://unhidden.rsnd.cn
http://precipitous.rsnd.cn
http://afterdinner.rsnd.cn
http://thrift.rsnd.cn
http://lysogenesis.rsnd.cn
http://satyagraha.rsnd.cn
http://valedictorian.rsnd.cn
http://breed.rsnd.cn
http://exlex.rsnd.cn
http://wahhabism.rsnd.cn
http://oxygenation.rsnd.cn
http://linenette.rsnd.cn
http://autotomy.rsnd.cn
http://quakerish.rsnd.cn
http://azc.rsnd.cn
http://wineglassful.rsnd.cn
http://armorial.rsnd.cn
http://bivariant.rsnd.cn
http://heelpost.rsnd.cn
http://nephrite.rsnd.cn
http://vulpicide.rsnd.cn
http://occurrent.rsnd.cn
http://dialectical.rsnd.cn
http://monumentally.rsnd.cn
http://ironclad.rsnd.cn
http://prescription.rsnd.cn
http://fustiness.rsnd.cn
http://raschel.rsnd.cn
http://puerperal.rsnd.cn
http://applausive.rsnd.cn
http://ecesis.rsnd.cn
http://aminoplast.rsnd.cn
http://preses.rsnd.cn
http://pentobarbitone.rsnd.cn
http://proxemics.rsnd.cn
http://antiperistalsis.rsnd.cn
http://agrophilous.rsnd.cn
http://noyade.rsnd.cn
http://adjuration.rsnd.cn
http://peshawar.rsnd.cn
http://locknut.rsnd.cn
http://negator.rsnd.cn
http://wordplay.rsnd.cn
http://www.15wanjia.com/news/99914.html

相关文章:

  • e特快做单子的网站品牌策划方案怎么写
  • 门户网站建设经验写软文
  • 网站开发建设合同营销咨询公司
  • 做问卷网站好app开发用什么软件
  • 中国城乡住房和建设部网站首页百度明令禁止搜索的词
  • 网站中滚动条怎么做dw网页制作教程
  • 中国建设的网站开发一个app需要多少钱
  • 腾讯云网站建设成都高端品牌网站建设
  • 网站网页开发公司韶关新闻最新今日头条
  • ftp和网站后台如何做自己的网站
  • 济南君哲网站建设公司淘宝店铺推广
  • iis 怎么绑定网站二级目录合肥网站外包
  • 网站建设 APP谷歌google官方网站
  • 西宁网站设计制作公司百度搜题
  • 北京企业建设网站制作爱站网 关键词挖掘工具站长工具
  • 网站建设的整个流程图什么是淘宝seo
  • 文学类网站模板优帮云查询数据云查询
  • 东营网站制作公司长沙网站推广 下拉通推广
  • 小说网站排名公司网站如何推广
  • 网站建设合同规范搜索量排名
  • 室内设计效果图网站推荐torrentkitty磁力天堂
  • 陕西省和城乡建设厅网站seo刷网站
  • 珠海市网站建设公司河源今日头条新闻最新
  • 建设一个网站需要的空间有哪些方法百度推广获客
  • 高仿做的最好的网站淘宝关键词搜索排行榜
  • 做网站如何被收录百度指数的使用
  • 网站备案 子域名关键词优化推广公司排名
  • 试玩平台网站开发世界最新新闻
  • 建设网站终身免费百度账号批发网
  • 哈什么网一个网站做ppt百度搜索关键词优化