Skip to content

Commit 88be070

Browse files
committed
公共库更新
1 parent 6073573 commit 88be070

File tree

7 files changed

+45
-13
lines changed

7 files changed

+45
-13
lines changed

APPTest/build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ android {
2828
}
2929
}
3030

31+
packagingOptions {
32+
project.doNotStripList.each { item ->
33+
doNotStrip item
34+
}
35+
project.excludeList.each { item ->
36+
exclude item
37+
}
38+
}
39+
3140
lintOptions {
3241
abortOnError false
3342
}

APPTest/src/main/java/com/bihe0832/android/test/module/TestDebugTempFragment.kt

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
package com.bihe0832.android.test.module
22

33
import android.content.Intent
4-
import android.provider.MediaStore
54
import android.view.View
65
import com.bihe0832.android.app.about.AboutActivity
6+
import com.bihe0832.android.common.photos.cropPhoto
7+
import com.bihe0832.android.common.photos.getDefaultPhoto
8+
import com.bihe0832.android.common.photos.getPhotosFolder
9+
import com.bihe0832.android.common.photos.showPhotoChooser
10+
import com.bihe0832.android.framework.constant.ZixieActivityRequestCode
711
import com.bihe0832.android.lib.adapter.CardBaseModule
812
import com.bihe0832.android.lib.log.ZLog
13+
import com.bihe0832.android.lib.ui.photos.Photos
14+
import com.bihe0832.android.lib.utils.intent.IntentUtils
915
import com.bihe0832.android.test.base.BaseTestFragment
1016
import com.bihe0832.android.test.base.item.TestItemData
11-
import java.lang.Exception
1217

1318

1419
class
@@ -21,6 +26,7 @@ TestDebugTempFragment : BaseTestFragment() {
2126
add(TestItemData("通用测试预处理", View.OnClickListener { preTest() }))
2227
add(TestItemData("测试自定义请求", View.OnClickListener { testOneRequest() }))
2328
add(TestItemData("默认关于页", View.OnClickListener { startActivity(AboutActivity::class.java) }))
29+
add(TestItemData("APP设置", View.OnClickListener { IntentUtils.startAppDetailSettings(context) }))
2430
}
2531
}
2632

@@ -34,14 +40,19 @@ TestDebugTempFragment : BaseTestFragment() {
3440
private fun testFunc() {
3541
ZLog.d("test")
3642
try {
37-
val takePhotoIntent = Intent(MediaStore.ACTION_IMAGE_CAPTURE) //用来打开相机的Intent
38-
if (takePhotoIntent.resolveActivity(context!!.getPackageManager()) != null) { //这句作用是如果没有相机则该应用不会闪退,要是不加这句则当系统没有相机应用的时候该应用会闪退
39-
activity!!.startActivityForResult(takePhotoIntent, 1) //启动相机
40-
}
41-
}catch (e:Exception){
43+
activity?.showPhotoChooser()
44+
} catch (e: Exception) {
4245
e.printStackTrace()
4346
}
44-
4547
}
4648

49+
50+
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
51+
super.onActivityResult(requestCode, resultCode, data)
52+
ZLog.d("PhotoChooser", "in PhotoChooser onResult, $this, $requestCode, $resultCode, ${data?.data}")
53+
if (requestCode == ZixieActivityRequestCode.TAKE_PHOTO) {
54+
Photos.addPicToPhotos(context, activity!!.getDefaultPhoto().absolutePath)
55+
activity?.cropPhoto(activity!!.getDefaultPhoto().absolutePath, activity!!.getPhotosFolder() + "a.jpg", 2)
56+
}
57+
}
4758
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<resources>
2-
<string name="lib_bihe0832_file_folder">zixie/</string>
32
<color name="common_activity_bg">@color/colorPrimaryDark</color>
43
<string name="update_url">https://cdn.bihe0832.com/app/update/get_apk.json</string>
54
</resources>

Application/src/main/java/com/bihe0832/android/app/update/UpdateManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ object UpdateManager {
8383
}
8484
}
8585
}.let {
86-
HTTPServer.getInstance().doRequest(it)
86+
HTTPServer.getInstance().doRequestAsync(it)
8787
}
8888
}
8989
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="lib_bihe0832_file_folder">zixie/</string>
3+
</resources>

config.gradle

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,26 @@ ext {
4040
]
4141

4242
//使用kotlin版本
43-
kotlin_version = '1.3.50'
43+
kotlin_version = '1.3.71'
4444
glide_version = "4.6.1"
4545
gson_version = "2.8.2"
4646
//使用Android Support库版本
47-
android_support_version = "27.0.0"
47+
android_support_version = "28.0.0"
4848
android_constraint_layout_version = '1.1.3'
4949
android_arch_lifecycle_version = '1.1.1'
5050
android_arch_persistence_version = '1.1.1'
5151
robolectricVersion = '3.3.2'
5252

53-
aaf_version ='3.7.9'
53+
5454
aaf_router_version = '3.7.9'
55+
aaf_version ='3.8.0'
5556

57+
excludeList = [
58+
'META-INF/*.kotlin_module',
59+
'META-INF/proguard/androidx-annotations.pro'
60+
]
61+
62+
doNotStripList = [
63+
"*/armeabi-v7a/*.so"
64+
]
5665
}

dependencies.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ ext.moduleInfo = [
4545
"Application" : [
4646
"apidependenciesList" : [
4747
"com.bihe0832.android:common-feedback:${project.aaf_version}",
48+
"com.bihe0832.android:common-photos:${project.aaf_version}",
4849
"com.bihe0832.android:framework:${project.aaf_version}",
4950
'com.squareup.okhttp3:okhttp:3.9.1',
5051
'com.squareup.okhttp3:logging-interceptor:3.8.0',

0 commit comments

Comments
 (0)