buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug{
resValue ("string", "API_KEY", GoogleMapKey)
}
}
<resources>
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">@string/API_KEY</string>
</resources>
//local.properties
GoogleMapKey=xxxxxxxxxx(你的key)
buildTypes {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def googleMapKey = properties.getProperty('GoogleMapKey')
debug {
buildConfigField ("String", "API_KEY", googleMapKey) //在kt file讀取,透過BuildConfig.(變數名,這個例子就是API_KEY)
resValue ("string", "API_KEY", googleMapKey) //在xml引用的寫法
[參考資料]
gradle導入方法
local.properties導入方法
Gradle
kotlin
Android
==診所主頁== 取得診所Logo(ok) ::: success ::: spoiler GET /api/v1/clinic/logo Description: 取得診所的Logo Request:
Feb 9, 2023==員工列表== 取得員工列表(ok) ::: success ::: spoiler GET {{domain}}/api/v1/clinic/employees?page=1&size=10&name=&employeeNumber=&gender=&departmentId=3&positionId=&medicalDepartmentId=&phonesArray=&employeeType=1&employeeStatus=1&sortBy=phoneArray&descending=desc Description: 取得所有員工列表 分頁 Request:
Jan 18, 2023Description: 學歷資料 資料格式: key type value description id
Jan 18, 2023==標籤列表== 取得病例標籤列表(ok) ::: success ::: spoiler GET /api/v1/patients/labels Description: 取得所有病例標籤清單(ok) Request:
Jan 17, 2023or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up