Commit f9d516c0 authored by wanglei's avatar wanglei

调通上报功能

parent 3080f853
...@@ -8,7 +8,7 @@ import javax.crypto.spec.SecretKeySpec ...@@ -8,7 +8,7 @@ import javax.crypto.spec.SecretKeySpec
object AESHelper { object AESHelper {
private const val aesKey = "bt8n2r8wdqk30wcu" private const val aesKey = "r07y7is0zk7bej34"
private val cipher by lazy { private val cipher by lazy {
Cipher.getInstance("AES/GCM/NoPadding") Cipher.getInstance("AES/GCM/NoPadding")
......
...@@ -8,14 +8,12 @@ import com.test.easy.easycleanerjunk.utils.SPUtils ...@@ -8,14 +8,12 @@ import com.test.easy.easycleanerjunk.utils.SPUtils
object ConfigHelper { object ConfigHelper {
var isOpenNotification = false
var appList: List<AppInfo>? = null
const val privacyPolicy = "https://sites.google.com/view/easy-cleannow/easy-clean" const val privacyPolicy = "https://sites.google.com/view/easy-cleannow/easy-clean"
// 域名 // 域名
const val eventUrl = "https://rp.easyfilemanager.xyz" const val eventUrl = "https://rp.easyfilemanager.xyz"
const val apiUrl = "https://api.easyfilemanager.xyz" // const val apiUrl = "https://api.easyfilemanager.xyz"
// admob广告id // admob广告id
const val openAdmobId = "/6499/example/app-open" const val openAdmobId = "/6499/example/app-open"
......
package com.test.easy.easycleanerjunk.helps package com.test.easy.easycleanerjunk.helps
import android.util.Log
import com.test.easy.easycleanerjunk.BuildConfig import com.test.easy.easycleanerjunk.BuildConfig
import com.test.easy.easycleanerjunk.helps.ReportUtils.doPost import com.test.easy.easycleanerjunk.helps.ReportUtils.doPost
import com.test.easy.easycleanerjunk.utils.SPUtils import com.test.easy.easycleanerjunk.utils.SPUtils
...@@ -42,12 +43,24 @@ object EventUtils { ...@@ -42,12 +43,24 @@ object EventUtils {
} catch (e: JSONException) { } catch (e: JSONException) {
parmJson = "" parmJson = ""
} }
doPost( doPost(
ConfigHelper.eventUrl, url,
HashMap(), HashMap(),
parmJson parmJson
) )
}.start() }.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