Android实现 广告识别之 广告库
生活随笔
收集整理的這篇文章主要介紹了
Android实现 广告识别之 广告库
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
最近在寫一移動應用《apk查殼工具》(ps:大家可以下載試用給點意見呀),主要不反編譯也能識別apk相關信息,分享下廣告識別功能實現過程中收集的廣告庫
package mxk.bytecode.chickEn;
import java.util.*;
public class AdUtils
{
? ?/***
? ?by:默小坑
? ?2017.3.6
? ?**/
? ? ?static HashMap<String, String> adList =new ?HashMap<String, String>();
? ? ? //直接使用哈希表來保存相關信息
? ? ? public static String checkAd(String packag,boolean dex){
? ? ? ? ? ? adList.put("com.vpon.adon.android.WebInApp", "Vpo");
? ? ? ? ? ? adList.put("com.google.ads", "AdMob");
? ? ? ? ? ? adList.put("com.google.android.gms.ads", "谷歌廣告");
? ? ? ? ? ? adList.put( "com.mobisage.android","adsage");
? ? ? ? ? ? adList.put("com.adchina.android.ads.views", "AdChina");
? ? ? ? ? ? adList.put( "com.mt.airad.MultiAD","MultiAD");
? ? ? ? ? ? adList.put("com.greystripe.android.sdk", "Greystripe");
? ? ? ? ? ? adList.put("com.mdotm.android.ads", "MdotM");
? ? ? ? ? ? adList.put("com.millennialmedia.android", "MillennialMedia");
? ? ? ? ? ? adList.put("com.mt.airad.MultiAD", "AirAD");
? ? ? ? ? ? adList.put("com.inmobi.androidsdk", "InMobi");
? ? ? ? ? ? adList.put("cn.aduu.adsdk", "aduu");
? ? ? ? ? ? adList.put("com.donson.momark", "Momark");
? ? ? ? ? ? adList.put("com.doumob.main", "Doumob");
? ? ? ? ? ? adList.put("com.iadpush.adp.IA", "IadPush");
? ? ? ? ? ? adList.put("cn.appmedia.ad", "Appmedia");
? ? ? ? ? ? adList.put("com.zestadz.android", "ZestADZ");
? ? ? ? ? ? adList.put("com.smaato.SOMA", "Smaato");
? ? ? ? ? ? adList.put("com.l.adlib_android", "LSense");
? ? ? ? ? ? adList.put( "com.energysource.szj","AdTouch");
? ? ? ? ? ? adList.put("net.cavas.show", "芒果");
? ? ? ? ? ? adList.put("com.adsmogo.adview", "芒果");
? ? ? ? ? ? adList.put("com.lmmob.ad.sdk", "力美");
? ? ? ? ? ? adList.put("com.lmmob.sdk", "力美");
? ? ? ? ? ? adList.put("com.mobisage.android", "艾德思奇");
? ? ? ? ? ? adList.put("net.youmi.android", "有米");
? ? ? ? ? ? adList.put( "net.youmi.toolkit.android","有米推送");
? ? ? ? ? ? adList.put("cn.domob.android.ads", "多盟");
? ? ? ? ? ? adList.put("com.adwo.adsdk", "安沃");
? ? ? ? ? ? adList.put("com.winad.android.ads", "贏告");
? ? ? ? ? ? adList.put("com.winad.android.wall", "贏告");
? ? ? ? ? ? adList.put("com.winad.android.adwall.push", "贏告推送");
? ? ? ? ? ? adList.put("com.wiyun.common", "微云");
? ? ? ? ? ? adList.put("com.wiyun.offer", "微云");
? ? ? ? ? ? adList.put("com.wooboo.adlib_android", "哇棒");
? ? ? ? ? ? adList.put("com.tencent.mobwin", "聚贏");
? ? ? ? ? ? adList.put("com.baidu.mobads", "百度廣告");
? ? ? ? ? ? adList.put("com.umengAd.android", "友盟");
? ? ? ? ? ? adList.put("com.fractalist.sdk.base.sys", "飛云");
? ? ? ? ? ? adList.put("net.miidi.ad.wall", "米迪");
? ? ? ? ? ? adList.put("net.miidi.ad.banner", "米迪 ");
? ? ? ? ? ? adList.put("com.suizong.mobplate.ads", "隨蹤");
? ? ? ? ? ? adList.put("com.telead.adlib_android", "天翼");
? ? ? ? ? ? adList.put("com.telead.adlib.adwall", "天翼");
? ? ? ? ? ? adList.put("com.l.adlib_android", "百分聯通");
? ? ? ? ? ? adList.put("com.mobile.app.adlist", "第七傳媒");
? ? ? ? ? ? adList.put("com.mobile.app.adpush", "第七傳媒");
? ? ? ? ? ? adList.put("com.adzhidian.view", "指點傳媒");
? ? ? ? ? ? adList.put("com.huawei.hiad.core", "華為聚點");
? ? ? ? ? ? adList.put("cn.aduu.adsdk", "優友");
? ? ? ? ? ? adList.put("com.izp", "億贊普");
? ? ? ? ? ? adList.put("com.waps.OffersWebView", "萬普世紀");
? ? ? ? ? ? adList.put("com.adsmogo.offers.adapters", "萬普世紀");
? ? ? ? ? ? adList.put("com.bypush", "艾普 ");
? ? ? ? ? ? adList.put("com.dianle", "點樂 ");
? ? ? ? ? ? adList.put("com.yjfsdk.advertSdk", "易積分");
? ? ? ? ? ? adList.put("com.juzi.main", "桔子平臺");
? ? ? ? ? ? adList.put("com.etonenet.pointwall", "移通");
? ? ? ? ? ? adList.put("com.kuguo.ad", "酷果");
? ? ? ? ? ? adList.put( "com.kuguo.pushads","酷果推送廣告");
? ? ? ? ? ? adList.put( "com.dianru.push","酷果推送廣告");
? ? ? ? ? ? adList.put("com.longmob.service", "掌龍廣告平臺");
? ? ? ? ? ? adList.put( "com.dianru.sdk","點入廣告");
? ? ? ? ? ? adList.put( "com.nd.dianjin.activity","91點金");
? ? ? ? ? ? adList.put( "com.nd.dianjin.service","91點金");
? ? ? ? ? ? adList.put( "com.snowfish.cn","易接");
? ? ? ? ? ? adList.put( "cn.ganga.offline.cn","易接");
? ? ? ? ? ? adList.put( "cn.casee","架勢");
? ? ? ? ? ? adList.put( "com.wqmobile","帷千");
? ? ? ? ? ? adList.put( "com.ignitevision.android","天幕");
? ? ? ? ? ? adList.put( "com.mobisage","艾德思奇");
? ? ? ? ? ? adList.put( "com.iflytek.voiceads","訊飛移動廣告");
? ? ? ? ? ? adList.put( "com.qq.e.ads","騰訊廣告");
? ? ? ? ? ??
? ? ? ? ? ? Collection<String> keyset= adList.keySet();
? ? ? ? ? ? List<String> list = new ArrayList<String>(keyset);
? ? ? ? ? ? Collections.sort(list);//排序,用在這好像多余了
? ? ? ? ? ? for (int i = 0; i < list.size(); i++) {
? ? ? ? ? ? ? ? ? if(!dex&&packag.startsWith(list.get(i))||packag.indexOf(list.get(i))>-1){
//判斷是否傳入的包名是否從dex解析的
? ? ? ? ? ? ? ? ? ? ? ? return adList.get(list.get(i));
? ? ? ? ? ? ? ? ? ? ?}
? ? ? ? ? ? ? ? ? if(dex){
? ? ? ? ? ? ? ? ? ? ? ? String test=list.get(i);
? ? ? ? ? ? ? ? ? ? ? ? if(packag.replace("/",".").indexOf(test)!=-1){
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return adList.get(list.get(i));
? ? ? ? ? ? ? ? ? ? ? ? ? ?}
? ? ? ? ? ? ? ? ? ? ?}
? ? ? ? ? ? ? ? ? //System.out.println(list.get(i)+" - "+adList.get(list.get(i)));
? ? ? ? ? ? ? ?}
? ? ? ? ? ? return "";
? ? ? ? ?}
}
package mxk.bytecode.chickEn;
import java.util.*;
public class AdUtils
{
? ?/***
? ?by:默小坑
? ?2017.3.6
? ?**/
? ? ?static HashMap<String, String> adList =new ?HashMap<String, String>();
? ? ? //直接使用哈希表來保存相關信息
? ? ? public static String checkAd(String packag,boolean dex){
? ? ? ? ? ? adList.put("com.vpon.adon.android.WebInApp", "Vpo");
? ? ? ? ? ? adList.put("com.google.ads", "AdMob");
? ? ? ? ? ? adList.put("com.google.android.gms.ads", "谷歌廣告");
? ? ? ? ? ? adList.put( "com.mobisage.android","adsage");
? ? ? ? ? ? adList.put("com.adchina.android.ads.views", "AdChina");
? ? ? ? ? ? adList.put( "com.mt.airad.MultiAD","MultiAD");
? ? ? ? ? ? adList.put("com.greystripe.android.sdk", "Greystripe");
? ? ? ? ? ? adList.put("com.mdotm.android.ads", "MdotM");
? ? ? ? ? ? adList.put("com.millennialmedia.android", "MillennialMedia");
? ? ? ? ? ? adList.put("com.mt.airad.MultiAD", "AirAD");
? ? ? ? ? ? adList.put("com.inmobi.androidsdk", "InMobi");
? ? ? ? ? ? adList.put("cn.aduu.adsdk", "aduu");
? ? ? ? ? ? adList.put("com.donson.momark", "Momark");
? ? ? ? ? ? adList.put("com.doumob.main", "Doumob");
? ? ? ? ? ? adList.put("com.iadpush.adp.IA", "IadPush");
? ? ? ? ? ? adList.put("cn.appmedia.ad", "Appmedia");
? ? ? ? ? ? adList.put("com.zestadz.android", "ZestADZ");
? ? ? ? ? ? adList.put("com.smaato.SOMA", "Smaato");
? ? ? ? ? ? adList.put("com.l.adlib_android", "LSense");
? ? ? ? ? ? adList.put( "com.energysource.szj","AdTouch");
? ? ? ? ? ? adList.put("net.cavas.show", "芒果");
? ? ? ? ? ? adList.put("com.adsmogo.adview", "芒果");
? ? ? ? ? ? adList.put("com.lmmob.ad.sdk", "力美");
? ? ? ? ? ? adList.put("com.lmmob.sdk", "力美");
? ? ? ? ? ? adList.put("com.mobisage.android", "艾德思奇");
? ? ? ? ? ? adList.put("net.youmi.android", "有米");
? ? ? ? ? ? adList.put( "net.youmi.toolkit.android","有米推送");
? ? ? ? ? ? adList.put("cn.domob.android.ads", "多盟");
? ? ? ? ? ? adList.put("com.adwo.adsdk", "安沃");
? ? ? ? ? ? adList.put("com.winad.android.ads", "贏告");
? ? ? ? ? ? adList.put("com.winad.android.wall", "贏告");
? ? ? ? ? ? adList.put("com.winad.android.adwall.push", "贏告推送");
? ? ? ? ? ? adList.put("com.wiyun.common", "微云");
? ? ? ? ? ? adList.put("com.wiyun.offer", "微云");
? ? ? ? ? ? adList.put("com.wooboo.adlib_android", "哇棒");
? ? ? ? ? ? adList.put("com.tencent.mobwin", "聚贏");
? ? ? ? ? ? adList.put("com.baidu.mobads", "百度廣告");
? ? ? ? ? ? adList.put("com.umengAd.android", "友盟");
? ? ? ? ? ? adList.put("com.fractalist.sdk.base.sys", "飛云");
? ? ? ? ? ? adList.put("net.miidi.ad.wall", "米迪");
? ? ? ? ? ? adList.put("net.miidi.ad.banner", "米迪 ");
? ? ? ? ? ? adList.put("com.suizong.mobplate.ads", "隨蹤");
? ? ? ? ? ? adList.put("com.telead.adlib_android", "天翼");
? ? ? ? ? ? adList.put("com.telead.adlib.adwall", "天翼");
? ? ? ? ? ? adList.put("com.l.adlib_android", "百分聯通");
? ? ? ? ? ? adList.put("com.mobile.app.adlist", "第七傳媒");
? ? ? ? ? ? adList.put("com.mobile.app.adpush", "第七傳媒");
? ? ? ? ? ? adList.put("com.adzhidian.view", "指點傳媒");
? ? ? ? ? ? adList.put("com.huawei.hiad.core", "華為聚點");
? ? ? ? ? ? adList.put("cn.aduu.adsdk", "優友");
? ? ? ? ? ? adList.put("com.izp", "億贊普");
? ? ? ? ? ? adList.put("com.waps.OffersWebView", "萬普世紀");
? ? ? ? ? ? adList.put("com.adsmogo.offers.adapters", "萬普世紀");
? ? ? ? ? ? adList.put("com.bypush", "艾普 ");
? ? ? ? ? ? adList.put("com.dianle", "點樂 ");
? ? ? ? ? ? adList.put("com.yjfsdk.advertSdk", "易積分");
? ? ? ? ? ? adList.put("com.juzi.main", "桔子平臺");
? ? ? ? ? ? adList.put("com.etonenet.pointwall", "移通");
? ? ? ? ? ? adList.put("com.kuguo.ad", "酷果");
? ? ? ? ? ? adList.put( "com.kuguo.pushads","酷果推送廣告");
? ? ? ? ? ? adList.put( "com.dianru.push","酷果推送廣告");
? ? ? ? ? ? adList.put("com.longmob.service", "掌龍廣告平臺");
? ? ? ? ? ? adList.put( "com.dianru.sdk","點入廣告");
? ? ? ? ? ? adList.put( "com.nd.dianjin.activity","91點金");
? ? ? ? ? ? adList.put( "com.nd.dianjin.service","91點金");
? ? ? ? ? ? adList.put( "com.snowfish.cn","易接");
? ? ? ? ? ? adList.put( "cn.ganga.offline.cn","易接");
? ? ? ? ? ? adList.put( "cn.casee","架勢");
? ? ? ? ? ? adList.put( "com.wqmobile","帷千");
? ? ? ? ? ? adList.put( "com.ignitevision.android","天幕");
? ? ? ? ? ? adList.put( "com.mobisage","艾德思奇");
? ? ? ? ? ? adList.put( "com.iflytek.voiceads","訊飛移動廣告");
? ? ? ? ? ? adList.put( "com.qq.e.ads","騰訊廣告");
? ? ? ? ? ??
? ? ? ? ? ? Collection<String> keyset= adList.keySet();
? ? ? ? ? ? List<String> list = new ArrayList<String>(keyset);
? ? ? ? ? ? Collections.sort(list);//排序,用在這好像多余了
? ? ? ? ? ? for (int i = 0; i < list.size(); i++) {
? ? ? ? ? ? ? ? ? if(!dex&&packag.startsWith(list.get(i))||packag.indexOf(list.get(i))>-1){
//判斷是否傳入的包名是否從dex解析的
? ? ? ? ? ? ? ? ? ? ? ? return adList.get(list.get(i));
? ? ? ? ? ? ? ? ? ? ?}
? ? ? ? ? ? ? ? ? if(dex){
? ? ? ? ? ? ? ? ? ? ? ? String test=list.get(i);
? ? ? ? ? ? ? ? ? ? ? ? if(packag.replace("/",".").indexOf(test)!=-1){
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return adList.get(list.get(i));
? ? ? ? ? ? ? ? ? ? ? ? ? ?}
? ? ? ? ? ? ? ? ? ? ?}
? ? ? ? ? ? ? ? ? //System.out.println(list.get(i)+" - "+adList.get(list.get(i)));
? ? ? ? ? ? ? ?}
? ? ? ? ? ? return "";
? ? ? ? ?}
}
總結
以上是生活随笔為你收集整理的Android实现 广告识别之 广告库的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: FIS.js前端开发的使用说明文档
- 下一篇: flex常见问题归纳