-
Notifications
You must be signed in to change notification settings - Fork 13
/
config.xml
166 lines (161 loc) · 8.91 KB
/
config.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.noname.shijian" version="1.6.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<name>无名杀</name>
<description>无名杀</description>
<author email="[email protected]" href="http://cordova.io">
诗笺
</author>
<content src="index.html" />
<preference name="Orientation" value="landscape" />
<preference name="Fullscreen" value="true" />
<preference name="SplashScreenDelay" value="1500" />
<access origin="*" />
<access origin="http://*/*" />
<access origin="https://*/*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<feature name="FinishImport">
<param name="android-package" value="com.noname.shijian.FinishImport"/>
</feature>
<platform name="android">
<allow-intent href="market:*" />
<allow-navigation href="http://*/*" />
<allow-navigation href="https://*/*" />
<allow-navigation href="data:*" />
<!-- 配置xmlns:tool -->
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/*">
<manifest xmlns:tools="http://schemas.android.com/tools" />
</edit-config>
<!-- 设置版本代码,低版本不能覆盖高版本的安卓 -->
<preference name="android-versionCode" value="16005" />
<!-- 设置usesCleartextTraffic -->
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:icon="@mipmap/ic_launcher_round" android:usesCleartextTraffic="true" android:name=".updateDataApplication"/>
</edit-config>
<!-- 配置MainActivity的可旋转横屏 -->
<edit-config file="app/src/main/AndroidManifest.xml" target="/manifest/application/activity[@android:name='MainActivity']" mode="merge">
<activity android:screenOrientation="sensorLandscape" />
</edit-config>
<!-- cordova12内置的Splash功能 -->
<!-- 初始屏幕图像。此首选项用于动画和非动画图标。当前可接受的资源文件可以是 XML Vector Drawable 或 PNG -->
<!-- <preference name="AndroidWindowSplashScreenAnimatedIcon" value="res/screen/android/splashscreen.xml" /> -->
<preference name="AndroidWindowSplashScreenAnimatedIcon" value="res/mipmap-xxxhdpi/ic_launcher_round.png" />
<!-- 是否自动隐藏初始屏幕。初始屏幕在首选项中指定的时间量后隐藏 -->
<preference name="AutoHideSplashScreen" value="true" />
<!-- 淡入和淡出 -->
<preference name="FadeSplashScreen" value="true" />
<!-- 淡入和淡出效果的时长(毫秒)默认500 -->
<preference name="FadeSplashScreenDuration" value="100" />
<!-- 动画的持续时间 -->
<preference name="AndroidWindowSplashScreenAnimationDuration" value="500" />
<!-- 全屏游戏 -->
<preference name="Fullscreen" value="true" />
<!-- 横屏游戏 -->
<preference name="Orientation" value="landscape" />
<!-- webview滚动到底部不显示反馈 -->
<preference name="DisallowOverscroll" value="true" />
<!-- statusbar插件配置 -->
<preference name="StatusBarOverlaysWebView" value="true" />
<!-- file插件的配置,兼容以前的设置 -->
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
<!-- 默认以file协议启动webview -->
<!-- 但是我魔改了cordova源码,这个值没多大意义了 -->
<preference name="AndroidInsecureFileModeEnabled" value="true" />
<!-- 启动模式 -->
<preference name="AndroidLaunchMode" value="singleTask" />
<!-- targetSdk改为31 -->
<preference name="android-targetSdkVersion" value="31" />
<!-- 编译的时候采用该api的规范进行代码检查和警告,但是并不会编译进apk中 -->
<preference name="android-compileSdkVersion" value="33" />
<!-- android构建工具的版本 -->
<preference name="android-buildToolsVersion" value="33.0.2" />
<!-- 配置Android Gradle Plugin Version -->
<!-- <preference name="AndroidGradlePluginVersion" value="8.3.1" /> -->
<!-- 配置Gradle Version -->
<preference name="GradleVersion" value="8.7" />
<!-- 配置http或是https协议 -->
<preference name="scheme" value="https" />
<!-- 配置域名 -->
<preference name="hostname" value="localhost" />
<!-- 安卓权限配置 -->
<config-file target="AndroidManifest.xml" parent="/*">
<queries>
<package android:name="com.android.chrome" />
</queries>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" tools:ignore="ManifestOrder" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> -->
<!-- 安卓13(准确来说是11)以下的读写权限 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="32" tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
<!-- 安卓13将READ_EXTERNAL_STORAGE细分为IMAGES、VIDEO、AUDIO权限 -->
<!-- 但是不请求这三个权限也不影响webview的文件选择 -->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<!-- 安卓13 通知权限 -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
</config-file>
<!-- 配置FileProvider和导入zip功能 -->
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<activity
android:name=".NonameImportActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
android:exported="true">
<intent-filter
android:label="@string/noname_import"
tools:ignore="AppLinkUrlError">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="*"
android:mimeType="application/zip"
android:scheme="content" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/opener_paths" />
</provider>
<activity
android:name=".ListViewActivity"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar"
android:exported="true">
<intent-filter
android:label="@string/noname_listview"
tools:ignore="AppLinkUrlError">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<provider
android:name="rikka.shizuku.ShizukuProvider"
android:authorities="${applicationId}.shizuku"
android:multiprocess="false"
android:enabled="true"
android:exported="true"
android:permission="android.permission.INTERACT_ACROSS_USERS_FULL" />
</config-file>
<!-- 处理文件资源 -->
<hook type="after_platform_add" src="hooks/after_platform_add/copy_files.js" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
</widget>