chore: update icon and fix quick tile functions

master
UC-HOBA 4 years ago
parent a26455412c
commit 6e43367dfc
  1. 2
      android/app/build.gradle
  2. 2
      android/app/src/debug/AndroidManifest.xml
  3. 4
      android/app/src/main/AndroidManifest.xml
  4. 2
      android/app/src/main/kotlin/tw/howba/contact_tracing/MainActivity.kt
  5. 13
      android/app/src/main/kotlin/tw/howba/contact_tracing/MainTileService.kt
  6. BIN
      android/app/src/main/res/drawable-hdpi/ic_launcher_background.png
  7. BIN
      android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png
  8. BIN
      android/app/src/main/res/drawable-mdpi/ic_launcher_background.png
  9. BIN
      android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png
  10. BIN
      android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png
  11. BIN
      android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png
  12. BIN
      android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png
  13. BIN
      android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png
  14. BIN
      android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png
  15. BIN
      android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png
  16. BIN
      android/app/src/main/res/drawable/quick_tile.png
  17. BIN
      android/app/src/main/res/mipmap-hdpi/launcher_icon.png
  18. BIN
      android/app/src/main/res/mipmap-mdpi/launcher_icon.png
  19. BIN
      android/app/src/main/res/mipmap-xhdpi/launcher_icon.png
  20. BIN
      android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png
  21. BIN
      android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png
  22. 2
      android/app/src/profile/AndroidManifest.xml
  23. BIN
      assets/ios_icon.png
  24. BIN
      assets/launcher_icon/background.png
  25. BIN
      assets/launcher_icon/foreground.png
  26. BIN
      icon-assets/ios_icon.png
  27. BIN
      icon-assets/launcher_icon/background.png
  28. BIN
      icon-assets/launcher_icon/foreground.png
  29. BIN
      icon.psd
  30. 6
      ios/Runner.xcodeproj/project.pbxproj
  31. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
  32. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
  33. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
  34. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
  35. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
  36. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
  37. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
  38. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
  39. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
  40. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
  41. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
  42. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
  43. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
  44. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
  45. BIN
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
  46. 4
      lib/main.dart
  47. 7
      pubspec.lock
  48. 7
      pubspec.yaml

@ -43,7 +43,7 @@ android {
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.hoba.contact_tracing" applicationId "tw.howba.contact_tracing"
minSdkVersion 21 //flutter.minSdkVersion minSdkVersion 21 //flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.contact_tracing"> package="tw.howba.contact_tracing">
<!-- Flutter needs it to communicate with the running application <!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.contact_tracing"> package="tw.howba.contact_tracing">
<application <application
android:label="Contact Tracing" android:label="Contact Tracing"
android:name="${applicationName}" android:name="${applicationName}"
@ -28,7 +28,7 @@
<service <service
android:name=".MainTileService" android:name=".MainTileService"
android:exported="true" android:exported="true"
android:icon="@mipmap/launcher_icon" android:icon="@drawable/quick_tile"
android:label="@string/tile_service_name" android:label="@string/tile_service_name"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"> android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">

@ -1,4 +1,4 @@
package com.example.contact_tracing package tw.howba.contact_tracing
import io.flutter.embedding.android.FlutterActivity import io.flutter.embedding.android.FlutterActivity

@ -1,13 +1,18 @@
package com.example.contact_tracing package tw.howba.contact_tracing
import android.service.quicksettings.TileService import android.service.quicksettings.TileService
import android.content.Intent
import tw.howba.contact_tracing.MainActivity
class MainTileService: TileService(){ class MainTileService: TileService(){
/*
override fun onClick() { override fun onClick() {
super.onClick() super.onClick()
val intent = Intent(this, MainActivity::class.java)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
startActivityAndCollapse(intent)
} }
/*
override fun onTileRemoved() { override fun onTileRemoved() {
super.onTileRemoved() super.onTileRemoved()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 20 KiB

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.contact_tracing"> package="tw.howba.contact_tracing">
<!-- Flutter needs it to communicate with the running application <!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

@ -362,7 +362,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = com.hoba.contact_tracing; PRODUCT_BUNDLE_IDENTIFIER = tw.howba.contact_tracing;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
@ -491,7 +491,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = com.hoba.contact_tracing; PRODUCT_BUNDLE_IDENTIFIER = tw.howba.contact_tracing;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@ -514,7 +514,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = com.hoba.contact_tracing; PRODUCT_BUNDLE_IDENTIFIER = tw.howba.contact_tracing;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 KiB

After

Width:  |  Height:  |  Size: 364 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 910 B

After

Width:  |  Height:  |  Size: 887 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:mobile_scanner/mobile_scanner.dart'; import 'package:mobile_scanner/mobile_scanner.dart';
import 'package:flutter_sms/flutter_sms.dart'; import 'package:flutter_sms/flutter_sms.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:flutter_vibrate/flutter_vibrate.dart';
void main() { void main() {
runApp(const AnalyzeView()); runApp(const AnalyzeView());
@ -27,6 +28,9 @@ class AnalyzeViewState extends State<AnalyzeView>
); );
void _sendSMS(String message, List<String> recipents) async { void _sendSMS(String message, List<String> recipents) async {
if (await Vibrate.canVibrate) {
Vibrate.vibrate();
}
var status = await Permission.sms.status; var status = await Permission.sms.status;
if (status.isDenied) { if (status.isDenied) {
Map<Permission, PermissionStatus> statuses = await [ Map<Permission, PermissionStatus> statuses = await [

@ -111,6 +111,13 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_vibrate:
dependency: "direct main"
description:
name: flutter_vibrate
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
flutter_web_plugins: flutter_web_plugins:
dependency: transitive dependency: transitive
description: flutter description: flutter

@ -35,6 +35,7 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2 cupertino_icons: ^1.0.2
mobile_scanner: ^0.0.3 mobile_scanner: ^0.0.3
flutter_vibrate: ^1.3.0
permission_handler: ^9.2.0 permission_handler: ^9.2.0
# flutter_sms: ^2.3.2 # flutter_sms: ^2.3.2
flutter_sms: flutter_sms:
@ -59,9 +60,9 @@ flutter_icons:
remove_alpha_ios: true remove_alpha_ios: true
android: "launcher_icon" android: "launcher_icon"
ios: true ios: true
image_path: "assets/ios_icon.png" image_path: "icon-assets/ios_icon.png"
adaptive_icon_background: "assets/launcher_icon/background.png" adaptive_icon_background: "icon-assets/launcher_icon/background.png"
adaptive_icon_foreground: "assets/launcher_icon/foreground.png" adaptive_icon_foreground: "icon-assets/launcher_icon/foreground.png"
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec