Skip to content

Commit c6c19a8

Browse files
committed
v2.0.0
1 parent 0f110b5 commit c6c19a8

File tree

215 files changed

+5175
-1661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+5175
-1661
lines changed

ShopMax/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [2.0.0] - 2024-12-31
2+
3+
* Update project for Nylo 6.x
4+
* pubspec.yaml updates
5+
16
## [1.4.12] - 2024-07-18
27

38
* pubspec.yaml updates

ShopMax/LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 2-Clause License
22

3-
Copyright (c) 2024, WooSignal Ltd
3+
Copyright (c) 2025, WooSignal Ltd
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without
@@ -22,4 +22,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2222
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2323
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2424
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

ShopMax/analysis_options.yaml

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
1-
# This file configures the static analysis results for your project (errors,
2-
# warnings, and lints).
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
33
#
4-
# This enables the 'recommended' set of lints from `package:lints`.
5-
# This set helps identify many issues that may lead to problems when running
6-
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
7-
# style and format.
8-
#
9-
# If you want a smaller set of lints you can change this to specify
10-
# 'package:lints/core.yaml'. These are just the most critical lints
11-
# (the recommended set includes the core lints).
12-
# The core lints are also what is used by pub.dev for scoring packages.
13-
14-
include: package:lints/recommended.yaml
15-
16-
# Uncomment the following section to specify additional rules.
17-
18-
# linter:
19-
# rules:
20-
# - camel_case_types
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
217

22-
# analyzer:
23-
# exclude:
24-
# - path/to/excluded/files/**
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
2511

26-
# For more information about the core and recommended set of lints, see
27-
# https://dart.dev/go/core-lints
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at https://dart.dev/lints.
17+
#
18+
# Instead of disabling a lint rule for the entire project in the
19+
# section below, it can also be suppressed for a single line of code
20+
# or a specific dart file by using the `// ignore: name_of_lint` and
21+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
22+
# producing the lint.
23+
rules:
24+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
25+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
2826

29-
# For additional information about configuring this file, see
30-
# https://dart.dev/guides/language/analysis-options
27+
# Additional information about this file can be found at
28+
# https://dart.dev/guides/language/analysis-options

ShopMax/android/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java
99
# Remember to never publicly share your keystore.
1010
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
1111
key.properties
12+
**/*.keystore
13+
**/*.jks

