一些第三方依赖以及一些字段
Android、Kotlin 开发中用到的第三方依赖
高德
导依赖:
implementation ‘com.amap.api:map2d:latest.integration’
implementation ‘com.amap.api:location:latest.integration’
eventbus:
implementation ‘org.greenrobot:eventbus:3.0.0’
轮播图:
implementation ‘com.youth.banner:banner:1.4.10’
TabLayout:
implementation ‘com.android.support:design:28.0.0’
xutils依赖
implementation ‘org.xutils:xutils:3.5.1’
okHttp依赖
implementation ‘com.squareup.okhttp3:okhttp:3.12.1’
Volley依赖
implementation ‘eu.the4thfloor.volley:com.android.volley:2015.05.28’
RecyclerView:
implementation ‘com.android.support:recyclerview-v7:28.0.0’
swipelayout侧滑:
implementation “com.daimajia.swipelayout:library:1.2.0”
正弦波公式:
int newy = y - (int) (100 * Math.sin((x - 5) * 2 * Math.PI / 150));
下载文件——断点续传 :
implementation ‘zlc.season:rxdownload2:2.0.2’
xRecyclerView:
implementation ‘com.android.support:recyclerview-v7:28.0.0’
api(‘com.jcodecraeer:xrecyclerview:1.5.9’) {
exclude group: ‘com.android.support’
}
Toolbar/侧滑:
implementation ‘com.android.support:design:28.0.0’
glide:
implementation ‘com.github.bumptech.glide:glide:4.1.1’
录音权限:
implementation ‘com.ilike:voicerecorder:1.0.0’
PathUtil
获取图片视屏:
implementation ‘com.lcw.library:imagepicker:2.2.2’
二级联动依赖:
implementation ‘com.gjiazhe:wavesidebar:1.3’
butterknife:
implementation ‘com.jakewharton:butterknife:8.8.1’
annotationProcessor ‘com.jakewharton:butterknife-compiler:8.8.1’
retrofit:
implementation ‘com.squareup.retrofit2:retrofit:2.2.0’
implementation ‘com.squareup.retrofit2:converter-gson:2.2.0’
fresco:
implementation ‘com.facebook.fresco:fresco:1.11.0’
ORM 数据库
implementation ‘com.j256.ormlite:ormlite-android:5.0’
implementation ‘com.j256.ormlite:ormlite-core:5.0’
GSON:
implementation ‘com.google.code.gson:gson:2.8.0’
implementation ‘com.alibaba:fastjson:1.2.41’
RXJava使用Retrofit:
implementation ‘com.squareup.retrofit2:adapter-rxjava:2.1.0’
implementation ‘io.reactivex:rxandroid:1.2.1’
调用手机系统应用到的字段:
内容提供者
获取手机联系人
权限:
uri: ContactsContract.CommonDataKinds.Phone.CONTENT_URI
字段:ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME:姓名
ContactsContract.CommonDataKinds.Phone.NUMBER:电话
获取手机短信
权限:
uri: Telephony.Sms.CONTENT_URI
字段:Telephony.Sms.ADDRESS 地址
Telephony.Sms.BODY 内容
获取音频
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- 读外部存储权限 -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
uri:MediaStore.Audio.Media.EXTERNAL_CONTENT_URI
字段:MediaStore.Audio.Media.TITLE歌名
MediaStore.Audio.Media.ARTIST歌手
MediaStore.Audio.Media.DURATION总时长
MediaStore.Audio.Media.DATA地址
获取视频
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- 读外部存储权限 -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
uri:MediaStore.Video.Media.EXTERNAL_CONTENT_URI
字段:MediaStore.Video.Media.TITLE歌名
MediaStore.Video.Media.ARTIST歌手
MediaStore.Video.Media.DURATION总时长
MediaStore.Video.Media.DATA地址
获取图库:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- 读外部存储权限 -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
uri:MediaStore.Images.Media.EXTERNAL_CONTENT_URI
字段:MediaStore.Images.Media.TITLE;图片名称
MediaStore.Images.Media.SIZE;大小
MediaStore.Images.Media.DATA;地址
广播接收者
1.权限
<uses-permission android:name="android.permission.RECEIVE_SMS" />
action:android.provider.Telephony.SMS_RECEIVED"
打电话权限
action:android.intent.action.NEW_OUTGOING_CALL
android.intent.action.BOOT_COMPLETED