├── .gitattributes
├── .gitignore
├── .idea
├── gradle.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── .project
├── .settings
└── org.eclipse.buildship.core.prefs
├── README.md
├── app
├── .classpath
├── .gitignore
├── .project
├── .settings
│ └── org.eclipse.buildship.core.prefs
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── heroisuseless
│ │ └── fileshortcuts
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── heroisuseless
│ │ │ └── fileshortcuts
│ │ │ └── ActivityMain.kt
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── avi.png
│ │ ├── bmp.png
│ │ ├── css.png
│ │ ├── doc.png
│ │ ├── file.png
│ │ ├── gif.png
│ │ ├── html.png
│ │ ├── ic_launcher_background.xml
│ │ ├── jpg.png
│ │ ├── mp3.png
│ │ ├── mp4.png
│ │ ├── mpeg.png
│ │ ├── ogg.png
│ │ ├── pdf.png
│ │ ├── png.png
│ │ ├── ppt.png
│ │ ├── rar.png
│ │ ├── shortcuts.png
│ │ ├── txt.png
│ │ ├── xls.png
│ │ ├── xml.png
│ │ ├── z7.png
│ │ └── zip.png
│ │ ├── layout
│ │ └── activity_main.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ └── xml
│ │ └── file_paths.xml
│ └── test
│ └── java
│ └── com
│ └── heroisuseless
│ └── fileshortcuts
│ └── ExampleUnitTest.kt
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── img
├── 1.png
├── 2.png
├── 3.png
├── 4.png
└── 5.png
├── settings.gradle
└── 应用程序在这里
└── FileShortcuts.apk
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | FileShortcuts
4 | Project FileShortcuts created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.buildship.core.gradleprojectbuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.buildship.core.gradleprojectnature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # FileShortcuts - 文件快捷方式
2 |
3 | > 这是一个Android APP,作用是能把文件的快捷方式放到桌面上,当点击这个快捷方式的时候自动调用第三方app打开。
4 |
5 | 要下载此app,[点击这里](https://github.com/HeroIsUseless/FileShortcuts/tree/master/%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E5%9C%A8%E8%BF%99%E9%87%8C)
6 |
7 | ## 用法
8 |
9 | > 因为此app没有界面,因此它的用法需要说明一下。
10 |
11 | **注意** 当安装上并打开此app后,并不会显示界面。
12 |
13 | ### 如何添加一个文件的快捷方式到桌面上?
14 |
15 | 首先,打开手机自带的文件管理器,找到目标文件。
16 |
17 | 然后,长按该文件,并选择 更多-用其他应用打开
18 |
19 | 
20 |
21 | 然后,点击桌面快捷方式,即可在桌面上发现该快捷方式
22 |
23 | 
24 |
25 | 
26 |
27 | **注意** 因为在打开文件快捷方式的时候是先打开此app,然后再打开第三方app,因此打开速度会比平时慢一些。
28 |
29 | **注意** 不要使用"下次默认选择此项,不再提示"选项,否则在下次创建快捷方式的时候点击"用其他应用打开"时会自动跳转到第三方程序。
30 |
31 | 
32 |
33 | 此app支持的文件类型:
34 |
35 | ```
36 |
37 | doc
38 | pdf
39 | xls
40 | ppt
41 | rar
42 | zip
43 | mp3
44 | gif
45 | jpeg jpg
46 | png
47 | bmp
48 | css
49 | html htm
50 | txt
51 | xml
52 | mp4
53 | wmv
54 |
55 | ```
56 |
57 | ## 如果我点击了"下次默认选择此项,不再提示"导致不能再创建文件快捷方式,怎么办?
58 |
59 | 首先,点击设置,进入"更多应用",点开右上角,有"重置应用偏好设置",点击即可。
60 |
61 | 
--------------------------------------------------------------------------------
/app/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | app
4 | Project app created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.buildship.core.gradleprojectbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.buildship.core.gradleprojectnature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=..
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | apply plugin: 'kotlin-android'
4 |
5 | apply plugin: 'kotlin-android-extensions'
6 |
7 | android {
8 | compileSdkVersion 26
9 | defaultConfig {
10 | applicationId "com.heroisuseless.fileshortcuts"
11 | minSdkVersion 15
12 | targetSdkVersion 26
13 | versionCode 1
14 | versionName "1.0"
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 | }
24 |
25 | dependencies {
26 | implementation fileTree(dir: 'libs', include: ['*.jar'])
27 | implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
28 | implementation 'com.android.support:appcompat-v7:26.1.0'
29 | implementation 'com.android.support.constraint:constraint-layout:1.1.3'
30 | testImplementation 'junit:junit:4.12'
31 | androidTestImplementation 'com.android.support.test:runner:0.5'
32 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
33 | }
34 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
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
22 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/heroisuseless/fileshortcuts/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.heroisuseless.fileshortcuts
2 |
3 | import android.support.test.InstrumentationRegistry
4 | import android.support.test.runner.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getTargetContext()
22 | assertEquals("com.heroisuseless.fileshortcuts", appContext.packageName)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
17 |
20 |
21 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/app/src/main/java/com/heroisuseless/fileshortcuts/ActivityMain.kt:
--------------------------------------------------------------------------------
1 | package com.heroisuseless.fileshortcuts
2 |
3 | import android.app.Activity
4 | import android.support.v7.app.AppCompatActivity
5 | import android.os.Bundle
6 | import android.widget.Toast
7 | import kotlinx.android.synthetic.main.activity_main.*
8 | import android.content.Intent
9 | import android.net.Uri
10 | import android.os.StrictMode
11 | import android.os.Build
12 | import java.io.File
13 | import java.io.FileReader
14 | // 添加一个新的文件类型分四步
15 | // 向mainfest中添加
16 | // 添加图片资源
17 | // 在getImgRes中添加
18 | // 在getfileType中添加
19 | class ActivityMain : Activity() {
20 |
21 | override fun onCreate(savedInstanceState: Bundle?) {
22 | super.onCreate(savedInstanceState)
23 | setContentView(R.layout.activity_main)
24 |
25 | if (Intent.ACTION_VIEW.equals(intent.action)) { // 是,则创建快捷方式
26 | val uri = intent.data
27 | val filePath = Uri.decode(uri!!.encodedPath)
28 | createShortCuts(filePath)
29 | }
30 | else{ // 否,则打开快捷方式
31 | var filePath: String? = intent.getStringExtra("filePath")
32 | if(filePath != null){
33 | openFileByThirdAPP(filePath)
34 | }
35 | }
36 | }
37 | //-----------------------------------------------------------------------------------------------------
38 | fun createShortCuts(filePath: String) {
39 | var fileName: String = filePath.split('/').last() // 文件名
40 | var fileType: String = fileName.split('.').last() // 文件类型
41 | val shortcut = Intent("com.android.launcher.action.INSTALL_SHORTCUT")// 安装的Intent
42 | shortcut.putExtra(Intent.EXTRA_SHORTCUT_NAME, fileName)// 快捷名称
43 | // 快捷图标
44 | val iconRes = Intent.ShortcutIconResource.fromContext(this, getImgRes(fileType))
45 | shortcut.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, iconRes)
46 | shortcut.putExtra("duplicate", true)// 快捷图标不允许重复
47 | val shortcutIntent = Intent(Intent.ACTION_MAIN)
48 | shortcutIntent.putExtra("filePath", filePath)
49 | shortcutIntent.setClass(this, ActivityMain::class.java)
50 | shortcutIntent.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP
51 | shortcut.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent)
52 | this.sendBroadcast(shortcut)
53 | Toast.makeText(this, "生成"+fileName, Toast.LENGTH_SHORT).show() // 提示生成成功
54 | }
55 |
56 | fun openFileByThirdAPP(filePath: String) {
57 | var fileName: String = filePath.split('/').last() // 文件名
58 | var fileType: String = fileName.split('.').last() // 文件类型
59 | if(File(filePath).exists()){ // 首先判断文件存不存在
60 | val intent = Intent(Intent.ACTION_VIEW)
61 | // 判断版本大于等于7.0
62 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
63 | val builder = StrictMode.VmPolicy.Builder()
64 | StrictMode.setVmPolicy(builder.build()) // 严格模式
65 | }
66 | val data = Uri.fromFile(File(filePath))
67 | intent.setDataAndType(data, getFileType(fileType))
68 | this.startActivity(intent) // 开启第三方程序打开文件
69 | }else{//如果不存在就删除这个快捷方式,在小米系统上不管用,在三星上可以移除
70 | Toast.makeText(this, "文件已不存在", Toast.LENGTH_SHORT).show()
71 | val intent = Intent("com.android.launcher.action.UNINSTALL_SHORTCUT")
72 | intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, fileName)// 名字
73 | val launcherIntent = Intent(this, ActivityMain::class.java).setAction(Intent.ACTION_MAIN) // 设置关联程序
74 | intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, launcherIntent)
75 | sendBroadcast(intent)// 发送广播
76 | }
77 | }
78 |
79 | fun getImgRes(fileType: String): Int {
80 | val map = HashMap()
81 | map.put("txt", R.drawable.txt)
82 | map.put("doc", R.drawable.doc)
83 | map.put("docx", R.drawable.doc)
84 | map.put("ppt", R.drawable.ppt)
85 | map.put("xls", R.drawable.xls)
86 | map.put("html", R.drawable.html)
87 | map.put("htm", R.drawable.html)
88 | map.put("xml", R.drawable.xml)
89 | map.put("css", R.drawable.css)
90 | map.put("pdf", R.drawable.pdf)
91 | map.put("gif", R.drawable.gif)
92 | map.put("png", R.drawable.png)
93 | map.put("jpg", R.drawable.jpg)
94 | map.put("jpeg", R.drawable.jpg)
95 | map.put("bmp", R.drawable.bmp)
96 | map.put("mp3", R.drawable.mp3)
97 | map.put("mp4", R.drawable.mp4)
98 | map.put("ogg", R.drawable.ogg)
99 | map.put("avi", R.drawable.avi)
100 | map.put("rar", R.drawable.rar)
101 | map.put("zip", R.drawable.zip)
102 | map.put("7z", R.drawable.z7)
103 | //容错处理
104 | if(fileType.toLowerCase() in map.keys){
105 | return map[fileType.toLowerCase()]!!
106 | }
107 | else{
108 | return R.drawable.file
109 | }
110 | }
111 |
112 | fun getFileType(fileType: String): String? {
113 | val map = HashMap()
114 | map.put("txt", "text/html")
115 | map.put("doc", "application/msword")
116 | map.put("docx", "application/msword")
117 | map.put("ppt", "application/mspowerpoint")
118 | map.put("xls", "application/excel")
119 | map.put("html", "text/html")
120 | map.put("htm", "text/html")
121 | map.put("xml", "text/html")
122 | map.put("pdf","application/pdf")
123 | map.put("gif", "image/gif")
124 | map.put("jpg", "image/jpg")
125 | map.put("jpeg", "image/jpeg")
126 | map.put("png", "image/png")
127 | map.put("mp3", "audio/mpeg")
128 | map.put("ogg", "audio/ogg")
129 | map.put("mp4", "vedio/mp4")
130 | map.put("zip", "application/zip")
131 | map.put("rar", "application/rar")
132 | map.put("7z", "application/7z")
133 | // 容错处理
134 | if(fileType.toLowerCase() in map.keys){
135 | return map[fileType.toLowerCase()]
136 | }
137 | else{
138 | return "*/*"
139 | }
140 | }
141 |
142 | override fun onResume() {
143 | super.onResume()
144 | this.finish()
145 | }
146 |
147 | }
148 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/avi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/avi.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bmp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/bmp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/css.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/css.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/doc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/doc.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/file.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/gif.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/gif.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/html.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/html.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/jpg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/jpg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/mp3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/mp3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/mp4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/mp4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/mpeg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/mpeg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ogg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/ogg.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pdf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/pdf.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/png.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/png.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ppt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/ppt.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/rar.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shortcuts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/shortcuts.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/txt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/txt.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/xls.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/xls.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/xml.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/xml.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/z7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/z7.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/zip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/drawable/zip.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 桌面快捷方式
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/file_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/test/java/com/heroisuseless/fileshortcuts/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.heroisuseless.fileshortcuts
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext.kotlin_version = '1.1.51'
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.0.1'
11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/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 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Jan 14 17:03:31 CST 2019
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-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/img/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/img/1.png
--------------------------------------------------------------------------------
/img/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/img/2.png
--------------------------------------------------------------------------------
/img/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/img/3.png
--------------------------------------------------------------------------------
/img/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/img/4.png
--------------------------------------------------------------------------------
/img/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/img/5.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/应用程序在这里/FileShortcuts.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HeroIsUseless/FileShortcuts/bf38698726a249303290db6a0c770d677c9edaa1/应用程序在这里/FileShortcuts.apk
--------------------------------------------------------------------------------