Skip to content

Commit 35c3347

Browse files
committed
v 0.8.3
Android 12 Fixes Bug Fixes and Improvements
1 parent 7ec430b commit 35c3347

File tree

11 files changed

+123
-104
lines changed

11 files changed

+123
-104
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?><!-- Modify this file to customize your launch splash screen -->
2+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:drawable="?android:colorBackground" />
4+
5+
<item
6+
android:width="400dp"
7+
android:height="400dp"
8+
android:gravity="center">
9+
<!-- android:top="90dp" -->
10+
<bitmap android:src="@drawable/logo" />
11+
<!-- android:height="150dp"
12+
android:width="150dp"
13+
android:gravity="center" -->
14+
</item>
15+
</layer-list>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
5+
<!-- Show a splash screen on the activity. Automatically removed when
6+
Flutter draws its first frame -->
7+
<item name="android:windowBackground">@drawable/launch_background</item>
8+
</style>
9+
<!-- Theme applied to the Android Window as soon as the process has started.
10+
This theme determines the color of the Android Window while your
11+
Flutter UI initializes, as well as behind your Flutter UI while its
12+
running.
13+
14+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15+
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
17+
</style>
18+
</resources>

android/arm_python

34.5 KB
Binary file not shown.
-5.44 KB
Binary file not shown.

android/gradlew

Lines changed: 43 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,25 @@
1-
#!/usr/bin/env sh
2-
3-
#
4-
# Copyright 2015 the original author or authors.
5-
#
6-
# Licensed under the Apache License, Version 2.0 (the "License");
7-
# you may not use this file except in compliance with the License.
8-
# You may obtain a copy of the License at
9-
#
10-
# https://www.apache.org/licenses/LICENSE-2.0
11-
#
12-
# Unless required by applicable law or agreed to in writing, software
13-
# distributed under the License is distributed on an "AS IS" BASIS,
14-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15-
# See the License for the specific language governing permissions and
16-
# limitations under the License.
17-
#
1+
#!/usr/bin/env bash
182

193
##############################################################################
204
##
215
## Gradle start up script for UN*X
226
##
237
##############################################################################
248

25-
# Attempt to set APP_HOME
26-
# Resolve links: $0 may be a link
27-
PRG="$0"
28-
# Need this for relative symlinks.
29-
while [ -h "$PRG" ] ; do
30-
ls=`ls -ld "$PRG"`
31-
link=`expr "$ls" : '.*-> \(.*\)$'`
32-
if expr "$link" : '/.*' > /dev/null; then
33-
PRG="$link"
34-
else
35-
PRG=`dirname "$PRG"`"/$link"
36-
fi
37-
done
38-
SAVED="`pwd`"
39-
cd "`dirname \"$PRG\"`/" >/dev/null
40-
APP_HOME="`pwd -P`"
41-
cd "$SAVED" >/dev/null
9+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10+
DEFAULT_JVM_OPTS=""
4211

4312
APP_NAME="Gradle"
4413
APP_BASE_NAME=`basename "$0"`
4514

46-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48-
4915
# Use the maximum available, or set MAX_FD != -1 to use that value.
5016
MAX_FD="maximum"
5117

