Skip to content

[提议] Android 思源添加 Kotlin 相关内容 #10978

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wwxiaoqi opened this issue Apr 11, 2024 · 13 comments
Closed

[提议] Android 思源添加 Kotlin 相关内容 #10978

wwxiaoqi opened this issue Apr 11, 2024 · 13 comments

Comments

@wwxiaoqi
Copy link
Contributor

In what scenarios do you need this feature?

为了方便使用 Kotlin 进行开发

Describe the optimal solution

可否添加相关内容?

Describe the candidate solution

No response

Other information

No response

@88250
Copy link
Member

88250 commented Apr 11, 2024

需要做什么功能吗?

@wwxiaoqi
Copy link
Contributor Author

需要做什么功能吗?

目前的沉浸效果似乎不生效。

在升高 minSdkVersion + 使用 kotlin 的 edge-to-edge 配置下,沉浸效果可以使用了,但是不确定是否会带来什么新问题。

所以等待 Android 14 QPR2 Beta 3 中的 AndroidAuthority EDGE_TO_EDGE_BY_DEFAULT 的功能标签应该是更加好的方法。

AndroidAuthority EDGE_TO_EDGE_BY_DEFAULT 其说明是:
如果应用的目标 SDK 为 VANILLA_ICE_CREAM(Android 15 的代号)及以上,则默认其使用边到边显示
(make app go edge-to-edge by default if the target SDK is VANILLA_ICE_CREAM or above)

@88250
Copy link
Member

88250 commented Apr 13, 2024

如果升级 minSdkVersion 的话就不支持低版本的 Android 了吗?

@wwxiaoqi
Copy link
Contributor Author

如果升级 minSdkVersion 的话就不支持低版本的 Android 了吗?

是的。简单来说:

minSdkVersion:标记最低支持版本。
targetSdkVersion:用于系统保持向前兼容。
compileSdkVersion:用于开发阶段,指定参与便于的 Android SDK 版本。

可以理解为 minSdkVersion 应该指定为当前 App 支持的最低版本,compileSdkVersion 应该为最新的 Android SDK 版本,而 targetSdkVersion 根据需要进行升级,即: minSdkVersion(Lowest possible) <= targetSdkVersion <= compileSdkVersion(Latest SDK)

当前程序配置的是:

minSdkVersion 24
targetSdkVersion 34

即:从 Android 7.0(API 级别 24)到 Android 13(API 级别 34)的所有版本。

minSdkVersion 版本越高,Android 系统对软件的限制越多,也就是意味着要进行更多适配。

@88250
Copy link
Member

88250 commented Apr 13, 2024

不支持 Android 7 的话估计得单独找个版本发布一次,只做这个升级变更,不引入其他变更。

我不太确定用户是否能够接受,我记得前两年经常有人反馈 Android 7 的使用问题。要不我们单独提个 issue 先调查看看?

@wwxiaoqi
Copy link
Contributor Author

可以。不过我个人觉得笔记类软件低版本 Android 也有人在使用。
可惜没有加入收集 Android 版本的平台(貌似违反了隐私优先),或许在一些应用商店平台有统计当前 Android 版本的下载数量?

@88250
Copy link
Member

88250 commented Apr 13, 2024

Google Play 上我看了下,只能统计到 Android 8,8 以下的没有统计。8/8.1 已经是个位数了,所以 7 我估计可以不用兼容了。

image

@88250
Copy link
Member

88250 commented Apr 13, 2024

在升高 minSdkVersion + 使用 kotlin 的 edge-to-edge 配置下,沉浸效果可以使用了,但是不确定是否会带来什么新问题。

前面提到的这个升级 minSdk 需要升到多少?

@wwxiaoqi
Copy link
Contributor Author

我试试看看可否可以不改动 minSdk 的情况下支持。如果不行在提升版本吧,目前来说国内基本上都还是偏向在 5- 8 这个区间:
image

本人机器软件版本 Min 统计(统计软件:LibChecker):
image

@88250
Copy link
Member

88250 commented Apr 13, 2024

好的。

@wwxiaoqi
Copy link
Contributor Author

在内核启动后,有办法获取到当前设置的主题吗?
Snipaste_2024-04-15_12-02-36

@88250
Copy link
Member

88250 commented Apr 15, 2024

直接解析 工作空间/conf/conf.json 里面有,或者内核用 go 暴露一个函数给 Java?

具体是需要获取主题的什么信息?

@88250
Copy link
Member

88250 commented Aug 11, 2024

长时间没有新的信息补充,我先关闭了哦。

@88250 88250 closed this as completed Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants