Android 摘要
-
Android應(yīng)用權(quán)限管理 Understanding App Permissions
Android Marshmallow(API 23)引入了動(dòng)態(tài)權(quán)限,當(dāng)targetSdkVersion >= 23 時(shí),需要處理動(dòng)態(tài)權(quán)限,但普通權(quán)限Normal Permissions還是依然是直接在AndroidManifest.xml文件中申請。不需要彈窗讓用戶確認(rèn)授權(quán),用戶也不能在以后注銷授權(quán)。這和 API 23 以前的版本的處理方式一樣。
不在Normal Permissions權(quán)限列表中的權(quán)限都是Runtime Permissions,需要在App運(yùn)行時(shí)動(dòng)態(tài)申請。一般是通過向用戶彈出權(quán)限申請對話框,讓用戶選擇是否授權(quán)。如果拒絕授權(quán),程序中的某些功能將不可用,但App是可以正常運(yùn)行的,其他不需要該權(quán)限的功能也都正??捎?/p> -
Java中拼接JSON字符串語法
有時(shí)在mock階段用來構(gòu)造臨時(shí)JSON測試數(shù)據(jù),如果使用 Retrofit 則可用通過MockServer來創(chuàng)建更方便的mock數(shù)據(jù)。
String bowlingJson(String player1, String player2) { return "{'winCondition':'HIGH_SCORE'," + "'name':'Bowling'," + "'round':4," + "'lastSaved':1367702411696," + "'dateStarted':1367702378785," + "'players':[" + "{'name':'" + player1 + "','history':[10,8,6,7,8],'color':-13388315,'total':39}," + "{'name':'" + player2 + "','history':[6,10,5,10,10],'color':-48060,'total':41}" + "]}"; } -
注解
-
Android中Junit單元測試
Android測試on android developer training: Android Testing
應(yīng)用內(nèi)UI測試 :Espresso
跨應(yīng)用UI測試:UIAutomator
Android Testing Support Library
Unit and UI Testing in Android Studio
Unit and UI Testing in Android Studio 中文翻譯
模擬android環(huán)境,提供android mocking方法 mockito
For Android UI Testing : Espresso 中文
-
okhttp源碼分析
compileSdkVersion & buildToolsVersion & minSdkVersion & targetSdkVersion & support-xxx-Version
參考
JSON - Gson - okHttp - okHttp-doc - okhttp wiki - Retrofit - Dagger1 - Dagger2 - RxJava - RxAndroid - RxKotlin - RxPermissions - RxBinding - Picasso - okio - ButterKnife - Fabric - TestNG - Junit - AndroidStudio - Git - Ant - Maven - Gradle - Selenium - Jenkins - Square - Square GitHub - Android Developer - Google Github - ReactiveX - JakeWharton - JNI規(guī)范 - 沉浸式UI - Http2.0和Http1.1 - Gitlab - Confluence - Blog Piasy