ShopMax/android/app/build.gradle

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,38 @@ if (flutterVersionName == null) {
2424

2525
android {
2626
namespace "com.woosignal.android"
27-
compileSdk flutter.compileSdkVersion
28-
ndkVersion flutter.ndkVersion
27+
compileSdk 35
28+
ndkVersion = "25.1.8937393"
29+
30+
packagingOptions {
31+
exclude 'META-INF/DEPENDENCIES'
32+
}
2933

3034
compileOptions {
31-
sourceCompatibility JavaVersion.VERSION_1_8
32-
targetCompatibility JavaVersion.VERSION_1_8
35+
coreLibraryDesugaringEnabled true
36+
sourceCompatibility JavaVersion.VERSION_17
37+
targetCompatibility JavaVersion.VERSION_17
3338
}
3439

3540
kotlinOptions {
36-
jvmTarget = '1.8'
41+
jvmTarget = 17
3742
}
3843

3944
sourceSets {
4045
main.java.srcDirs += 'src/main/kotlin'
4146
}
4247

48+
lintOptions {
49+
disable 'InvalidPackage'
50+
}
51+
4352
defaultConfig {
4453
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
54+
multiDexEnabled true
4555
applicationId "com.woosignal.android"
4656
// You can update the following values to match your application needs.
4757
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48-
minSdkVersion 33
58+
minSdkVersion flutter.minSdkVersion
4959
targetSdkVersion flutter.targetSdkVersion
5060
versionCode flutterVersionCode.toInteger()
5161
versionName flutterVersionName
@@ -64,4 +74,6 @@ flutter {
6474
source '../..'
6575
}
6676

67-
dependencies {}
77+
dependencies {
78+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
79+
}
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.woosignal.android">
3-
<!-- Flutter needs it to communicate with the running application
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->
6-
<uses-permission android:name="android.permission.INTERNET" />
7-
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
8-
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
9-
<uses-permission android:name="android.permission.VIBRATE"/>
6+
<uses-permission android:name="android.permission.INTERNET"/>
107
</manifest>
Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.woosignal.android">
3-
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
4-
calls FlutterMain.startInitialization(this); in its onCreate method.
5-
In most cases you can leave this as-is, but you if you want to provide
6-
additional functionality it is fine to subclass or reimplement
7-
FlutterApplication and put your custom class here. -->
8-
<uses-permission android:name="android.permission.INTERNET" />
9-
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
10-
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
11-
<uses-permission android:name="android.permission.VIBRATE"/>
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
3+
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
4+
<uses-permission android:name="android.permission.VIBRATE" />
5+
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
6+
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
7+
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
8+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
9+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
1210

1311
<application
12+
android:label="Nylo"
1413
android:name="${applicationName}"
15-
android:label="ShopMax"
1614
android:allowBackup="false"
1715
android:fullBackupContent="false"
1816
android:icon="@mipmap/ic_launcher">
1917
<activity
2018
android:name=".MainActivity"
19+
android:exported="true"
20+
android:showWhenLocked="true"
21+
android:turnScreenOn="true"
2122
android:launchMode="singleTop"
2223
android:theme="@style/LaunchTheme"
2324
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
2425
android:hardwareAccelerated="true"
25-
android:screenOrientation="portrait"
26-
android:windowSoftInputMode="adjustResize"
27-
android:exported="true">
26+
android:windowSoftInputMode="adjustResize">
2827
<!-- Specifies an Android theme to apply to this Activity as soon as
2928
the Android process has started. This theme is visible to the user
3029
while the Flutter UI initializes. After that, this theme continues
3130
to determine the Window background behind the Flutter UI. -->
3231
<meta-data
33-
android:name="io.flutter.embedding.android.NormalTheme"
34-
android:resource="@style/NormalTheme"
35-
/>
36-
32+
android:name="io.flutter.embedding.android.NormalTheme"
33+
android:resource="@style/NormalTheme"
34+
/>
3735
<intent-filter>
3836
<action android:name="android.intent.action.MAIN"/>
3937
<category android:name="android.intent.category.LAUNCHER"/>
@@ -44,5 +42,36 @@
4442
<meta-data
4543
android:name="flutterEmbedding"
4644
android:value="2" />
45+
46+
<service
47+
android:name="com.dexterous.flutterlocalnotifications.ForegroundService"
48+
android:exported="false"
49+
android:stopWithTask="false"
50+
android:foregroundServiceType="specialUse">
51+
<property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE" android:value="To demonstrate how to use foreground services to show notifications"/>
52+
</service>
53+
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ActionBroadcastReceiver" />
54+
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
55+
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
56+
<intent-filter>
57+
<action android:name="android.intent.action.BOOT_COMPLETED"/>
58+
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
59+
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
60+
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
61+
</intent-filter>
62+
</receiver>
63+
4764
</application>
48-
</manifest>
65+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
66+
<!-- Required to query activities that can process text, see:
67+
https://developer.android.com/training/package-visibility?hl=en and
68+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
69+
70+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
71+
<queries>
72+
<intent>
73+
<action android:name="android.intent.action.PROCESS_TEXT"/>
74+
<data android:mimeType="text/plain"/>
75+
</intent>
76+
</queries>
77+
</manifest>
Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
package com.woosignal.android
22

3+
import android.content.ContentResolver
4+
import android.content.Context
5+
import android.media.RingtoneManager
36
import io.flutter.embedding.android.FlutterActivity
7+
import io.flutter.embedding.engine.FlutterEngine
8+
import io.flutter.plugin.common.MethodChannel
9+
import java.util.*
410

5-
class MainActivity: FlutterActivity()
11+
class MainActivity: FlutterActivity() {
12+
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
13+
super.configureFlutterEngine(flutterEngine)
14+
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, "nylo.dev/android").setMethodCallHandler { call, result ->
15+
if ("drawableToUri" == call.method) {
16+
val resourceId = this@MainActivity.resources.getIdentifier(call.arguments as String, "drawable", this@MainActivity.packageName)
17+
result.success(resourceToUriString(this@MainActivity.applicationContext, resourceId))
18+
}
19+
if ("getAlarmUri" == call.method) {
20+
result.success(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM).toString())
21+
}
22+
}
23+
}
24+
25+
private fun resourceToUriString(context: Context, resId: Int): String? {
26+
return (ContentResolver.SCHEME_ANDROID_RESOURCE + "://"
27+
+ context.resources.getResourcePackageName(resId)
28+
+ "/"
29+
+ context.resources.getResourceTypeName(resId)
30+
+ "/"
31+
+ context.resources.getResourceEntryName(resId))
32+
}
33+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
57.8 KB
Loading

0 commit comments

Comments
 (0)