@@ -17,7 +17,7 @@ function create() {
17
17
echo " Create flutter project: name=$FLUTTER_APP_PROJECT_NAME , org=$FLUTTER_APP_ORG ..."
18
18
flutter config --enable-macos-desktop
19
19
flutter config --enable-web
20
- flutter create --android-language java --androidx -- ios-language objc --project-name $FLUTTER_APP_PROJECT_NAME --org $FLUTTER_APP_ORG .
20
+ flutter create --android-language java --ios-language objc --project-name $FLUTTER_APP_PROJECT_NAME --org $FLUTTER_APP_ORG .
21
21
add_permission_label
22
22
else
23
23
echo " Project [$FLUTTER_APP_PROJECT_NAME ] already exists!"
@@ -37,15 +37,15 @@ function add_permission_label() {
37
37
echo " "
38
38
echo " Add permission labels to AndroidManifest.xml."
39
39
echo " "
40
- python add-line.py -i ../android/app/build.gradle -s ' minSdkVersion 21 ' -t ' minSdkVersion 32 ' -r
40
+ python add-line.py -i ../android/app/build.gradle -s ' minSdkVersion 16 ' -t ' minSdkVersion 21 ' -r
41
41
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s " <application" -t ' <uses-permission android:name="android.permission.CAMERA" />'
42
42
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s " <application" -t ' <uses-permission android:name="android.permission.RECORD_AUDIO" />'
43
43
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s " <application" -t ' <uses-permission android:name="android.permission.WAKE_LOCK" />'
44
44
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s " <application" -t ' <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />'
45
45
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s " <application" -t ' <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />'
46
46
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s " <application" -t ' <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />'
47
47
python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s " <application" -t ' <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />'
48
- if [ -d " macos " ] ; then
48
+ python add-line.py -i ../android/app/src/main/AndroidManifest.xml -s " <application " -t ' <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> '
49
49
echo " "
50
50
echo " Add permission labels to macOS."
51
51
echo " "
@@ -67,7 +67,6 @@ if [ -d "macos" ]; then
67
67
python add-line.py -i ../macos/Runner/Release.entitlements -s ' </dict>' -t ' <true/>'
68
68
python add-line.py -i ../macos/Runner/Release.entitlements -s ' </dict>' -t ' <key>com.apple.security.network.client</key>'
69
69
python add-line.py -i ../macos/Runner/Release.entitlements -s ' </dict>' -t ' <true/>'
70
- fi
71
70
}
72
71
73
72
if [ " $CMD " == " create" ];
0 commit comments