Commit f9d516c0 authored by wanglei's avatar wanglei

调通上报功能

parent 3080f853
......@@ -8,7 +8,7 @@ import javax.crypto.spec.SecretKeySpec
object AESHelper {
private const val aesKey = "bt8n2r8wdqk30wcu"
private const val aesKey = "r07y7is0zk7bej34"
private val cipher by lazy {
Cipher.getInstance("AES/GCM/NoPadding")
......
......@@ -8,14 +8,12 @@ import com.test.easy.easycleanerjunk.utils.SPUtils
object ConfigHelper {
var isOpenNotification = false
var appList: List<AppInfo>? = null
const val privacyPolicy = "https://sites.google.com/view/easy-cleannow/easy-clean"
// 域名
const val eventUrl = "https://rp.easyfilemanager.xyz"
const val apiUrl = "https://api.easyfilemanager.xyz"
// const val apiUrl = "https://api.easyfilemanager.xyz"
// admob广告id
const val openAdmobId = "/6499/example/app-open"
......
package com.test.easy.easycleanerjunk.helps
import android.util.Log
import com.test.easy.easycleanerjunk.BuildConfig
import com.test.easy.easycleanerjunk.helps.ReportUtils.doPost
import com.test.easy.easycleanerjunk.utils.SPUtils
......@@ -42,12 +43,24 @@ object EventUtils {
} catch (e: JSONException) {
parmJson = ""
}
doPost(
ConfigHelper.eventUrl,
url,
HashMap(),
parmJson
)
}.start()
}
private val url by lazy {
val pkg = ConfigHelper.packageName
val url = StringBuilder(
"${ConfigHelper.eventUrl}/${
pkg.filter { it.isLowerCase() }.substring(4, 9)
}sp"
)
url.append("?pkg=$pkg")
url.toString()
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment