Skip to content

Commit 38ba638

Browse files
authored
Merge pull request #21 from VideoOS/merge
add demo
2 parents 06fbc92 + e4ffe44 commit 38ba638

File tree

105 files changed

+7469
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+7469
-0
lines changed

VideoOS/videoos_demo/build.gradle

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
apply plugin: 'com.android.application'
2+
3+
configurations.all {
4+
resolutionStrategy.force 'com.android.support:support-annotations:28.0.0'
5+
}
6+
7+
android {
8+
compileSdkVersion 28
9+
buildToolsVersion '28.0.3'
10+
defaultConfig {
11+
minSdkVersion 19
12+
targetSdkVersion 28
13+
versionCode 49
14+
versionName "1.0.49"
15+
javaCompileOptions {
16+
annotationProcessorOptions {
17+
arguments = [moduleName: project.getName()]
18+
}
19+
}
20+
multiDexEnabled true
21+
compileOptions {
22+
sourceCompatibility JavaVersion.VERSION_1_7
23+
targetCompatibility JavaVersion.VERSION_1_7
24+
}
25+
}
26+
buildTypes {
27+
debug {
28+
minifyEnabled false
29+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
30+
}
31+
release {
32+
//是否混淆
33+
minifyEnabled true
34+
shrinkResources true
35+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
36+
}
37+
38+
preRelease {
39+
//是否混淆
40+
minifyEnabled true
41+
shrinkResources true
42+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
43+
}
44+
}
45+
46+
lintOptions {
47+
abortOnError false
48+
}
49+
sourceSets {
50+
main {
51+
assets.srcDirs = ['src/main/assets']
52+
}
53+
}
54+
55+
configurations {
56+
all*.exclude group: 'com.android.support', module: 'support-v4'
57+
}
58+
}
59+
//apply from: 'fat-aar.gradle'
60+
dependencies {
61+
compile fileTree(include: ['*.jar'], dir: 'libs')
62+
63+
64+
compile 'com.shuyu:GSYVideoPlayer:4.1.0'
65+
compile 'com.github.razerdp:BasePopup:2.1.9'
66+
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.46'
67+
compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2'
68+
compile 'com.android.support:recyclerview-v7:28.0.0'
69+
compile 'com.android.support:appcompat-v7:28.0.0'
70+
compile 'com.alibaba:fastjson:1.1.70.android'
71+
compile 'com.android.support.constraint:constraint-layout:1.1.0'
72+
compile 'com.android.support:multidex:1.0.1'
73+
// compile 'com.github.bumptech.glide:glide:4.5.0'
74+
// compile "com.videoli:venvy_glide_v4:1.0.1"
75+
76+
compile "com.github.bumptech.glide:glide:3.7.0"
77+
compile 'com.videoli:venvy_glide:1.0.4'
78+
compile 'com.github.yyued:SVGAPlayer-Android:2.1.10'
79+
compile "com.squareup.okhttp3:okhttp:3.4.1"
80+
compile "com.squareup.okio:okio:1.12.0"
81+
compile project(':venvy_pub')
82+
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.6.2'
83+
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2'
84+
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2'
85+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /Users/yanjiangbo/Library/Android/sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
18+
19+
# Uncomment this to preserve the line number information for
20+
# debugging stack traces.
21+
#-keepattributes SourceFile,LineNumberTable
22+
23+
# If you keep the line number information, uncomment this to
24+
# hide the original source file name.
25+
#-renamesourcefileattribute SourceFile
26+
27+
-ignorewarnings
28+
#videojj
29+
-keep public class cn.com.venvy.processor.build.venvy_pub$$VenvyRoleMapUtil{ *; }
30+
-keep class cn.com.venvy.lua.** {
31+
<fields>;
32+
<methods>;
33+
}
34+
-keep class cn.com.videopls.** {
35+
<fields>;
36+
<methods>;
37+
}
38+
39+
#gsyPlayer
40+
-keep class com.shuyu.gsyvideoplayer.video.** { *; }
41+
-dontwarn com.shuyu.gsyvideoplayer.video.**
42+
-keep class com.shuyu.gsyvideoplayer.video.base.** { *; }
43+
-dontwarn com.shuyu.gsyvideoplayer.video.base.**
44+
-keep class com.shuyu.gsyvideoplayer.utils.** { *; }
45+
-dontwarn com.shuyu.gsyvideoplayer.utils.**
46+
-keep class tv.danmaku.ijk.** { *; }
47+
-dontwarn tv.danmaku.ijk.**
48+
49+
-keep public class * extends android.view.View{
50+
*** get*();
51+
void set*(***);
52+
public <init>(android.content.Context);
53+
public <init>(android.content.Context, android.util.AttributeSet);
54+
public <init>(android.content.Context, android.util.AttributeSet, int);
55+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="both.video.venvy.com.appdemo">
5+
6+
<uses-sdk
7+
android:minSdkVersion="14"
8+
android:targetSdkVersion="25" />
9+
10+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
11+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
12+
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
13+
14+
<application
15+
android:name=".MyApp"
16+
android:allowBackup="true"
17+
android:icon="@mipmap/ic_launcher"
18+
android:label="@string/app_name"
19+
android:largeHeap="true"
20+
android:supportsRtl="true"
21+
android:networkSecurityConfig="@xml/network_security_config"
22+
android:theme="@style/BaseTheme">
23+
<activity
24+
android:name=".activity.NavigationActivity"
25+
android:configChanges="orientation|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
26+
android:screenOrientation="portrait"
27+
android:windowSoftInputMode="adjustResize|stateHidden">
28+
<intent-filter>
29+
<action android:name="android.intent.action.MAIN" />
30+
<action android:name="android.intent.action.VIEW" />
31+
32+
<category android:name="android.intent.category.LAUNCHER" />
33+
</intent-filter>
34+
</activity>
35+
<activity
36+
android:name=".activity.OsActivity"
37+
android:configChanges="orientation|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
38+
android:screenOrientation="portrait"/>
39+
<activity
40+
android:name=".activity.LiveActivity"
41+
android:configChanges="orientation|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
42+
android:screenOrientation="portrait"/>
43+
<activity
44+
android:name=".activity.LoginActivity"
45+
android:configChanges="orientation|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
46+
android:screenOrientation="portrait"/>
47+
</application>
48+
49+
</manifest>
6.58 MB
Binary file not shown.
6.6 MB
Binary file not shown.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package both.video.venvy.com.appdemo;
2+
3+
import java.util.List;
4+
5+
import both.video.venvy.com.appdemo.bean.ConfigData;
6+
import both.video.venvy.com.appdemo.observe.IView;
7+
8+
public interface IConfigView extends IView {
9+
void doBackClick();//返回按钮点击
10+
11+
void doUpdate(String appKey, String appSecret);//更新配置点击
12+
13+
void doNetConfigInfo(List<ConfigData.ConfigInfo.AppInfo> appInfo);
14+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package both.video.venvy.com.appdemo;
2+
3+
import android.app.Application;
4+
import android.content.Context;
5+
import android.support.multidex.MultiDex;
6+
7+
import com.taobao.luaview.util.ToastUtil;
8+
9+
import both.video.venvy.com.appdemo.utils.ConfigUtil;
10+
import cn.com.venvy.Config;
11+
import cn.com.venvy.common.debug.DebugStatus;
12+
import cn.com.venvy.common.utils.VenvyLog;
13+
import cn.com.videopls.pub.VideoPlus;
14+
15+
/**
16+
* Created by lgf on 2017/3/22.
17+
*/
18+
19+
public class MyApp extends Application {
20+
21+
private static MyApp appContext;
22+
23+
public static MyApp getInstance() {
24+
return appContext;
25+
}
26+
27+
@Override
28+
protected void attachBaseContext(Context base) {
29+
super.attachBaseContext(base);
30+
MultiDex.install(this);
31+
}
32+
33+
@Override
34+
public void onCreate() {
35+
super.onCreate();
36+
appContext = this;
37+
ToastUtil.showToast(this,"init app");
38+
ConfigUtil.putAppKey(ConfigUtil.RELEASE_APP_KEY);
39+
ConfigUtil.putAppSecret(ConfigUtil.RELEASE_APP_SECRET);
40+
DebugStatus.changeEnvironmentStatus(DebugStatus.EnvironmentStatus.RELEASE);
41+
VenvyLog.needLog = true;
42+
VideoPlus.appCreateSAAS(MyApp.this, ConfigUtil.getAppKey(), ConfigUtil.getAppSecret());
43+
}
44+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package both.video.venvy.com.appdemo;
2+
3+
public class UrlContent {
4+
public static final String HOME_DATA_TAG = "home_video_data";
5+
public static final String HOME_DATA_LIST_TAG = "home_video_data_list";
6+
public static final String HOME_DATA_POSITION_TAG = "home_video_data_position";
7+
8+
public static final String CONFIG_APPKEY_TAG = "AppKey";
9+
public static final String CONFIG_APPSECRET_TAG = "AppSecret";
10+
11+
12+
private static final String RELEASE_APP_KEY = "4bd773ed-ad39-4dc5-87b1-c9e35ceeee8f";
13+
private static final String RELEASE_APP_SECRET = "da1b1ff3a8e749e7";
14+
15+
private static final String TEST_APP_KEY = "093c1f40-1180-4037-94c0-8a90e1d506ce";
16+
private static final String TEST_APP_SECRET = "6cc1f566c36e4165";
17+
18+
public static final String DEFAULT_APPKEY = RELEASE_APP_KEY;
19+
public static final String DEFAULT_APPSECRET = RELEASE_APP_SECRET;
20+
21+
public static final String URL_APP_INFO = "https://mock.videojj.com/mock/5c8224a5380a47002f43f740/asmpapi/videoos_test_demo_appinfo";
22+
23+
public static final String URL_VIDEO_INFO = "http://mock.videojj.com/mock/5c8224a5380a47002f43f740/asmpapi/videoos_test_videoinfo";
24+
25+
// public static final String URL_APP_QUERY_LAUNCH_INFO = "https://os-saas.videojj.com/os-api-saas/api/config";
26+
public static final String URL_APP_QUERY_LAUNCH_INFO = "https://os-saas.videojj.com/os-api-saas/api/queryLaunchInfo";
27+
}

0 commit comments

Comments
 (0)