Skip to content

Commit

Permalink
Merge pull request #93 from ArcticFoxPro/master
Browse files Browse the repository at this point in the history
新增版本列表显示匹配的 Kuikly 标识显示,新增 TIM 版本列表首项新增附带来自官网的 TIM 下载链接按钮,修复部分场景下版本列表显示不完全的 Bug
  • Loading branch information
klxiaoniu authored Dec 4, 2024
2 parents 3192ddc + 60bead2 commit 511816b
Show file tree
Hide file tree
Showing 59 changed files with 511 additions and 101 deletions.
6 changes: 3 additions & 3 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified QQVerToolBanner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,15 @@ QQ 版本列表实用工具 for Android 是一个使用 Material 3 组件库构
> [!TIP]
> QQ 版本列表实用工具实验性支持了 Android 微信的扫版。若选择微信扫版,对话框将变更为四个输入框,分别是“主版本号”、“扫版类型”、“真实版本号”和“十六进制代码”,对应的直链为:
>
> `http://dldir1.qq.com/weixin/android/weixin<主版本号>android<真实版本号>_<十六进制代码>_arm64.apk`
> - `http://dldir1.qq.com/weixin/android/weixin<主版本号>android<真实版本号>_<十六进制代码>_arm64.apk`
> - `http://dldir1.qq.com/weixin/android/weixin<主版本号>android<真实版本号>_<十六进制代码>_arm64_1.apk`
>
> 填入相应输入框内容后,软件将尝试访问上述链接。若当次访问未果,默认情况下将自动递增十六进制代码后再次尝试访问,直到访问成功为止。
> [!TIP]
> QQ 版本列表实用工具实验性支持了 Android TIM 的扫版。若选择 TIM 扫版,对应的直链为:
>
> `https://downv6.qq.com/qqweb/QQ_1/android_apk/TIM_<主版本号>.<小版本号><自定义后缀>.apk`
> - `https://downv6.qq.com/qqweb/QQ_1/android_apk/TIM_<主版本号>.<小版本号><自定义后缀>.apk`
>
> 填入相应输入框内容后,软件将尝试访问上述链接。若当次访问未果,默认情况下将自动递增小版本号后再次尝试访问,直到访问成功为止。
Expand All @@ -161,6 +162,10 @@ Android 微信测试版相关信息配置在[腾讯服务器配置文件](https:
> [!WARNING]
> 此功能并非每次请求都能成功获取到 Android 微信测试版下载直链,当无法获取下载直链时可能存在的情况是微信还未发布测试版或测试版已撤包。QQ 版本列表实用工具不对此功能及其任何后果作出任何可靠性保证。请明确并确保自身具备足够的风险识别和承受能力。
#### 从微信输入法测试通道获取微信输入法最新测试版下载直链

Android 微信输入法测试版下载直链可由[微信输入法公网测试通道](https://z.weixin.qq.com/android/download?channel=latest)重定向获取。可使用 QQ 版本列表实用工具提供的“从微信输入法测试通道获取微信输入法最新测试版下载直链”功能尝试获取微信输入法最新测试版下载直链。

#### 腾讯应用宝更新获取(实验性)

QQ、TIM、微信、企业微信、微信输入法使用腾讯应用宝([腾讯应用开放平台](https://app.open.qq.com/))分发软件最新安装包。可使用 QQ 版本列表实用工具提供的腾讯应用宝更新获取(实验性)获取 QQ、TIM、微信、企业微信、微信输入法最新腾讯应用宝上架版本安装包下载直链。
Expand Down Expand Up @@ -246,6 +251,14 @@ QQ 版本列表实用工具不能实现“检测到新测试版本下载直链

目前还没有找到来自官方的可靠且请求次数少而信息密度大的 Android 微信版本列表数据源,因此 QQ 版本列表实用工具无法提供 Android 微信的版本列表。如果您发现了可靠的 Android 微信版本列表数据源,欢迎提出 Issue(s) 或提交 PR。

### 什么是 QQNT 技术架构?

QQNT 技术架构是腾讯 QQ 客户端全新的跨平台技术架构体系。QQNT 技术架构将 QQ 客户端核心功能——如核心登录、消息系统、关系链、富媒体、长连接、数据库等——下沉至 QQNT 内核层,使用 C++ 抽象逻辑封装为原生库并提供多平台多语言一致性接口,以实现 QQ 客户端核心逻辑代码跨平台与程序高性能运作。

### 什么是 Kuikly?

Kuikly(Kotlin UI Kit)跨端开发框架,是 TDS 腾讯端服务(Tencent Device-oriented Service)的一部分。Kuikly 通过自研 Kotlin MultiPlatform 逻辑与终端界面原生控件渲染映射协议层,并采用声明式与响应式设计,使采用 Kuikly 的 Kotlin 开发者能拥有原生高效的 Android 开发体验并构建具有原生性能的跨平台应用。Kuikly 更可依托于 [TDS 腾讯端服务 Shiply 容器与发布平台](https://shiply.tds.qq.com/),实现按页颗粒度的完备客户端界面动态化能力。

## 其它

欢迎[帮助我们完成本地化翻译](https://crowdin.com/project/qqversionstool)!提交翻译则代表您同意您的译文将跟随 QQ 版本列表实用工具项目采用 [GNU Affero General Public License Version 3](/LICENSE) 开源许可。
Expand All @@ -265,7 +278,7 @@ QQ 版本列表实用工具不能实现“检测到新测试版本下载直链
## 贡献成员

<a href="https://github.com/klxiaoniu/QQVersionList/graphs/contributors">
<img src="https://contrib.rocks/image?repo=klxiaoniu/QQVersionList" alt="贡献成员"/>
<img src="https://contrib.rocks/image?repo=klxiaoniu/QQVersionList" alt="贡献成员"/>
</a>

## 开源相关
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ android {
minSdk = 24
targetSdk = 35
versionCode = gitCommitCount
versionName = "1.4.4-$gitCommitHash"
versionName = "1.4.5-$gitCommitHash"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
android:enableOnBackInvokedCallback="true"
android:fullBackupContent="@xml/backup_rules"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher_special"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_special_round"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.QQVersionList"
android:usesCleartextTraffic="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ class QverbowApplication : Application() {
const val EARLIEST_QQNT_FRAMEWORK_QQ_VERSION_STABLE = "8.9.63"
const val EARLIEST_QQNT_FRAMEWORK_TIM_VERSION_STABLE = "4.0.0"
const val EARLIEST_UNREAL_ENGINE_QQ_VERSION_STABLE = "8.8.55"
const val EARLIEST_KUIKLY_FRAMEWORK_QQ_VERSION_STABLE = "8.9.73"
const val EARLIEST_KUIKLY_FRAMEWORK_TIM_VERSION_STABLE = "4.0.0"
}

override fun onCreate() {
// Android 12+ 动态颜色
DynamicColors.applyToActivitiesIfAvailable(this)
instance = this
super.onCreate()
Security.addProvider(KonaCryptoProvider())
Security.addProvider(KonaCryptoProvider()) // 腾讯 Kona 国密套件需要在应用启动时添加 Provider
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import kotlinx.serialization.Serializable
* @param displayType 卡片展示类型,0 为收起态,1 为展开态
* @param displayInstall 展示是否安装到本机的标签
* @param isQQNTFramework 该版本是否基于 QQNT 技术架构
* @param isUnrealEngine 该版本是否存在 Unreal Engine Lib
* @param isKuiklyInside 该版本是否存在 TDS 腾讯端服务 Kukily 开发框架
*/
@Serializable
data class QQVersionBean(
Expand All @@ -46,5 +48,6 @@ data class QQVersionBean(
var displayInstall: Boolean = false, // false 为不展示
var isAccessibility: Boolean = false,
var isQQNTFramework: Boolean = false,
var isUnrealEngine: Boolean = false
var isUnrealEngine: Boolean = false,
var isKuiklyInside: Boolean = false
)
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ import kotlinx.serialization.Serializable
/**
* @param version TIM 版本号
* @param datetime TIM 版本发布日期
* @param fix TIM 版本特性描述
* @param new 未知,目前获取到的 `new` 全是空
* @param fix TIM 版本优化描述
* @param new TIM 版本新功能描述
* @param link TIM 最新官网正式版下载链接
* @param jsonString 该 TIM 版本 JSON 字符串详情
* @param displayType 卡片展示类型,0 为收起态,1 为展开态
* @param displayInstall 展示是否安装到本机的标签
* @param isQQNTFramework 该版本是否基于 QQNT 技术架构
* @param isKuiklyInside 该版本是否存在 TDS 腾讯端服务 Kukily 开发框架
*/
@Serializable
data class TIMVersionBean(
Expand All @@ -37,9 +39,11 @@ data class TIMVersionBean(
val fix: String,
val new: String,

var link: String = "",
var jsonString: String = "",
var displayType: Int = 0, // 0为收起
var displayInstall: Boolean = false, // false 为不展示
var isAccessibility: Boolean = false,
var isQQNTFramework: Boolean = false
var isQQNTFramework: Boolean = false,
var isKuiklyInside: Boolean = false
)
80 changes: 40 additions & 40 deletions app/src/main/java/com/xiaoniu/qqversionlist/ui/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ import com.xiaoniu.qqversionlist.util.ClipboardUtil.copyText
import com.xiaoniu.qqversionlist.util.DataStoreUtil
import com.xiaoniu.qqversionlist.util.Extensions.dp
import com.xiaoniu.qqversionlist.util.FileUtil.downloadFile
import com.xiaoniu.qqversionlist.util.FileUtil.getFileSize
import com.xiaoniu.qqversionlist.util.InfoUtil.dialogError
import com.xiaoniu.qqversionlist.util.InfoUtil.getQverbowSM3
import com.xiaoniu.qqversionlist.util.InfoUtil.qverbowAboutText
Expand Down Expand Up @@ -133,7 +134,6 @@ import java.io.InputStreamReader
import java.lang.Thread.sleep
import java.util.Locale
import java.util.zip.GZIPInputStream
import kotlin.text.toDoubleOrNull


class MainActivity : AppCompatActivity() {
Expand Down Expand Up @@ -351,43 +351,50 @@ class MainActivity : AppCompatActivity() {

btnAboutHash.setOnClickListener {
val dialogHashBinding = DialogHashBinding.inflate(layoutInflater)
val qverbowSM3 = getQverbowSM3()

val hashDialog = MaterialAlertDialogBuilder(this@MainActivity)
.setTitle(R.string.qverbowHash)
.setIcon(R.drawable.shield_keyhole_line)
.setView(dialogHashBinding.root)
.show().apply {
dialogHashBinding.aboutHashText.text =
"SM3${getString(R.string.colon)}${getQverbowSM3()}"
"SM3${getString(R.string.colon)}${qverbowSM3}"
dialogHashBinding.btnAboutGithubHashVerifiy.isVisible =
BuildConfig.VERSION_NAME.endsWith("Release")
}

dialogHashBinding.btnAboutHashOk.setOnClickListener {
hashDialog.dismiss()
}
dialogHashBinding.apply {
btnAboutHashOk.setOnClickListener {
hashDialog.dismiss()
}

dialogHashBinding.btnAboutGithubHashVerifiy.setOnClickListener {
val spec = CircularProgressIndicatorSpec(
this@MainActivity, null, 0,
com.google.android.material.R.style.Widget_Material3_CircularProgressIndicator_ExtraSmall
)
val progressIndicatorDrawable =
IndeterminateDrawable.createCircularDrawable(
this@MainActivity, spec
btnAboutHashCopy.setOnClickListener {
copyText(qverbowSM3)
}

btnAboutGithubHashVerifiy.setOnClickListener {
val spec = CircularProgressIndicatorSpec(
this@MainActivity, null, 0,
com.google.android.material.R.style.Widget_Material3_CircularProgressIndicator_ExtraSmall
)
val progressIndicatorDrawable =
IndeterminateDrawable.createCircularDrawable(
this@MainActivity, spec
)

dialogHashBinding.btnAboutGithubHashVerifiy.apply {
isEnabled = false
style(com.google.android.material.R.style.Widget_Material3_Button_TonalButton_Icon)
icon = progressIndicatorDrawable
}
btnAboutGithubHashVerifiy.apply {
isEnabled = false
style(com.google.android.material.R.style.Widget_Material3_Button_TonalButton_Icon)
icon = progressIndicatorDrawable
}

checkQverbowHash(
BuildConfig.VERSION_NAME.trimSubstringAtEnd("-Release"),
getQverbowSM3(),
dialogHashBinding.btnAboutGithubHashVerifiy
)
checkQverbowHash(
BuildConfig.VERSION_NAME.trimSubstringAtEnd("-Release"),
getQverbowSM3(),
btnAboutGithubHashVerifiy
)
}
}
}
}
Expand Down Expand Up @@ -463,6 +470,8 @@ class MainActivity : AppCompatActivity() {
dialogPersonalization.apply {
switchDisplayFirst.isChecked =
DataStoreUtil.getBooleanKV("displayFirst", true)
switchKuiklyTag.isChecked =
DataStoreUtil.getBooleanKV("kuiklyTag", true)
switchUnrealEngineTag.isChecked =
DataStoreUtil.getBooleanKV("unrealEngineTag", false)
switchProgressSize.isChecked =
Expand Down Expand Up @@ -496,7 +505,12 @@ class MainActivity : AppCompatActivity() {
DataStoreUtil.putBooleanKVAsync("showOldLoading", isChecked)
}

// 下四个设置不能异步持久化存储,否则视图更新读不到更新值
// 下五个设置不能异步持久化存储,否则视图更新读不到更新值
switchKuiklyTag.setOnCheckedChangeListener { _, isChecked ->
DataStoreUtil.putBooleanKV("kuiklyTag", isChecked)
qqVersionAdapter.updateItemProperty("isShowKuiklyTag")
timVersionAdapter.updateItemProperty("isShowKuiklyTag")
}
switchUnrealEngineTag.setOnCheckedChangeListener { _, isChecked ->
DataStoreUtil.putBooleanKV("unrealEngineTag", isChecked)
qqVersionAdapter.updateItemProperty("isShowUnrealEngineTag")
Expand Down Expand Up @@ -840,13 +854,7 @@ class MainActivity : AppCompatActivity() {
val end = responseData.indexOf(")")
val jsonString = responseData.substring(start, end)
val map = resolveWeixinAlphaConfig(jsonString)
val request2 =
Request.Builder().url(map["url"].toString()).head().build()
val response2 = okHttpClient.newCall(request2).execute()
val appSize = (if (response2.isSuccessful) "%.2f".format(
response2.header("Content-Length")?.toDoubleOrNull()
?.div(1024 * 1024)
) else null)
val appSize = getFileSize(map["url"].toString())
runOnUiThread {
val applicationsConfigBackButtonBinding =
ApplicationsConfigBackButtonBinding.inflate(
Expand Down Expand Up @@ -913,7 +921,6 @@ class MainActivity : AppCompatActivity() {
}
}
}

} catch (e: CustomException) {
dialogError(e, true)
} catch (e: Exception) {
Expand Down Expand Up @@ -943,13 +950,7 @@ class MainActivity : AppCompatActivity() {
)
val url = response.header("Location")
if (url == null) throw CustomException("Response data is null.")
val request2 =
Request.Builder().url(url.toString()).head().build()
val response2 = OkHttpClient().newCall(request2).execute()
val appSize = (if (response2.isSuccessful) "%.2f".format(
response2.header("Content-Length")?.toDoubleOrNull()
?.div(1024 * 1024)
) else null)
val appSize = getFileSize(url.toString())
runOnUiThread {
val expLinkNextButtonBinding =
ExpLinkNextButtonBinding.inflate(
Expand Down Expand Up @@ -998,7 +999,6 @@ class MainActivity : AppCompatActivity() {
}
}
}

} catch (e: CustomException) {
dialogError(e, true)
} catch (e: Exception) {
Expand Down
Loading

0 comments on commit 511816b

Please sign in to comment.