6 Commits

Author SHA1 Message Date
e37c4ceebd temporary update 2024-09-08 18:16:51 +09:00
2c0bb06e74 20240903 pre release 2024-09-03 22:17:09 +09:00
fe46d46ab6 2024-09-02 ほぼOK 2024-09-02 21:25:19 +09:00
dc58dc0584 大幅変更&環境バージョンアップ 2024-08-22 14:35:09 +09:00
56e9861c7a update to 3.13 2023-09-03 23:37:41 +05:30
c41dde4c33 bug fixes 2023-08-23 17:33:26 +05:30
438 changed files with 20244 additions and 51962 deletions

View File

@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited. # This file should be version controlled and should not be manually edited.
version: version:
revision: "300451adae589accbece3490f4396f10bdf15e6e" revision: "5874a72aa4c779a02553007c47dacbefba2374dc"
channel: "stable" channel: "stable"
project_type: app project_type: app
@ -13,17 +13,26 @@ project_type: app
migration: migration:
platforms: platforms:
- platform: root - platform: root
create_revision: 300451adae589accbece3490f4396f10bdf15e6e create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
base_revision: 300451adae589accbece3490f4396f10bdf15e6e base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
- platform: android - platform: android
create_revision: 300451adae589accbece3490f4396f10bdf15e6e create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
base_revision: 300451adae589accbece3490f4396f10bdf15e6e base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
- platform: ios - platform: ios
create_revision: 300451adae589accbece3490f4396f10bdf15e6e create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
base_revision: 300451adae589accbece3490f4396f10bdf15e6e base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
- platform: linux
create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
- platform: macos - platform: macos
create_revision: 300451adae589accbece3490f4396f10bdf15e6e create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
base_revision: 300451adae589accbece3490f4396f10bdf15e6e base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
- platform: web
create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
- platform: windows
create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
# User provided section # User provided section

186
README.md
View File

