├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable │ │ │ │ └── side_nav_bar.xml │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── drawables.xml │ │ │ │ └── styles.xml │ │ │ ├── menu │ │ │ │ ├── main.xml │ │ │ │ └── activity_main_drawer.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ ├── drawable-v21 │ │ │ │ ├── ic_menu_send.xml │ │ │ │ ├── ic_menu_slideshow.xml │ │ │ │ ├── ic_menu_gallery.xml │ │ │ │ ├── ic_menu_manage.xml │ │ │ │ ├── ic_menu_camera.xml │ │ │ │ └── ic_menu_share.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── content_main.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── tube_loading.xml │ │ │ │ ├── app_bar_main.xml │ │ │ │ └── nav_header_main.xml │ │ ├── java │ │ │ └── dodola │ │ │ │ └── downtube │ │ │ │ ├── core │ │ │ │ ├── ResolutionNote.java │ │ │ │ ├── entity │ │ │ │ │ ├── VideoPlayBean.java │ │ │ │ │ ├── Resolution.java │ │ │ │ │ ├── MediaFileInfo.java │ │ │ │ │ ├── FmtStreamMap.java │ │ │ │ │ └── RingtoneEntity.java │ │ │ │ ├── RxYoutube.java │ │ │ │ └── YoutubeUtils.java │ │ │ │ ├── view │ │ │ │ └── YouTuBeWebView.java │ │ │ │ ├── utils │ │ │ │ └── LogUtil.java │ │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── dodola │ │ │ └── downtube │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── dodola │ │ └── downtube │ │ └── ApplicationTest.java ├── proguard-rules.pro ├── build.gradle └── app.iml ├── settings.gradle ├── imgs ├── img1.png └── img2.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── README.md ├── .gitignore ├── gradle.properties ├── DownTube.iml ├── LICENSE ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /imgs/img1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dodola/YoutubeDown/HEAD/imgs/img1.png -------------------------------------------------------------------------------- /imgs/img2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dodola/YoutubeDown/HEAD/imgs/img2.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dodola/YoutubeDown/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dodola/YoutubeDown/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dodola/YoutubeDown/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dodola/YoutubeDown/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dodola/YoutubeDown/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dodola/YoutubeDown/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/java/dodola/downtube/core/ResolutionNote.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. 3 | */ 4 | package dodola.downtube.core; 5 | 6 | public enum ResolutionNote { 7 | HD, MHD, LHD, XLHD 8 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Oct 31 15:20:04 CST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 4 | 6 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | #3F51B5 7 | #303F9F 8 | #FF4081 9 | 10 | -------------------------------------------------------------------------------- /app/src/test/java/dodola/downtube/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package dodola.downtube; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DownTube 2 | A YouTube Downloader, can download YouTube video on Android ,include encrypted video 3 | YouTube视频下载应用,可下载非加密和加密视频。 4 | 5 | 6 | ![](imgs/img1.png) 7 | 8 | ![](imgs/img2.png) 9 | 10 | 11 | ##待完成功能 12 | 13 | 1. 解决崩溃 14 | 2. 视频转Mp3功能 15 | 3. 直接下载音频功能 16 | 4. 下载管理 17 | 5. 直接音频播放 18 | 19 | ##Thanks 20 | 21 | * [RxJava](https://github.com/ReactiveX/RxJava) 22 | * [duktape](https://github.com/svaarala/duktape) -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | DownTube 6 | 7 | Open navigation drawer 8 | Close navigation drawer 9 | 10 | Settings 11 | 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | /*/build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | .idea/ 29 | -------------------------------------------------------------------------------- /app/src/androidTest/java/dodola/downtube/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package dodola.downtube; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/java/dodola/downtube/core/entity/VideoPlayBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. 3 | */ 4 | package dodola.downtube.core.entity; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | public class VideoPlayBean { 10 | /** 11 | * 视频id 12 | */ 13 | public String vid; 14 | 15 | /** 16 | * 视频的播放流 17 | */ 18 | public List currentMaps = new ArrayList(); 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 4 | > 5 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_send.xml: -------------------------------------------------------------------------------- 1 | 4 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | 64dp 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 16dp 7 | 160dp 8 | 9 | 16dp 10 | 16dp 11 | 16dp 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_slideshow.xml: -------------------------------------------------------------------------------- 1 | 4 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_gallery.xml: -------------------------------------------------------------------------------- 1 | 4 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_manage.xml: -------------------------------------------------------------------------------- 1 | 4 | 9 | 12 | -------------------------------------------------------------------------------- /app/src/main/java/dodola/downtube/core/entity/Resolution.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. 3 | */ 4 | package dodola.downtube.core.entity; 5 | 6 | import dodola.downtube.core.ResolutionNote; 7 | 8 | public class Resolution { 9 | public Resolution(String _id, String _resolution, String _format, String _type, ResolutionNote _notes) { 10 | id = _id; 11 | resolution = _resolution; 12 | format = _format; 13 | type = _type; 14 | notes = _notes; 15 | } 16 | 17 | public String id; 18 | public String resolution; 19 | public String format; 20 | public String type; 21 | public ResolutionNote notes; 22 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/baidu/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 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_camera.xml: -------------------------------------------------------------------------------- 1 | 4 | 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_share.xml: -------------------------------------------------------------------------------- 1 | 4 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/values/drawables.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | @android:drawable/ic_menu_camera 7 | 8 | @android:drawable/ic_menu_gallery 10 | 11 | @android:drawable/ic_menu_slideshow 13 | 14 | @android:drawable/ic_menu_manage 16 | 17 | @android:drawable/ic_menu_share 19 | 20 | @android:drawable/ic_menu_send 22 | 23 | 24 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 14 | 18 |