Skip to content

Commit 15b7c4a

Browse files
authored
Add d2g sample project (#1)
* Add gitignore * Add empty project * Add doris-android as dependency + implement simple DASH playback. * Add sample d2g sample project
1 parent 110e301 commit 15b7c4a

Some content is hidden

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

43 files changed

+1140
-0
lines changed

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/
5+
.DS_Store
6+
/build
7+
/captures
8+
.externalNativeBuild
9+
.cxx
10+
local.properties

build.gradle

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
plugins {
3+
id 'com.android.application' version '7.2.0' apply false
4+
id 'com.android.library' version '7.2.0' apply false
5+
}
6+
7+
apply from: 'dependencies.gradle'
8+
9+
task clean(type: Delete) {
10+
delete rootProject.buildDir
11+
}

d2g/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

d2g/build.gradle

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
plugins {
2+
id 'com.android.application'
3+
}
4+
5+
android {
6+
compileSdk 32
7+
8+
defaultConfig {
9+
applicationId "com.dice.doris.example"
10+
minSdk 23
11+
targetSdk 32
12+
versionCode 1
13+
versionName "1.0"
14+
15+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
16+
}
17+
18+
buildTypes {
19+
release {
20+
minifyEnabled false
21+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22+
}
23+
}
24+
compileOptions {
25+
sourceCompatibility JavaVersion.VERSION_1_8
26+
targetCompatibility JavaVersion.VERSION_1_8
27+
}
28+
}
29+
30+
dependencies {
31+
32+
implementation 'androidx.appcompat:appcompat:1.5.1'
33+
implementation 'com.google.android.material:material:1.8.0'
34+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
35+
36+
37+
// If dorisVersion >= 2.2.13
38+
implementation "com.github.DiceTechnology.doris-android:doris:$dorisVersion"
39+
implementation "com.github.DiceTechnology.doris-android:doris-ui:$dorisVersion"
40+
41+
// If dorisVersion < 2.2.13
42+
/*
43+
implementation ("com.github.DiceTechnology.doris-android:doris:$dorisVersion") {
44+
exclude group: 'com.github.DiceTechnology', module: 'dice-shield-android'
45+
}
46+
implementation ("com.github.DiceTechnology.doris-android:doris-ui:$dorisVersion") {
47+
exclude group: 'com.github.DiceTechnology', module: 'dice-shield-android'
48+
}
49+
implementation("com.github.DiceTechnology:dice-shield-android:$diceShieldVersion") {
50+
exclude group: "com.google.android.exoplayer", module: "exoplayer"
51+
}
52+
*/
53+
54+
// RxJava
55+
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
56+
implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
57+
}

d2g/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile

d2g/src/main/AndroidManifest.xml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.dice.doris.example">
4+
5+
<uses-permission android:name="android.permission.INTERNET" />
6+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
7+
8+
<application
9+
android:allowBackup="true"
10+
android:icon="@mipmap/ic_launcher"
11+
android:label="@string/app_name"
12+
android:roundIcon="@mipmap/ic_launcher_round"
13+
android:theme="@style/AppTheme">
14+
<activity
15+
android:name=".MainActivity"
16+
android:exported="true"
17+
android:screenOrientation="portrait">
18+
<intent-filter>
19+
<action android:name="android.intent.action.MAIN" />
20+
<category android:name="android.intent.category.LAUNCHER" />
21+
</intent-filter>
22+
</activity>
23+
<activity
24+
android:name=".PlayerActivity"
25+
android:screenOrientation="portrait"
26+
android:exported="true" />
27+
</application>
28+
29+
</manifest>

0 commit comments

Comments
 (0)