@ -1,4 +1,4 @@
# rogapp # gifunavi
A new Flutter project. A new Flutter project.
@ -8,9 +8,185 @@ This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project: A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter, view our For help getting started with Flutter development, view the
[online documentation](https://flutter.dev/docs), which offers tutorials, [online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference. samples, guidance on mobile development, and a full API reference.
## iOS のマニュアル更新内容
* Info.plist
<key>CFBundleDisplayName</key>
<string>岐阜ナビ</string>
<key>CFBundleName</key>
<string>岐阜ナビ</string>
<key>NSCameraUsageDescription</key>
<string>岐阜ナビはチェックポイントで撮影した写真を写真ライブラリに保存し、通過記録を保持し、競技結果として提出することができます。</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>岐阜ナビはアプリが閉じられているときでも位置情報へのアクセスが必要です。これにより、走行履歴の記録ができ、レビュー時の参考にすることができます。</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>このアプリではバックグラウンドで位置情報にアクセスします。</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>このアプリはチェックポイントへのチェックインや走行履歴を記録するために、位置情報にアクセスします。</string>
<key>NSMicrophoneUsageDescription</key>
<string>このアプリではカメラは使用しますが、マイクの使用は当面行いません。</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>撮影した写真はデバイスのアルバムに保存されます。これにより、不具合時の通過記録を安全に担保することができます。</string>
# 更新履歴
0. flutter_compass は pub.dev cache で 34 に変更。キャッシュをクリアしたら修正が必要。
1. 2024-8-17
・新規にプロジェクトを作り直し。
・ユーザー登録で13歳以上でないと登録できない様にした。
・生年月日の選択カレンダーを導入。
・エントリーカテゴリはメンバー構成によって自動修正できる様にした。(修正中)
・イベントの締め切りフィールドを追加し、この日以降のイベントの修正はできない様にした。
  ・エントリーに参加し、ゴールしたら、イベントの修正はできない様にする。必然的にチーム構成を変更する際には、エントリーが終了していれば、変更ができない様にして、新規追加を促す。
2.
#Server
# API仕様変更案
## 1. イベントAPI
### GET /api/events
- 変更点: レスポンスに `deadline_datetime` フィールドを追加
- レスポンス例:
```json
{
"id": 1,
"event_name": "サマーマラソン2024",
"start_datetime": "2024-07-01T09:00:00Z",
"end_datetime": "2024-07-01T17:00:00Z",
"deadline_datetime": "2024-06-15T23:59:59Z"
}
```
### POST /api/events
- 変更点: リクエストボディに `deadline_datetime` フィールドを追加
- リクエスト例:
```json
{
"event_name": "ウィンターラン2025",
"start_datetime": "2025-01-15T08:00:00Z",
"end_datetime": "2025-01-15T16:00:00Z",
"deadline_datetime": "2025-01-01T23:59:59Z"
}
```
## 2. エントリーAPI
### PUT /api/entries/{id}
- 変更点:
1. エントリー更新前にイベントの締め切り日時をチェック
2. 締め切りを過ぎている場合、400 Bad Requestを返す
- エラーレスポンス例:
```json
{
"error": "entry_update_closed",
"message": "エントリーの締め切りが過ぎているため、更新できません。",
"deadline": "2024-06-15T23:59:59Z"
}
```
## 3. チームAPI
### GET /api/teams/{id}/entries
- 新規エンドポイント: 指定されたチームの全エントリーを取得
- レスポンス例:
```json
[
{
"id": 1,
"team_id": 5,
"event": {
"id": 1,
"event_name": "サマーマラソン2024",
"start_datetime": "2024-07-01T09:00:00Z",
"end_datetime": "2024-07-01T17:00:00Z",
"deadline_datetime": "2024-06-15T23:59:59Z"
},
"category": {
"id": 3,
"category_name": "一般-5時間"
},
"date": "2024-07-01T09:00:00Z",
"zekken_number": "A-123"
}
]
```
### PUT /api/teams/{id}
- 変更点: チーム更新時に関連するエントリーの締め切りをチェック
- エラーレスポンス例:
```json
{
"error": "team_update_restricted",
"message": "締め切りを過ぎたエントリーが存在するため、チームの更新が制限されています。",
"closed_entries": [1, 2, 3]
}
```
## 4. 共通エラーレスポンス
- すべてのエンドポイントで、より詳細なエラー情報を提供
- エラーレスポンス構造:
{
"error": "error_code",
"message": "人間が読める詳細なエラーメッセージ",
"details": {
## エラーに関する追加情報(オプション)
}
}
## 5. 認証・認可
- すべてのエンドポイントで適切な認証・認可チェックを実施
- 権限不足の場合は403 Forbiddenを返す
マニュアル編集が必要な部分:
1. flutter_compass プラグインの build.gradle ファイルを直接編集します:
ファイルパス: /Volumes/PortableSSD1TB/main/flutter/.pub-cache/hosted/pub.dev/flutter_compass-0.8.0/android/build.gradle
このファイルを開き、jcenter() を mavenCentral() に置き換えます:
$ ./gradlew clean
$ ./gradlew clean build
2. image_gallery_saver の build.gradle ファイルを編集
/Volumes/PortableSSD1TB/main/flutter/.pub-cache/git/image_gallery_saver-24fd8207a4491c42ed907060bb5bf40c2430131f/android/build.gradle ファイル
ext.kotlin_version = '1.8.22' #'1.7.10'
$ ./gradlew clean
$ ./gradlew clean build
3. qr_code_scanner の問題解決:
/Volumes/PortableSSD1TB/main/flutter/.pub-cache/hosted/pub.dev/qr_code_scanner-[version]/android/build.gradle
ext.kotlin_version = '1.8.22' //'1.7.10'
4. flutter_keyboard_visibility:
vi /Volumes/PortableSSD1TB/main/flutter/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/android/build.gradle
minSDK = 21 ,SDKversion=34 にする。
5. device_info_plus は使用不可
6. geolocator_android:
vi /Volumes/PortableSSD1TB/main/flutter/.pub-cache/hosted/pub.dev/geolocator_android-4.6.1/android/build.gradle
minSdkVersion 21
テスト用位置情報:
大垣駅 35.36701369466119, 136.61783662683948
大垣城 35.36182698266251, 136.61558088722234
関ケ原駅35.36365422752628, 136.47061844402452
高山駅36.14130783620718, 137.25050201764944
ガソリンスタンド36.13826570797936, 137.21513450124928
バグ:
履歴の写真:アクセスエラー
バックアップをイベントごとに保存・レストア
ログインした際に、イベントが選択されていなければ、イベントを選択するように促す。
事前チェックインした写真が履歴に表示されない。

1
TODO.txt Normal file
View File

@ -0,0 +1 @@
期限切れのイベントは表示しない。==> メッセージで期限切れであることを表示すること。

View File

@ -13,8 +13,7 @@ linter:
# The lint rules applied to this project can be customized in the # The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml` # section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints # included above or to enable additional rules. A list of all available lints
# and their documentation is published at # and their documentation is published at https://dart.dev/lints.
# https://dart-lang.github.io/linter/lints/index.html.
# #
# Instead of disabling a lint rule for the entire project in the # Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code # section below, it can also be suppressed for a single line of code

2
android/.gitignore vendored
View File

@ -7,7 +7,7 @@ gradle-wrapper.jar
GeneratedPluginRegistrant.java GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore. # Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app # See https://flutter.dev/to/reference-keystore
key.properties key.properties
**/*.keystore **/*.keystore
**/*.jks **/*.jks

View File

@ -0,0 +1,2 @@
#Thu Aug 22 09:42:29 JST 2024
java.home=/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home

View File

@ -1,9 +1,11 @@
plugins { plugins {
id 'com.android.application' id "com.android.application"
id 'kotlin-android' id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
} }
// added ここから
def localProperties = new Properties() def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties') def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) { if (localPropertiesFile.exists()) {
@ -12,11 +14,6 @@ if (localPropertiesFile.exists()) {
} }
} }
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) { if (flutterVersionCode == null) {
flutterVersionCode = '1' flutterVersionCode = '1'
@ -27,72 +24,121 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0' flutterVersionName = '1.0'
} }
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties() def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties') def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) { if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
} }
// added ここまで
android { android {
namespace = "com.dvox.gifunavi"
compileSdkVersion 34 compileSdk 34
ndkVersion = '27.0.12077973'
lintOptions {
checkReleaseBuilds false
}
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8
} }
kotlinOptions { kotlinOptions {
jvmTarget = '1.8' jvmTarget = '1.8' //JavaVersion.VERSION_1_8
} }
sourceSets { // Added : Add this block to force all libraries to use the same Kotlin version
main.java.srcDirs += 'src/main/kotlin' configurations.all {
resolutionStrategy {
//force "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
//force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
force 'com.google.android.gms:play-services-location:21.0.1'
} }
}
// added ここまで
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.dvox.gifunavi" applicationId = "com.dvox.gifunavi"
minSdkVersion 23 // You can update the following values to match your application needs.
targetSdkVersion 34 // For more information, see: https://flutter.dev/to/review-gradle-config.
versionCode flutterVersionCode.toInteger() minSdk = 21
versionName flutterVersionName targetSdk 34// 19 //flutter.minSdkVersion
multiDexEnabled true versionCode = flutter.versionCode
versionName = flutter.versionName
multiDexEnabled true // Added
} }
// added for release
signingConfigs { signingConfigs {
if (keystoreProperties['storeFile'] != null) {
release { release {
if (project.hasProperty("RELEASE_STORE_FILE")) { keyAlias keystoreProperties['keyAlias']
storeFile file(RELEASE_STORE_FILE) keyPassword keystoreProperties['keyPassword']
storePassword RELEASE_STORE_PASSWORD storeFile file(keystoreProperties['storeFile'])
keyAlias RELEASE_KEY_ALIAS storePassword keystoreProperties['storePassword']
keyPassword RELEASE_KEY_PASSWORD
}
//keyAlias keystoreProperties['keyAlias']
//keyPassword keystoreProperties['keyPassword']
//storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
//storePassword keystoreProperties['SachikoMiyata123']
} }
} }
}
buildTypes { buildTypes {
release { release {
signingConfig signingConfigs.release // TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.debug
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
minifyEnabled true
shrinkResources true
} }
} }
lint {
baseline = file("lint-baseline.xml")
}
lintOptions {
disable 'MissingPermission'
}
task wrapper(type: Wrapper){
gradleVersion = '8.2.1'
}
task prepareKotlinBuildScriptModel {
}
} }
flutter { flutter {
source '../..' source = "../.."
} }
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" // added
implementation 'com.google.android.gms:play-services-location:18.0.0' // このバージョンは最新のものにしてください //implementation project(':flutter') // added - 2
implementation 'com.google.android.gms:play-services-location:21.0.1' //18.0.0' // このバージョンは最新のものにしてください
//implementation 'androidx.core:core-ktx:1.13.1' // added
implementation 'androidx.core:core-ktx:1.10.1' // added
implementation 'androidx.multidex:multidex:2.0.1' // added
implementation 'com.google.android.material:material:1.5.0'
// Update AndroidX libraries
// implementation "androidx.core:core-ktx:1.12.0"
implementation "androidx.appcompat:appcompat:1.6.1"
implementation "androidx.fragment:fragment-ktx:1.7.0"
implementation "androidx.activity:activity-ktx:1.8.2"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.7.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.7.0"
}
// Force all Kotlin dependencies to use the same version
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.jetbrains.kotlin') {
details.useVersion kotlin_version
}
}
} }

View File

@ -0,0 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

248
android/app/gradlew vendored Executable file
View File

@ -0,0 +1,248 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

92
android/app/gradlew.bat vendored Normal file
View File