52-
warn () {
18+
warn ( ) {
5319
echo "$*"
5420
}
5521

56-
die () {
22+
die ( ) {
5723
echo
5824
echo "$*"
5925
echo
@@ -64,7 +30,6 @@ die () {
6430
cygwin=false
6531
msys=false
6632
darwin=false
67-
nonstop=false
6833
case "`uname`" in
6934
CYGWIN* )
7035
cygwin=true
@@ -75,13 +40,27 @@ case "`uname`" in
7540
MINGW* )
7641
msys=true
7742
;;
78-
NONSTOP* )
79-
nonstop=true
80-
;;
8143
esac
8244

83-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
45+
# Attempt to set APP_HOME
46+
# Resolve links: $0 may be a link
47+
PRG="$0"
48+
# Need this for relative symlinks.
49+
while [ -h "$PRG" ] ; do
50+
ls=`ls -ld "$PRG"`
51+
link=`expr "$ls" : '.*-> \(.*\)$'`
52+
if expr "$link" : '/.*' > /dev/null; then
53+
PRG="$link"
54+
else
55+
PRG=`dirname "$PRG"`"/$link"
56+
fi
57+
done
58+
SAVED="`pwd`"
59+
cd "`dirname \"$PRG\"`/" >/dev/null
60+
APP_HOME="`pwd -P`"
61+
cd "$SAVED" >/dev/null
8462

63+
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
8564

8665
# Determine the Java command to use to start the JVM.
8766
if [ -n "$JAVA_HOME" ] ; then
@@ -106,7 +85,7 @@ location of your Java installation."
10685
fi
10786

10887
# Increase the maximum file descriptors if we can.
109-
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
88+
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
11089
MAX_FD_LIMIT=`ulimit -H -n`
11190
if [ $? -eq 0 ] ; then
11291
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -126,11 +105,10 @@ if $darwin; then
126105
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127106
fi
128107

129-
# For Cygwin or MSYS, switch paths to Windows format before running java
130-
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
108+
# For Cygwin, switch paths to Windows format before running java
109+
if $cygwin ; then
131110
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132111
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133-
134112
JAVACMD=`cygpath --unix "$JAVACMD"`
135113

136114
# We build the pattern for arguments to be converted via cygpath
@@ -156,30 +134,27 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
156134
else
157135
eval `echo args$i`="\"$arg\""
158136
fi
159-
i=`expr $i + 1`
137+
i=$((i+1))
160138
done
161139
case $i in
162-
0) set -- ;;
163-
1) set -- "$args0" ;;
164-
2) set -- "$args0" "$args1" ;;
165-
3) set -- "$args0" "$args1" "$args2" ;;
166-
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167-
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168-
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169-
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170-
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171-
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
140+
(0) set -- ;;
141+
(1) set -- "$args0" ;;
142+
(2) set -- "$args0" "$args1" ;;
143+
(3) set -- "$args0" "$args1" "$args2" ;;
144+
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145+
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146+
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147+
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148+
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149+
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172150
esac
173151
fi
174152

