资源简介

仿抖音,火山小视频, 基于 ijkplayer的封装,实现上下滑动播放短视频。

资源截图

代码片段和文件信息

package com.hlsp.video;

import android.content.Context;
import android.graphics.Bitmap;
import android.support.multidex.MultiDex;

import com.apkfuns.logutils.LogLevel;
import com.apkfuns.logutils.LogUtils;
import com.baidu.mobstat.StatService;
import com.bumptech.glide.Glide;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.imagepipeline.core.ImagePipelineConfig;
import com.hlsp.video.model.HttpbaseUrl;
import com.hlsp.video.utils.CommonUtils;
import com.hlsp.video.utils.SpUtils;
import com.hlsp.video.utils.Utils;
import com.hlsp.video.utils.hookpms.ServiceManagerWraper;
import com.ss.android.common.applog.GlobalContext;
import com.ss.android.common.applog.UserInfo;

import cn.share.jack.cyghttp.app.CygApplication;
import cn.share.jack.cyghttp.app.HttpServletAddress;

/**
 * Created by jack on 2017/6/13
 */

public class App extends CygApplication {

    public static String IMEI;
    public static String PACKAGE_NAME;
    public static String VERSION_NAME;
    public static String CHANNEL_ID;
    public static String ANDROID_ID;
    public static String SERIAL_NO;

    @Override
    public void onCreate() {
        super.onCreate();
        ServiceManagerWraper.hookPMS(this.getApplicationContext());

        SpUtils.init(this);
        //缓存起来防止每次网络请求都去拿
        PACKAGE_NAME = CommonUtils.getProcessName();
        VERSION_NAME = Utils.getHasDotVersion(App.getInstance());
        CHANNEL_ID = CommonUtils.getmetaData(App.getInstance() “BaiduMobAd_CHANNEL“);
        IMEI = Utils.getDeviceIMEI(App.getInstance());
        ANDROID_ID = Utils.getDeviceAndroidId(App.getInstance());
        SERIAL_NO = Utils.getSerialNo();


        ImagePipelineConfig config = ImagePipelineConfig.newBuilder(getApplicationContext())
                .setDownsampleEnabled(true)   // 对图片进行自动缩放
                .setResizeAndRotateEnabledForNetwork(true)    // 对图片进行自动缩放
                .setBitmapsConfig(Bitmap.Config.RGB_565) //  //图片设置RGB_565,减小内存开销  fresco默认情况下是RGB_8888
                //other settings
                .build();
        Fresco.initialize(this config);


        if (BuildConfig.DEBUG) {
            HttpServletAddress.getInstance().setOfflineAddress(HttpbaseUrl.base_TEXT_URL);
        } else {
            HttpServletAddress.getInstance().setOnlineAddress(HttpbaseUrl.base_URL);
        }

        LogUtils.getLogConfig()
                .configAllowLog(BuildConfig.DEBUG)
                .configTagPrefix(this.getPackageName())
                .configShowBorders(true)
                .configFormatTag(“%d{HH:mm:ss:SSS} %t %c{-5}“)
                .configLevel(LogLevel.TYPE_VERBOSE);


        StatService.setDebugOn(BuildConfig.DEBUG);


        GlobalContext.setContext(getApplicationContext()); //Hook 抖音

        try {
            System.loadLibrary(“userinfo“);//抖音&火山
        } catch (Exception e) {
            e.printStackTrace();
        }

        UserInfo.setAppId(2);
        int result = UserInfo.initUser(“a3668f0afac72ca3f6c1697d29e

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-09-26 09:11  honglou-master\
     文件         238  2018-09-26 09:11  honglou-master\.gitignore
     目录           0  2018-09-26 09:11  honglou-master\CygHttp\
     文件         257  2018-09-26 09:11  honglou-master\CygHttp\.gitignore
     文件        1140  2018-09-26 09:11  honglou-master\CygHttp\build.gradle
     文件         933  2018-09-26 09:11  honglou-master\CygHttp\proguard-rules.pro
     目录           0  2018-09-26 09:11  honglou-master\CygHttp\src\
     目录           0  2018-09-26 09:11  honglou-master\CygHttp\src\main\
     文件         221  2018-09-26 09:11  honglou-master\CygHttp\src\main\AndroidManifest.xml
     目录           0  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\
     目录           0  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\
     目录           0  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\
     目录           0  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\
     目录           0  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\
     文件         498  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\ApiException.java
     文件         955  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\baseResponse.java
     文件        3597  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\baseRetrofit.java
     文件         313  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\ConstantCode.java
     文件         657  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\HttpFunction.java
     目录           0  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\app\
     文件        1613  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\app\CygApplication.java
     文件        1004  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\app\HttpServletAddress.java
     目录           0  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\callback\
     文件         240  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\callback\baseImpl.java
     文件        2287  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\callback\baseObserver.java
     文件        2730  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\callback\CygbaseObserver.java
     目录           0  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\convert\
     文件        1446  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\convert\CustomGsonConverterFactory.java
     文件        1247  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\convert\CustomGsonRequestBodyConverter.java
     文件        1382  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\convert\CustomGsonResponseBodyConverter.java
     目录           0  2018-09-26 09:11  honglou-master\CygHttp\src\main\java\cn\share\jack\cyghttp\interceptor\
............此处省略1168个文件信息

评论

共有 条评论