@ -0,0 +1,92 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 7.4.2" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.2)" variant="all" version="7.4.2">
<issue
id="ScopedStorage"
message="WRITE_EXTERNAL_STORAGE no longer provides write access when targeting Android 10+"
errorLine1=" &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/AndroidManifest.xml"
line="13"
column="36"/>
</issue>
<issue
id="KotlinNullnessAnnotation"
message="Do not use `@NonNull` in Kotlin; the nullability is already implied by the Kotlin type `FlutterEngine` **not** ending with `?`"
errorLine1=" override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {"
errorLine2=" ~~~~~~~~">
<location
file="src/main/kotlin/com/dvox/gifunavi/MainActivity.kt"
line="22"
column="41"/>
</issue>
<issue
id="ObsoleteSdkInt"
message="This folder configuration (`v21`) is unnecessary; `minSdkVersion` is 21. Merge all the resources in this folder into `drawable`.">
<location
file="src/main/res/drawable-v21"/>
</issue>
<issue
id="UnusedResources"
message="The resource `R.mipmap.ic_launcher` appears to be unused">
<location
file="src/main/res/mipmap-hdpi/ic_launcher.png"/>
</issue>
<issue
id="IconLauncherShape"
message="Launcher icons should not fill every pixel of their square region; see the design guide for details">
<location
file="src/main/res/mipmap-hdpi/launcher_icon.png"/>
</issue>
<issue
id="IconLauncherShape"
message="Launcher icons should not fill every pixel of their square region; see the design guide for details">
<location
file="src/main/res/mipmap-mdpi/launcher_icon.png"/>
</issue>
<issue
id="IconLauncherShape"
message="Launcher icons should not fill every pixel of their square region; see the design guide for details">
<location
file="src/main/res/mipmap-xhdpi/launcher_icon.png"/>
</issue>
<issue
id="IconLauncherShape"
message="Launcher icons should not fill every pixel of their square region; see the design guide for details">
<location
file="src/main/res/mipmap-xxhdpi/launcher_icon.png"/>
</issue>
<issue
id="IconLauncherShape"
message="Launcher icons should not fill every pixel of their square region; see the design guide for details">
<location
file="src/main/res/mipmap-xxxhdpi/launcher_icon.png"/>
</issue>
</issues>

View File

@ -0,0 +1,8 @@
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Thu Aug 22 08:15:46 JST 2024
sdk.dir=/Users/akira/Library/Android/sdk

View File

@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="com.dvox.gifunavi"> <!-- The INTERNET permission is required for development. Specifically,
<!-- Flutter needs it to communicate with the running application the Flutter tool 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.
--> -->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>

View File

@ -1,26 +1,34 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.dvox.gifunavi"> package="com.dvox.gifunavi">
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.WAKE_LOCK"/> <uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
<application <application
android:label="岐阜ナビ" android:label="岐阜ナビ"
android:name="${applicationName}" android:icon="@mipmap/launcher_icon">
android:icon="@mipmap/ic_launcher">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize"
>
<!-- Specifies an Android theme to apply to this Activity as soon as <!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues while the Flutter UI initializes. After that, this theme continues
@ -42,9 +50,21 @@
<meta-data android:name="com.google.android.geo.API_KEY" <meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAUBI1ablMKuJwGj2-kSuEhvYxvB1A-mOE"/> android:value="AIzaSyAUBI1ablMKuJwGj2-kSuEhvYxvB1A-mOE"/>
 <service  <service
android:name="com.dvox.gifunavi.LocationService" android:name=".LocationService"
android:enableOnBackInvokedCallback="true"
android:enabled="true" android:enabled="true"
android:exported="false" android:exported="false"
android:foregroundServiceType="location" /> android:foregroundServiceType="location" />
</application> </application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest> </manifest>

View File