175-
# Escape application args
176-
save () {
177-
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178-
echo " "
153+
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154+
function splitJvmOpts() {
155+
JVM_OPTS=("$@")
179156
}
180-
APP_ARGS=`save "$@"`
181-
182-
# Collect all arguments for the java command, following the shell quoting and substitution rules
183-
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
157+
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158+
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
184159

185-
exec "$JAVACMD" "$@"
160+
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

android/gradlew.bat

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
@rem
2-
@rem Copyright 2015 the original author or authors.
3-
@rem
4-
@rem Licensed under the Apache License, Version 2.0 (the "License");
5-
@rem you may not use this file except in compliance with the License.
6-
@rem You may obtain a copy of the License at
7-
@rem
8-
@rem https://www.apache.org/licenses/LICENSE-2.0
9-
@rem
10-
@rem Unless required by applicable law or agreed to in writing, software
11-
@rem distributed under the License is distributed on an "AS IS" BASIS,
12-
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
@rem See the License for the specific language governing permissions and
14-
@rem limitations under the License.
15-
@rem
16-
171
@if "%DEBUG%" == "" @echo off
182
@rem ##########################################################################
193
@rem
@@ -24,23 +8,20 @@
248
@rem Set local scope for the variables with windows NT shell
259
if "%OS%"=="Windows_NT" setlocal
2610

11+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12+
set DEFAULT_JVM_OPTS=
13+
2714
set DIRNAME=%~dp0
2815
if "%DIRNAME%" == "" set DIRNAME=.
2916
set APP_BASE_NAME=%~n0
3017
set APP_HOME=%DIRNAME%
3118

32-
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33-
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34-
35-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36-
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37-
3819
@rem Find java.exe
3920
if defined JAVA_HOME goto findJavaFromJavaHome
4021

4122
set JAVA_EXE=java.exe
4223
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
24+
if "%ERRORLEVEL%" == "0" goto init
4425

4526
echo.
4627
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -54,7 +35,7 @@ goto fail
5435
set JAVA_HOME=%JAVA_HOME:"=%
5536
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5637

57-
if exist "%JAVA_EXE%" goto execute
38+
if exist "%JAVA_EXE%" goto init
5839

5940
echo.
6041
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -64,14 +45,34 @@ echo location of your Java installation.
6445

6546
goto fail
6647

48+
:init
49+
@rem Get command-line arguments, handling Windowz variants
50+
51+
if not "%OS%" == "Windows_NT" goto win9xME_args
52+
if "%@eval[2+2]" == "4" goto 4NT_args
53+
54+
:win9xME_args
55+
@rem Slurp the command line arguments.
56+
set CMD_LINE_ARGS=
57+
set _SKIP=2
58+
59+
:win9xME_args_slurp
60+
if "x%~1" == "x" goto execute
61+
62+
set CMD_LINE_ARGS=%*
63+
goto execute
64+
65+
:4NT_args
66+
@rem Get arguments from the 4NT Shell from JP Software
67+
set CMD_LINE_ARGS=%$
68+
6769
:execute
6870
@rem Setup the command line
6971

7072
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7173

72-
7374
@rem Execute Gradle
74-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
7576

7677
:end
7778
@rem End local scope for the variables with windows NT shell

lib/imports.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export 'package:http/http.dart';
2525
export 'package:in_app_review/in_app_review.dart';
2626
export 'package:in_app_update/in_app_update.dart';
2727
export 'package:outline_material_icons/outline_material_icons.dart';
28-
export 'package:package_info/package_info.dart';
28+
export 'package:package_info_plus/package_info_plus.dart';
2929
export 'package:path_provider/path_provider.dart';
3030
export 'package:random_string/random_string.dart';
3131
export 'package:share/share.dart';

lib/others/zeronet_isolate.dart

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,24 @@ void runZeroNetService({bool autoStart = false}) async {
118118
//TODO?: Check for Bugs Here.
119119
var serviceRunning = await FlutterBackgroundService().isServiceRunning();
120120
printOut('serviceRunning : $serviceRunning');
121-
if (!serviceRunning) {
121+
if (service == null || !serviceRunning) {
122122
uiStore.setZeroNetStatus(ZeroNetStatus.NOT_RUNNING);
123123
service = FlutterBackgroundService();
124124
}
125125

126-
FlutterBackgroundService.initialize(
127-
runBgIsolate,
128-
autoStart: autoStartService,
129-
).then((value) {
126+
// FlutterBackgroundService.initialize(
127+
// runBgIsolate,
128+
// autoStart: autoStartService,
129+
// )
130+
service
131+
.configure(
132+
androidConfiguration: AndroidConfiguration(
133+
onStart: runBgIsolate,
134+
autoStart: autoStartService,
135+
isForegroundMode: true,
136+
),
137+
)
138+
.then((value) {
130139
printOut('FlutterBackgroundService.initialize() : $value');
131140
if (value) {
132141
service = FlutterBackgroundService();

pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ dependencies:
3333
outline_material_icons: ^0.1.1
3434
equatable: ^2.0.2
3535
time_ago_provider: ^4.1.0
36-
package_info: ^2.0.2
36+
package_info_plus:
37+
package_info_plus_web:
3738
path_provider: ^2.0.2
3839
purchases_flutter: ^3.5.0
3940
random_string: 2.3.1

version.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
flutter.versionName=v 0.8.2
2-
flutter.versionCode=90
1+
flutter.versionName=v 0.8.3
2+
flutter.versionCode=100

0 commit comments

Comments
 (0)