@ -1,7 +1,9 @@
package com.dvox.gifunavi // この部分を変更 package com.dvox.gifunavi
import android.location.Location import android.location.Location
import android.Manifest import android.Manifest
import android.annotation.TargetApi
import android.app.NotificationChannel import android.app.NotificationChannel
import android.app.NotificationManager import android.app.NotificationManager
import android.app.Service import android.app.Service
@ -12,7 +14,6 @@ import android.location.LocationManager
import android.os.Build import android.os.Build
import android.os.IBinder import android.os.IBinder
import android.util.Log import android.util.Log
import androidx.core.app.ActivityCompat
import androidx.core.app.NotificationCompat import androidx.core.app.NotificationCompat
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import com.google.android.gms.location.FusedLocationProviderClient import com.google.android.gms.location.FusedLocationProviderClient
@ -20,6 +21,8 @@ import com.google.android.gms.location.LocationCallback
import com.google.android.gms.location.LocationRequest import com.google.android.gms.location.LocationRequest
import com.google.android.gms.location.LocationResult import com.google.android.gms.location.LocationResult
import com.google.android.gms.location.LocationServices import com.google.android.gms.location.LocationServices
import com.google.android.gms.location.Priority
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
@ -27,14 +30,15 @@ import java.util.Date
import java.util.Locale import java.util.Locale
import android.app.Notification import android.app.Notification
data class GpsData( data class GpsData(
val id: Int, val id: Int,
val team_name: String, val teamName: String,
val event_code: String, val eventCode: String,
val lat: Double, val lat: Double,
val lon: Double, val lon: Double,
val is_checkin: Int, val isCheckin: Int,
val created_at: Long val createdAt: Long
) )
class GpsDatabaseHelper(private val context: Context) { class GpsDatabaseHelper(private val context: Context) {
@ -54,6 +58,7 @@ class GpsDatabaseHelper(private val context: Context) {
class LocationService : Service() { class LocationService : Service() {
private lateinit var fusedLocationClient: FusedLocationProviderClient private lateinit var fusedLocationClient: FusedLocationProviderClient
private lateinit var gpsDatabaseHelper: GpsDatabaseHelper
override fun onBind(intent: Intent?): IBinder? { override fun onBind(intent: Intent?): IBinder? {
return null return null
@ -64,42 +69,65 @@ class LocationService : Service() {
Log.d("LocationService", "Android: onCreate.") Log.d("LocationService", "Android: onCreate.")
fusedLocationClient = LocationServices.getFusedLocationProviderClient(this) fusedLocationClient = LocationServices.getFusedLocationProviderClient(this)
gpsDatabaseHelper = GpsDatabaseHelper.getInstance(applicationContext)
// 位置情報の権限チェックとGPS有効化の確認を行う
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED &&
ContextCompat.checkSelfPermission(this, Manifest.permission.FOREGROUND_SERVICE) == PackageManager.PERMISSION_GRANTED) {
//ContextCompat.checkSelfPermission(this, Manifest.permission.FOREGROUND_SERVICE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
Log.d("LocationService", "Android: onCreate : 位置情報の権限チェックとGPS有効化の確認")
// GPSデバイスが有効になっているか確認する
val locationManager = getSystemService(Context.LOCATION_SERVICE) as LocationManager val locationManager = getSystemService(Context.LOCATION_SERVICE) as LocationManager
if (!locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) { if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
Log.d("LocationService", "GPS is disabled.") val locationRequest = LocationRequest.Builder(Priority.PRIORITY_HIGH_ACCURACY, 10000)
// GPSが無効の場合の処理を追加する例: ユーザーにGPSを有効にするように促すなど .setMinUpdateIntervalMillis(5000)
}else{ .build()
Log.d("LocationService", "GPS is enabled.") /*
} val locationRequest = LocationRequest.create().apply {
priority = LocationRequest.PRIORITY_HIGH_ACCURACY
interval = 10000
fastestInterval = 5000
}
*/
fusedLocationClient.requestLocationUpdates(locationRequest, locationCallback, null)
// フォアグラウンドサービスの設定 // フォアグラウンドサービスの設定
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val CHANNEL_ID = "location"
val channel = NotificationChannel(CHANNEL_ID, "Location", NotificationManager.IMPORTANCE_DEFAULT) val channel = NotificationChannel(CHANNEL_ID, "Location", NotificationManager.IMPORTANCE_DEFAULT)
val notificationManager = getSystemService(NotificationManager::class.java) // この行を追加 val notificationManager = getSystemService(NotificationManager::class.java)
Log.d("LocationService", "Android: Foreground service.")
notificationManager?.createNotificationChannel(channel) notificationManager?.createNotificationChannel(channel)
} }
val notification = NotificationCompat.Builder(this, "location") val notification = NotificationCompat.Builder(this, CHANNEL_ID)
.setContentTitle("Tracking location...") .setContentTitle("Tracking location...")
.setContentText("Location: null") .setContentText("Location: null")
.setSmallIcon(android.R.drawable.ic_menu_mylocation) // リソースが存在しないため0を設定 .setSmallIcon(android.R.drawable.ic_menu_mylocation)
.setOngoing(true) .setOngoing(true)
.build() .build()
Log.d("LocationService", "Android: Foreground service 2.")
startForeground(1, notification) startForeground(NOTIFICATION_ID, notification)
} else {
Log.d("LocationService", "GPS is disabled.")
// GPSが無効の場合の処理を追加する例: ユーザーにGPSを有効にするように促すなど
stopSelf() // サービスを停止する
}
} else {
Log.d("LocationService", "Location permission or Foreground service location permission is not granted.")
// 位置情報の権限またはフォアグラウンドサービスの位置情報の権限が許可されていない場合の処理を追加する
stopSelf() // サービスを停止する
}
} }
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
return START_STICKY
}
@TargetApi(Build.VERSION_CODES.N)
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
Log.d("LocationService", "Android: onDestroy.") Log.d("LocationService", "Android: onDestroy.")
fusedLocationClient.removeLocationUpdates(locationCallback) fusedLocationClient.removeLocationUpdates(locationCallback)
stopForeground(true) stopForeground(STOP_FOREGROUND_REMOVE)
stopSelf() stopSelf()
} }
@ -149,8 +177,6 @@ class LocationService : Service() {
private val locationCallback = object : LocationCallback() { private val locationCallback = object : LocationCallback() {
override fun onLocationResult(locationResult: LocationResult) { override fun onLocationResult(locationResult: LocationResult) {
val currentLocation = locationResult.lastLocation val currentLocation = locationResult.lastLocation
//Log.d("LocationService", "Android: onLocationResult.")
if (currentLocation != null) { if (currentLocation != null) {
val accuracy = currentLocation.accuracy val accuracy = currentLocation.accuracy
if (accuracy <= 30) { if (accuracy <= 30) {
@ -160,13 +186,14 @@ class LocationService : Service() {
val lon = currentLocation.longitude val lon = currentLocation.longitude
val currentTime = System.currentTimeMillis() val currentTime = System.currentTimeMillis()
// GPS データをデバッグ用に表示 // GPSデータをデバッグ用に表示
val sdf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()) val sdf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault())
val formattedTime = sdf.format(Date(currentTime)) val formattedTime = sdf.format(Date(currentTime))
//Log.d("LocationService", "Latitude: $lat, Longitude: $lon, Time: $formattedTime, Accuracy: $accuracy") //Log.d("LocationService", "Android: {$formattedTime}")
// GPS データをデータベースに保存
GlobalScope.launch { // GPSデータをデータベースに保存
GlobalScope.launch(Dispatchers.IO) {
addGPStoDB(lat, lon, currentTime) addGPStoDB(lat, lon, currentTime)
} }
@ -182,33 +209,16 @@ class LocationService : Service() {
} }
/*
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
Log.d("LocationService", "Android: onStartCommand.") Log.d("LocationService", "Android: onStartCommand.")
// 位置情報の権限チェックとGPS有効化の確認を行う
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
val locationManager = getSystemService(Context.LOCATION_SERVICE) as LocationManager
if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
val locationRequest = LocationRequest.create().apply {
priority = LocationRequest.PRIORITY_HIGH_ACCURACY
interval = 10000
fastestInterval = 5000
}
fusedLocationClient.requestLocationUpdates(locationRequest, locationCallback, null)
} else {
Log.d("LocationService", "GPS is disabled.")
// GPSが無効の場合の処理を追加する例: ユーザーにGPSを有効にするように促すなど
}
} else {
Log.d("LocationService", "Location permission is not granted.")
// 位置情報の権限が許可されていない場合の処理を追加する
}
// Foregroundサービスを開始 // Foregroundサービスを開始
startForeground(NOTIFICATION_ID, createNotification()) startForeground(NOTIFICATION_ID, createNotification())
return START_STICKY return START_STICKY
} }
*/
private suspend fun addGPStoDB(lat: Double, lng: Double, timestamp: Long, isCheckin: Int = 0) { private suspend fun addGPStoDB(lat: Double, lng: Double, timestamp: Long, isCheckin: Int = 0) {
try { try {
@ -217,25 +227,24 @@ class LocationService : Service() {
val teamName = preferences.getString("team_name", "") ?: "" val teamName = preferences.getString("team_name", "") ?: ""
val eventCode = preferences.getString("event_code", "") ?: "" val eventCode = preferences.getString("event_code", "") ?: ""
if (teamName.isNotEmpty() && eventCode.isNotEmpty()) { if (teamName.isNotEmpty() && eventCode.isNotEmpty()) {
val gpsData = GpsData( val gpsData = GpsData(
id = 0, id = 0,
team_name = teamName, teamName = teamName,
event_code = eventCode, eventCode = eventCode,
lat = lat, lat = lat,
lon = lng, lon = lng,
is_checkin = isCheckin, isCheckin = isCheckin,
created_at = timestamp createdAt = timestamp
) )
val db = GpsDatabaseHelper.getInstance(context) gpsDatabaseHelper.insertGps(gpsData)
db.insertGps(gpsData)
Log.d("LocationService", "Android: addGPStoDB.") Log.d("LocationService", "Android: addGPStoDB.")
} }
} catch (e: Exception) { } catch (e: Exception) {
Log.e("LocationService", "Error adding GPS data to DB", e) Log.e("LocationService", "Error adding GPS data to DB", e)
// エラーメッセージをユーザーに表示するなどの処理を追加
} }
} }
} }

View File

@ -1,4 +1,4 @@
package com.dvox.gifunavi // この部分を変更 package com.dvox.gifunavi
import android.Manifest import android.Manifest
import android.app.ActivityManager import android.app.ActivityManager
@ -9,7 +9,6 @@ import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.widget.Toast import android.widget.Toast
import androidx.annotation.NonNull import androidx.annotation.NonNull
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import io.flutter.embedding.android.FlutterActivity import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine import io.flutter.embedding.engine.FlutterEngine
@ -21,8 +20,10 @@ class MainActivity: FlutterActivity() {
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine) super.configureFlutterEngine(flutterEngine)
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL).setMethodCallHandler { MethodChannel(
call, result -> flutterEngine.dartExecutor.binaryMessenger,
CHANNEL
).setMethodCallHandler { call, result ->
when (call.method) { when (call.method) {
"startLocationService" -> { "startLocationService" -> {
Log.d("MainActivity", "Android: called startLocationService.") Log.d("MainActivity", "Android: called startLocationService.")
@ -30,12 +31,20 @@ class MainActivity: FlutterActivity() {
startLocationService() startLocationService()
result.success(null) result.success(null)
} }
"stopLocationService" -> { "stopLocationService" -> {
Log.d("MainActivity", "Android: called stopLocationService.") Log.d("MainActivity", "Android: called stopLocationService.")
//val intent = Intent(this, LocationService::class.java) //val intent = Intent(this, LocationService::class.java)
stopLocationService() stopLocationService()
result.success(null) result.success(null)
} }
"isLocationServiceRunning" -> {
Log.d("MainActivity", "Android: called isLocationServiceRunnung.")
val isRunning = isServiceRunning(LocationService::class.java)
result.success(isRunning)
}
else -> { else -> {
result.notImplemented() result.notImplemented()
} }
@ -47,16 +56,22 @@ class MainActivity: FlutterActivity() {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
Log.d("MainActivity", "Android: onCreate.") Log.d("MainActivity", "Android: onCreate.")
// 位置情報の権限をリクエストする // 位置情報の権限をリクエストする==> main() の前にコールされるので除外 2024-7-19
/*
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.ACCESS_FINE_LOCATION), PERMISSION_REQUEST_CODE) ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.ACCESS_FINE_LOCATION), PERMISSION_REQUEST_CODE)
} else { } else {
// startLocationService() // アプリ起動時にLocationServiceを開始する ==> main.dartで制御する。 // startLocationService() // アプリ起動時にLocationServiceを開始する ==> main.dartで制御する。
} }
*/
} }
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) { override fun onRequestPermissionsResult(
requestCode: Int,
permissions: Array<out String>,
grantResults: IntArray
) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults) super.onRequestPermissionsResult(requestCode, permissions, grantResults)
if (requestCode == PERMISSION_REQUEST_CODE) { if (requestCode == PERMISSION_REQUEST_CODE) {
if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) { if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
@ -75,9 +90,15 @@ class MainActivity: FlutterActivity() {
} }
private fun startLocationService() { private fun startLocationService() {
Log.d("MainActivity", "Android: startLocationService.") if (ContextCompat.checkSelfPermission(
this,
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) { Manifest.permission.ACCESS_FINE_LOCATION
) == PackageManager.PERMISSION_GRANTED &&
ContextCompat.checkSelfPermission(
this,
Manifest.permission.FOREGROUND_SERVICE_LOCATION
) == PackageManager.PERMISSION_GRANTED
) {
if (!isServiceRunning(LocationService::class.java)) { if (!isServiceRunning(LocationService::class.java)) {
val intent = Intent(this, LocationService::class.java) val intent = Intent(this, LocationService::class.java)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
@ -91,15 +112,22 @@ class MainActivity: FlutterActivity() {
Log.d("MainActivity", "Location service is already running.") Log.d("MainActivity", "Location service is already running.")
} }
} else { } else {
Log.d("MainActivity", "Location permission is not granted.") Log.d(
// 位置情報の権限が許可されていない場合の処理を追加する "MainActivity",
"Location permission or Foreground service location permission is not granted."
)
// 位置情報の権限またはフォアグラウンドサービスの位置情報の権限が許可されていない場合の処理を追加する
// 例: ユーザーに権限の必要性を説明し、許可を求めるダイアログを表示するなど
} }
} }
private fun stopLocationService() { private fun stopLocationService() {
Log.d("MainActivity", "Android: stopLocationService.") if (isServiceRunning(LocationService::class.java)) {
val intent = Intent(this, LocationService::class.java) val intent = Intent(this, LocationService::class.java)
stopService(intent) stopService(intent)
} else {
Log.d("MainActivity", "Location service is not running.")
}
} }
private fun isServiceRunning(serviceClass: Class<*>): Boolean { private fun isServiceRunning(serviceClass: Class<*>): Boolean {

View File

@ -1,6 +0,0 @@
package com.dvox.rog_app
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}

View File

@ -1,5 +0,0 @@
package com.example.rog_app
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 544 B

View File

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -3,7 +3,7 @@
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --> <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when <!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame --> the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item> <item name="android:windowBackground">@drawable/launch_background</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.

View File

@ -3,7 +3,7 @@
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --> <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"> <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when <!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame --> the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item> <item name="android:windowBackground">@drawable/launch_background</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.

View File

@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="com.example.rogapp"> <!-- The INTERNET permission is required for development. Specifically,
<!-- Flutter needs it to communicate with the running application the Flutter tool 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.
--> -->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>

View File

@ -1,15 +1,16 @@
// added
buildscript { buildscript {
ext.kotlin_version = '1.7.10' ext.kotlin_version = '1.8.22' // Use the latest version
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.3.0' classpath 'com.android.tools.build:gradle:8.3.0' //8.3.0' //7.3.0' // Use the version compatible with your Android Studio
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }
} }
// added ここまで
allprojects { allprojects {
repositories { repositories {
@ -18,14 +19,16 @@ allprojects {
} }
} }
rootProject.buildDir = '../build' rootProject.buildDir = "../build"
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
} }
subprojects { subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(":app")
} }
tasks.register("clean", Delete) { tasks.register("clean", Delete) {
delete rootProject.buildDir delete rootProject.buildDir
} }

View File

@ -1,8 +1,5 @@
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
#org.gradle.jvmargs=-Xmx6G -XX:MaxMetaspaceSize=3G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
RELEASE_STORE_FILE=release-key.keystore kotlin.code.style=official
RELEASE_STORE_PASSWORD=SachikoMiyata123
RELEASE_KEY_ALIAS=release_key
RELEASE_KEY_PASSWORD=SachikoMiyata123
org.gradle.jvmargs=--add-opens=java.base/java.util=ALL-UNNAMED

View File

@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -1,5 +1,32 @@
include ':app' pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.4.2" apply false
//id "org.jetbrains.kotlin.android" version "1.9.0" apply false
//id "org.jetbrains.kotlin.android" version "1.7.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}
include ":app"
// added
def localPropertiesFile = new File(rootProject.projectDir, "local.properties") def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties() def properties = new Properties()
@ -9,3 +36,4 @@ localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk") def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
// added ここまで

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

535
dependencies.txt Normal file
View File

@ -0,0 +1,535 @@
Dart SDK 3.5.0
Flutter SDK 3.24.0
gifunavi 4.8.19+499
├── async 2.11.0
│ ├── collection...
│ └── meta...
├── camera 0.10.6
│ ├── camera_android 0.10.9+11
│ │ ├── camera_platform_interface...
│ │ ├── flutter...
│ │ ├── flutter_plugin_android_lifecycle...
│ │ └── stream_transform 2.1.0
│ ├── camera_avfoundation 0.9.17+3
│ │ ├── camera_platform_interface...
│ │ ├── flutter...
│ │ └── stream_transform...
│ ├── camera_platform_interface 2.8.0
│ │ ├── cross_file...
│ │ ├── flutter...
│ │ ├── plugin_platform_interface...
│ │ └── stream_transform...
│ ├── camera_web 0.3.5
│ │ ├── camera_platform_interface...
│ │ ├── flutter...
│ │ ├── flutter_web_plugins...
│ │ ├── stream_transform...
│ │ └── web...
│ ├── flutter...
│ └── flutter_plugin_android_lifecycle 2.0.21
│ └── flutter...
├── camera_camera 3.0.0
│ ├── camera...
│ ├── flutter...
│ └── font_awesome_flutter 10.7.0
│ └── flutter...
├── circular_menu 4.0.0
│ └── flutter...
├── collection 1.18.0
├── connectivity_plus 6.0.5
│ ├── collection...
│ ├── connectivity_plus_platform_interface 2.0.1
│ │ ├── flutter...
│ │ ├── meta...
│ │ └── plugin_platform_interface...
│ ├── flutter...
│ ├── flutter_web_plugins...
│ ├── meta...
│ ├── nm 0.5.0
│ │ └── dbus 0.7.10
│ │ ├── args...
│ │ ├── ffi...
│ │ ├── meta...
│ │ └── xml...
│ └── web...
├── cupertino_icons 1.0.8
├── flutter 0.0.0
│ ├── characters 1.3.0
│ ├── collection...
│ ├── material_color_utilities 0.11.1
│ │ └── collection...
│ ├── meta...
│ ├── sky_engine 0.0.99
│ └── vector_math...
├── flutter_breadcrumb 1.0.1
│ ├── flutter...
│ └── pedantic 1.11.1
├── flutter_compass 0.8.0
│ └── flutter...
├── flutter_image 4.1.11
│ └── flutter...
├── flutter_keyboard_visibility 6.0.0
│ ├── flutter...
│ ├── flutter_keyboard_visibility_linux 1.0.0
│ │ ├── flutter...
│ │ └── flutter_keyboard_visibility_platform_interface...
│ ├── flutter_keyboard_visibility_macos 1.0.0
│ │ ├── flutter...
│ │ └── flutter_keyboard_visibility_platform_interface...
│ ├── flutter_keyboard_visibility_platform_interface 2.0.0
│ │ ├── flutter...
│ │ ├── meta...
│ │ └── plugin_platform_interface...
│ ├── flutter_keyboard_visibility_web 2.0.0
│ │ ├── flutter...
│ │ ├── flutter_keyboard_visibility_platform_interface...
│ │ └── flutter_web_plugins...
│ ├── flutter_keyboard_visibility_windows 1.0.0
│ │ ├── flutter...
│ │ └── flutter_keyboard_visibility_platform_interface...
│ └── meta...
├── flutter_launcher_icons 0.13.1
│ ├── args 2.5.0
│ ├── checked_yaml 2.0.3
│ │ ├── json_annotation...
│ │ ├── source_span...
│ │ └── yaml...
│ ├── cli_util 0.4.1
│ │ ├── meta...
│ │ └── path...
│ ├── image 4.2.0
│ │ ├── archive 3.6.1
│ │ │ ├── crypto...
│ │ │ └── path...
│ │ ├── meta...
│ │ └── xml 6.5.0
│ │ ├── collection...
│ │ ├── meta...
│ │ └── petitparser 6.0.2
│ │ └── meta...
│ ├── json_annotation 4.9.0
│ │ └── meta...
│ ├── path...
│ └── yaml 3.1.2
│ ├── collection...
│ ├── source_span...
│ └── string_scanner...
├── flutter_lints 4.0.0
│ └── lints 4.0.0
├── flutter_map 6.2.1
│ ├── async...
│ ├── collection...
│ ├── flutter...
│ ├── http...
│ ├── latlong2...
│ ├── logger 2.4.0
│ ├── meta...
│ ├── polylabel 1.0.1
│ │ └── collection...
│ ├── proj4dart...
│ └── vector_math...
├── flutter_map_location_marker 8.0.5
│ ├── flutter...
│ ├── flutter_compass...
│ ├── flutter_map...
│ ├── geolocator...
│ └── latlong2...
├── flutter_map_marker_cluster 1.3.6
│ ├── flutter...
│ ├── flutter_map...
│ ├── flutter_map_marker_popup 6.1.2
│ │ ├── animated_stack_widget 0.0.4
│ │ │ └── flutter...
│ │ ├── flutter...
│ │ ├── flutter_map...
│ │ ├── latlong2...
│ │ └── provider 6.1.2
│ │ ├── collection...
│ │ ├── flutter...
│ │ └── nested 1.0.0
│ │ └── flutter...
│ └── latlong2...
├── flutter_polyline_points 2.1.0
│ ├── flutter...
│ └── http...
├── flutter_riverpod 2.5.1
│ ├── collection...
│ ├── flutter...
│ ├── meta...
│ ├── riverpod 2.5.1
│ │ ├── collection...
│ │ ├── meta...
│ │ ├── stack_trace...
│ │ └── state_notifier...
│ └── state_notifier 1.0.0
│ └── meta...
├── flutter_test 0.0.0
│ ├── async...
│ ├── boolean_selector 2.1.1
│ │ ├── source_span...
│ │ └── string_scanner...
│ ├── characters...
│ ├── clock...
│ ├── collection...
│ ├── fake_async 1.3.1
│ │ ├── clock...
│ │ └── collection...
│ ├── flutter...
│ ├── leak_tracker 10.0.5
│ │ ├── clock...
│ │ ├── collection...
│ │ ├── meta...
│ │ ├── path...
│ │ └── vm_service...
│ ├── leak_tracker_flutter_testing 3.0.5
│ │ ├── flutter...
│ │ ├── leak_tracker...
│ │ ├── leak_tracker_testing...
│ │ ├── matcher...
│ │ └── meta...
│ ├── leak_tracker_testing 3.0.1
│ │ ├── leak_tracker...
│ │ ├── matcher...
│ │ └── meta...
│ ├── matcher 0.12.16+1
│ │ ├── async...
│ │ ├── meta...
│ │ ├── stack_trace...
│ │ ├── term_glyph...
│ │ └── test_api...
│ ├── material_color_utilities...
│ ├── meta...
│ ├── path...
│ ├── source_span 1.10.0
│ │ ├── collection...
│ │ ├── path...
│ │ └── term_glyph...
│ ├── stack_trace 1.11.1
│ │ └── path...
│ ├── stream_channel 2.1.2
│ │ └── async...
│ ├── string_scanner 1.2.0
│ │ └── source_span...
│ ├── term_glyph 1.2.1
│ ├── test_api 0.7.2
│ │ ├── async...
│ │ ├── boolean_selector...
│ │ ├── collection...
│ │ ├── meta...
│ │ ├── source_span...
│ │ ├── stack_trace...
│ │ ├── stream_channel...
│ │ ├── string_scanner...
│ │ └── term_glyph...
│ ├── vector_math...
│ └── vm_service 14.2.4
├── flutter_typeahead 5.2.0
│ ├── flutter...
│ ├── flutter_keyboard_visibility...
│ └── pointer_interceptor 0.10.1+2
│ ├── flutter...
│ ├── flutter_web_plugins...
│ ├── pointer_interceptor_ios 0.10.1
│ │ ├── flutter...
│ │ ├── plugin_platform_interface...
│ │ └── pointer_interceptor_platform_interface...
│ ├── pointer_interceptor_platform_interface 0.10.0+1
│ │ ├── flutter...
│ │ └── plugin_platform_interface...
│ └── pointer_interceptor_web 0.10.2+1
│ ├── flutter...
│ ├── flutter_web_plugins...
│ ├── plugin_platform_interface...
│ ├── pointer_interceptor_platform_interface...
│ └── web...
├── geojson_vi 2.2.5
├── geolocator 10.1.1
│ ├── flutter...
│ ├── geolocator_android 4.6.1
│ │ ├── flutter...
│ │ ├── geolocator_platform_interface...
│ │ ├── meta...
│ │ └── uuid 4.4.2
│ │ ├── crypto...
│ │ ├── fixnum 1.1.0
│ │ ├── meta...
│ │ └── sprintf 7.0.0
│ ├── geolocator_apple 2.3.7
│ │ ├── flutter...
│ │ └── geolocator_platform_interface...
│ ├── geolocator_platform_interface 4.2.4
│ │ ├── flutter...
│ │ ├── meta...
│ │ ├── plugin_platform_interface 2.1.8
│ │ │ └── meta...
│ │ └── vector_math...
│ ├── geolocator_web 2.2.1
│ │ ├── flutter...
│ │ ├── flutter_web_plugins...
│ │ └── geolocator_platform_interface...
│ └── geolocator_windows 0.2.3
│ ├── flutter...
│ └── geolocator_platform_interface...
├── get 4.6.6
│ └── flutter...
├── google_api_availability 5.0.0
│ ├── flutter...
│ ├── google_api_availability_android 1.0.1
│ │ ├── flutter...
│ │ └── google_api_availability_platform_interface...
│ └── google_api_availability_platform_interface 1.0.1
│ ├── flutter...
│ ├── meta...
│ └── plugin_platform_interface...
├── google_fonts 6.2.1
│ ├── crypto 3.0.5
│ │ └── typed_data 1.3.2
│ │ └── collection...
│ ├── flutter...
│ ├── http...
│ └── path_provider...
├── http 1.2.2
│ ├── async...
│ ├── http_parser 4.0.2
│ │ ├── collection...
│ │ ├── source_span...
│ │ ├── string_scanner...
│ │ └── typed_data...
│ ├── meta...
│ └── web...
├── image_gallery_saver 2.0.3
│ └── flutter...
├── image_picker 1.1.2
│ ├── flutter...
│ ├── image_picker_android 0.8.12+12
│ │ ├── flutter...
│ │ ├── flutter_plugin_android_lifecycle...
│ │ └── image_picker_platform_interface...
│ ├── image_picker_for_web 3.0.5
│ │ ├── flutter...
│ │ ├── flutter_web_plugins...
│ │ ├── image_picker_platform_interface...
│ │ ├── mime 1.0.5
│ │ └── web...
│ ├── image_picker_ios 0.8.12
│ │ ├── flutter...
│ │ └── image_picker_platform_interface...
│ ├── image_picker_linux 0.2.1+1
│ │ ├── file_selector_linux 0.9.2+1
│ │ │ ├── cross_file...
│ │ │ ├── file_selector_platform_interface...
│ │ │ └── flutter...
│ │ ├── file_selector_platform_interface 2.6.2
│ │ │ ├── cross_file...
│ │ │ ├── flutter...
│ │ │ ├── http...
│ │ │ └── plugin_platform_interface...
│ │ ├── flutter...
│ │ └── image_picker_platform_interface...
│ ├── image_picker_macos 0.2.1+1
│ │ ├── file_selector_macos 0.9.4
│ │ │ ├── cross_file...
│ │ │ ├── file_selector_platform_interface...
│ │ │ └── flutter...
│ │ ├── file_selector_platform_interface...
│ │ ├── flutter...
│ │ └── image_picker_platform_interface...
│ ├── image_picker_platform_interface 2.10.0
│ │ ├── cross_file 0.3.4+2
│ │ │ ├── meta...
│ │ │ └── web...
│ │ ├── flutter...
│ │ ├── http...
│ │ └── plugin_platform_interface...
│ └── image_picker_windows 0.2.1+1
│ ├── file_selector_platform_interface...
│ ├── file_selector_windows 0.9.3+2
│ │ ├── cross_file...
│ │ ├── file_selector_platform_interface...
│ │ └── flutter...
│ ├── flutter...
│ └── image_picker_platform_interface...
├── intl 0.19.0
│ ├── clock...
│ ├── meta...
│ └── path...
├── keyboard_dismisser 3.0.0
│ └── flutter...
├── latlong2 0.9.1
│ └── intl...
├── logging 1.2.0
├── material_design_icons_flutter 7.0.7296
│ └── flutter...
├── meta 1.15.0
├── modal_bottom_sheet 3.0.0
│ └── flutter...
├── package_info_plus 8.0.2
│ ├── clock 1.1.1
│ ├── ffi...
│ ├── flutter...
│ ├── flutter_web_plugins 0.0.0
│ │ ├── characters...
│ │ ├── collection...
│ │ ├── flutter...
│ │ ├── material_color_utilities...
│ │ ├── meta...
│ │ └── vector_math...
│ ├── http...
│ ├── meta...
│ ├── package_info_plus_platform_interface 3.0.1
│ │ ├── flutter...
│ │ ├── meta...
│ │ └── plugin_platform_interface...
│ ├── path...
│ ├── web 1.0.0
│ └── win32...
├── path_provider 2.1.4
│ ├── flutter...
│ ├── path_provider_android 2.2.10
│ │ ├── flutter...
│ │ └── path_provider_platform_interface...
│ ├── path_provider_foundation 2.4.0
│ │ ├── flutter...
│ │ └── path_provider_platform_interface...
│ ├── path_provider_linux 2.2.1
│ │ ├── ffi...
│ │ ├── flutter...
│ │ ├── path...
│ │ ├── path_provider_platform_interface...
│ │ └── xdg_directories 1.0.4
│ │ ├── meta...
│ │ └── path...
│ ├── path_provider_platform_interface 2.1.2
│ │ ├── flutter...
│ │ ├── platform 3.1.5
│ │ └── plugin_platform_interface...
│ └── path_provider_windows 2.3.0
│ ├── ffi...
│ ├── flutter...
│ ├── path...
│ └── path_provider_platform_interface...
├── permission_handler 11.3.1
│ ├── flutter...
│ ├── meta...
│ ├── permission_handler_android 12.0.12
│ │ ├── flutter...
│ │ └── permission_handler_platform_interface...
│ ├── permission_handler_apple 9.4.5
│ │ ├── flutter...
│ │ └── permission_handler_platform_interface...
│ ├── permission_handler_html 0.1.3+1
│ │ ├── flutter...
│ │ ├── flutter_web_plugins...
│ │ ├── permission_handler_platform_interface...
│ │ └── web...
│ ├── permission_handler_platform_interface 4.2.2
│ │ ├── flutter...
│ │ ├── meta...
│ │ └── plugin_platform_interface...
│ └── permission_handler_windows 0.2.1
│ ├── flutter...
│ └── permission_handler_platform_interface...
├── positioned_tap_detector_2 1.0.4
│ └── flutter...
├── proj4dart 2.1.0
│ ├── meta...
│ ├── mgrs_dart 2.0.0
│ │ └── unicode 0.3.1
│ │ └── lists 1.0.1
│ │ └── meta...
│ └── wkt_parser 2.0.0
├── qr_code_scanner 1.0.1
│ ├── flutter...
│ ├── flutter_web_plugins...
│ └── js 0.6.7
│ └── meta...
├── rename 3.0.2
│ ├── args...
│ ├── logger...
│ └── path...
├── shared_preferences 2.3.2
│ ├── flutter...
│ ├── shared_preferences_android 2.3.1
│ │ ├── flutter...
│ │ └── shared_preferences_platform_interface...
│ ├── shared_preferences_foundation 2.5.2
│ │ ├── flutter...
│ │ └── shared_preferences_platform_interface...
│ ├── shared_preferences_linux 2.4.1
│ │ ├── file 7.0.0
│ │ │ ├── meta...
│ │ │ └── path...
│ │ ├── flutter...
│ │ ├── path...
│ │ ├── path_provider_linux...
│ │ ├── path_provider_platform_interface...
│ │ └── shared_preferences_platform_interface...
│ ├── shared_preferences_platform_interface 2.4.1
│ │ ├── flutter...
│ │ └── plugin_platform_interface...
│ ├── shared_preferences_web 2.4.2
│ │ ├── flutter...
│ │ ├── flutter_web_plugins...
│ │ ├── shared_preferences_platform_interface...
│ │ └── web...
│ └── shared_preferences_windows 2.4.1
│ ├── file...
│ ├── flutter...
│ ├── path...
│ ├── path_provider_platform_interface...
│ ├── path_provider_windows...
│ └── shared_preferences_platform_interface...
├── sqflite 2.3.3+1
│ ├── flutter...
│ ├── path 1.9.0
│ └── sqflite_common 2.5.4+2
│ ├── meta...
│ ├── path...
│ └── synchronized 3.2.0
├── timeline_tile 2.0.0
│ └── flutter...
├── timezone 0.9.4
│ └── path...
├── transparent_image 2.0.1
├── tuple 2.0.2
├── url_launcher 6.3.0
│ ├── flutter...
│ ├── url_launcher_android 6.3.9
│ │ ├── flutter...
│ │ └── url_launcher_platform_interface...
│ ├── url_launcher_ios 6.3.1
│ │ ├── flutter...
│ │ └── url_launcher_platform_interface...
│ ├── url_launcher_linux 3.2.0
│ │ ├── flutter...
│ │ └── url_launcher_platform_interface...
│ ├── url_launcher_macos 3.2.0
│ │ ├── flutter...
│ │ └── url_launcher_platform_interface...
│ ├── url_launcher_platform_interface 2.3.2
│ │ ├── flutter...
│ │ └── plugin_platform_interface...
│ ├── url_launcher_web 2.3.3
│ │ ├── flutter...
│ │ ├── flutter_web_plugins...
│ │ ├── url_launcher_platform_interface...
│ │ └── web...
│ └── url_launcher_windows 3.1.2
│ ├── flutter...
│ └── url_launcher_platform_interface...
├── vector_math 2.1.4
├── webview_flutter 4.8.0
│ ├── flutter...
│ ├── webview_flutter_android 3.16.6
│ │ ├── flutter...
│ │ └── webview_flutter_platform_interface...
│ ├── webview_flutter_platform_interface 2.10.0
│ │ ├── flutter...
│ │ ├── meta...
│ │ └── plugin_platform_interface...
│ └── webview_flutter_wkwebview 3.15.0
│ ├── flutter...
│ ├── path...
│ └── webview_flutter_platform_interface...
└── win32 5.5.4
└── ffi 2.1.3

3
devtools_options.yaml Normal file
View File

@ -0,0 +1,3 @@
description: This file stores settings for Dart & Flutter DevTools.
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
extensions:

View File

@ -0,0 +1,5 @@
flutter_launcher_icons:
android: "launcher_icon"
ios: true
image_path: "assets/images/appicon.png"
min_sdk_android: 21 # android min sdk min:16, default 21

1
gifunavi/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

40
gifunavi/build.gradle.kts Normal file
View File

@ -0,0 +1,40 @@
plugins {
id("com.android.application")
}
android {
namespace = "com.dvox.gifunavi"
compileSdk = 34
defaultConfig {
applicationId = "com.dvox.gifunavi"
minSdk = 21
targetSdk = 34
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
dependencies {
implementation("com.android.support:appcompat-v7:28.0.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("com.android.support.test:runner:1.0.2")
androidTestImplementation("com.android.support.test.espresso:espresso-core:3.0.2")
}

21
gifunavi/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -0,0 +1,25 @@
package com.dvox.gifunavi;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.dvox.gifunavi", appContext.getPackageName());
}
}

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.READMEmd" />
</manifest>

View File

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

View File

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@ -0,0 +1,10 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.READMEmd" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryDark">@color/purple_700</item>
<item name="colorAccent">@color/teal_200</item>
<!-- Customize your theme here. -->
</style>
</resources>

Some files were not shown because too many files have changed in this diff Show More