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
398 changed files with 20881 additions and 51703 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

208
README.md
View File

@ -1,16 +1,192 @@
# rogapp # gifunavi
A new Flutter project. A new Flutter project.
## Getting Started ## Getting Started
This project is a starting point for a Flutter application. 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

@ -1,29 +1,28 @@
# This file configures the analyzer, which statically analyzes Dart code to # This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints. # check for errors, warnings, and lints.
# #
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`. # invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps, # The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices. # packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml include: package:flutter_lints/flutter.yaml
linter: 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 # or a specific dart file by using the `// ignore: name_of_lint` and
# or a specific dart file by using the `// ignore: name_of_lint` and # `// ignore_for_file: name_of_lint` syntax on the line or in the file
# `// ignore_for_file: name_of_lint` syntax on the line or in the file # producing the lint.
# producing the lint. rules:
rules: # avoid_print: false # Uncomment to disable the `avoid_print` rule
# avoid_print: false # Uncomment to disable the `avoid_print` rule # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options
# https://dart.dev/guides/language/analysis-options

26
android/.gitignore vendored
View File

@ -1,13 +1,13 @@
gradle-wrapper.jar gradle-wrapper.jar
/.gradle /.gradle
/captures/ /captures/
/gradlew /gradlew
/gradlew.bat /gradlew.bat
/local.properties /local.properties
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,97 +1,144 @@
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"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties') // added ここから
if (localPropertiesFile.exists()) { def localProperties = new Properties()
localPropertiesFile.withReader('UTF-8') { reader -> def localPropertiesFile = rootProject.file('local.properties')
localProperties.load(reader) if (localPropertiesFile.exists()) {
} localPropertiesFile.withReader('UTF-8') { reader ->
} localProperties.load(reader)
}
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')
} if (flutterVersionCode == null) {
flutterVersionCode = '1'
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') }
if (flutterVersionCode == null) {
flutterVersionCode = '1' def flutterVersionName = localProperties.getProperty('flutter.versionName')
} if (flutterVersionName == null) {
flutterVersionName = '1.0'
def flutterVersionName = localProperties.getProperty('flutter.versionName') }
if (flutterVersionName == null) {
flutterVersionName = '1.0' def keystoreProperties = new Properties()
} def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
def keystoreProperties = new Properties() // added ここまで
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) { android {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) namespace = "com.dvox.gifunavi"
} compileSdk 34
ndkVersion = '27.0.12077973'
android {
compileOptions {
compileSdkVersion 34 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
lintOptions { }
checkReleaseBuilds false
} kotlinOptions {
jvmTarget = '1.8' //JavaVersion.VERSION_1_8
compileOptions { }
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 // Added : Add this block to force all libraries to use the same Kotlin version
} configurations.all {
resolutionStrategy {
kotlinOptions { //force "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
jvmTarget = '1.8' 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'
sourceSets { }
main.java.srcDirs += 'src/main/kotlin' }
} // 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
signingConfigs { }
release {
if (project.hasProperty("RELEASE_STORE_FILE")) { // added for release
storeFile file(RELEASE_STORE_FILE) signingConfigs {
storePassword RELEASE_STORE_PASSWORD if (keystoreProperties['storeFile'] != null) {
keyAlias RELEASE_KEY_ALIAS release {
keyPassword RELEASE_KEY_PASSWORD keyAlias keystoreProperties['keyAlias']
} keyPassword keystoreProperties['keyPassword']
//keyAlias keystoreProperties['keyAlias'] storeFile file(keystoreProperties['storeFile'])
//keyPassword keystoreProperties['keyPassword'] storePassword keystoreProperties['storePassword']
//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
flutter { }
source '../..' }
}
lint {
dependencies { baseline = file("lint-baseline.xml")
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" }
}
lintOptions {
disable 'MissingPermission'
}
task wrapper(type: Wrapper){
gradleVersion = '8.2.1'
}
task prepareKotlinBuildScriptModel {
}
}
flutter {
source = "../.."
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" // added
//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,7 +1,7 @@
<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"/>
</manifest> </manifest>

View File

@ -1,43 +1,70 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.rogapp"> xmlns:tools="http://schemas.android.com/tools"
<uses-permission android:name="android.permission.INTERNET"/> package="com.dvox.gifunavi">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-feature
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> android:name="android.hardware.camera"
<uses-permission android:name="android.permission.WAKE_LOCK"/> android:required="false" />
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
android:label="岐阜ナビ" <uses-permission android:name="android.permission.WAKE_LOCK"/>
android:name="${applicationName}" <uses-permission android:name="android.permission.RECORD_AUDIO"/>
android:icon="@mipmap/ic_launcher"> <uses-permission android:name="android.permission.CAMERA"/>
<activity <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
android:name=".MainActivity" <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
android:exported="true" <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
android:launchMode="singleTop" <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
android:theme="@style/LaunchTheme" <uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" <application
android:hardwareAccelerated="true" android:label="岐阜ナビ"
android:windowSoftInputMode="adjustResize"> android:icon="@mipmap/launcher_icon">
<!-- Specifies an Android theme to apply to this Activity as soon as <activity
the Android process has started. This theme is visible to the user android:name=".MainActivity"
while the Flutter UI initializes. After that, this theme continues android:exported="true"
to determine the Window background behind the Flutter UI. --> android:launchMode="singleTop"
<meta-data android:taskAffinity=""
android:name="io.flutter.embedding.android.NormalTheme" android:theme="@style/LaunchTheme"
android:resource="@style/NormalTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
/> android:hardwareAccelerated="true"
<intent-filter> android:windowSoftInputMode="adjustResize"
<action android:name="android.intent.action.MAIN"/> >
<category android:name="android.intent.category.LAUNCHER"/> <!-- Specifies an Android theme to apply to this Activity as soon as
</intent-filter> the Android process has started. This theme is visible to the user
</activity> while the Flutter UI initializes. After that, this theme continues
<!-- Don't delete the meta-data below. to determine the Window background behind the Flutter UI. -->
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> <meta-data
<meta-data android:name="io.flutter.embedding.android.NormalTheme"
android:name="flutterEmbedding" android:resource="@style/NormalTheme"
android:value="2" /> />
<meta-data android:name="com.google.android.geo.API_KEY" <intent-filter>
android:value="AIzaSyAUBI1ablMKuJwGj2-kSuEhvYxvB1A-mOE"/> <action android:name="android.intent.action.MAIN"/>
</application> <category android:name="android.intent.category.LAUNCHER"/>
</manifest> </intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAUBI1ablMKuJwGj2-kSuEhvYxvB1A-mOE"/>
 <service
android:name=".LocationService"
android:enableOnBackInvokedCallback="true"
android:enabled="true"
android:exported="false"
android:foregroundServiceType="location" />
</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>

View File

@ -0,0 +1,250 @@
package com.dvox.gifunavi
import android.location.Location
import android.Manifest
import android.annotation.TargetApi
import android.app.NotificationChannel
import android.app.NotificationManager
import android.app.Service
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.location.LocationManager
import android.os.Build
import android.os.IBinder
import android.util.Log
import androidx.core.app.NotificationCompat
import androidx.core.content.ContextCompat
import com.google.android.gms.location.FusedLocationProviderClient
import com.google.android.gms.location.LocationCallback
import com.google.android.gms.location.LocationRequest
import com.google.android.gms.location.LocationResult
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.launch
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
import android.app.Notification
data class GpsData(
val id: Int,
val teamName: String,
val eventCode: String,
val lat: Double,
val lon: Double,
val isCheckin: Int,
val createdAt: Long
)
class GpsDatabaseHelper(private val context: Context) {
fun insertGps(gpsData: GpsData) {
Log.d("LocationService", "Android: insertGps.")
// ここにデータベースへの挿入処理を実装する
}
companion object {
fun getInstance(context: Context): GpsDatabaseHelper {
Log.d("LocationService", "Android: GpsDatabaseHelper.")
return GpsDatabaseHelper(context)
}
}
}
class LocationService : Service() {
private lateinit var fusedLocationClient: FusedLocationProviderClient
private lateinit var gpsDatabaseHelper: GpsDatabaseHelper
override fun onBind(intent: Intent?): IBinder? {
return null
}
override fun onCreate() {
super.onCreate()
Log.d("LocationService", "Android: onCreate.")
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有効化の確認")
val locationManager = getSystemService(Context.LOCATION_SERVICE) as LocationManager
if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
val locationRequest = LocationRequest.Builder(Priority.PRIORITY_HIGH_ACCURACY, 10000)
.setMinUpdateIntervalMillis(5000)
.build()
/*
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) {
val channel = NotificationChannel(CHANNEL_ID, "Location", NotificationManager.IMPORTANCE_DEFAULT)
val notificationManager = getSystemService(NotificationManager::class.java)
notificationManager?.createNotificationChannel(channel)
}
val notification = NotificationCompat.Builder(this, CHANNEL_ID)
.setContentTitle("Tracking location...")
.setContentText("Location: null")
.setSmallIcon(android.R.drawable.ic_menu_mylocation)
.setOngoing(true)
.build()
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() {
super.onDestroy()
Log.d("LocationService", "Android: onDestroy.")
fusedLocationClient.removeLocationUpdates(locationCallback)
stopForeground(STOP_FOREGROUND_REMOVE)
stopSelf()
}
companion object {
private const val NOTIFICATION_ID = 1
private const val CHANNEL_ID = "location_service_channel"
}
private fun createNotification(): Notification {
Log.d("LocationService", "Android: createNotification Notification.")
val notificationBuilder = NotificationCompat.Builder(this, CHANNEL_ID)
.setContentTitle("Location Service")
.setContentText("Running...")
.setSmallIcon(android.R.drawable.ic_menu_mylocation)
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channelName = "Location Service Channel"
val channelDescription = "Channel for Location Service"
val importance = NotificationManager.IMPORTANCE_DEFAULT
val channel = NotificationChannel(CHANNEL_ID, channelName, importance).apply {
description = channelDescription
}
val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
notificationManager.createNotificationChannel(channel)
}
return notificationBuilder.build()
}
private fun createNotificationChannel() {
Log.d("LocationService", "Android: createNotificationChannel.")
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel = NotificationChannel(
CHANNEL_ID,
"Location Service Channel",
NotificationManager.IMPORTANCE_DEFAULT
)
val manager = getSystemService(NotificationManager::class.java)
manager.createNotificationChannel(channel)
}
}
private var lastLocation: Location? = null
private val locationCallback = object : LocationCallback() {
override fun onLocationResult(locationResult: LocationResult) {
val currentLocation = locationResult.lastLocation
if (currentLocation != null) {
val accuracy = currentLocation.accuracy
if (accuracy <= 30) {
var lastLocation = lastLocation
if (lastLocation == null || currentLocation.distanceTo(lastLocation) >= 10) {
val lat = currentLocation.latitude
val lon = currentLocation.longitude
val currentTime = System.currentTimeMillis()
// GPSデータをデバッグ用に表示
val sdf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault())
val formattedTime = sdf.format(Date(currentTime))
//Log.d("LocationService", "Android: {$formattedTime}")
// GPSデータをデータベースに保存
GlobalScope.launch(Dispatchers.IO) {
addGPStoDB(lat, lon, currentTime)
}
lastLocation = currentLocation
}
} else {
Log.d("LocationService", "Android: GPS accuracy is above 30m. Skipping data saving.")
}
} else {
Log.d("LocationService", "Android: No GPS signal received.")
}
}
}
/*
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
Log.d("LocationService", "Android: onStartCommand.")
// Foregroundサービスを開始
startForeground(NOTIFICATION_ID, createNotification())
return START_STICKY
}
*/
private suspend fun addGPStoDB(lat: Double, lng: Double, timestamp: Long, isCheckin: Int = 0) {
try {
val context = applicationContext
val preferences = context.getSharedPreferences("RogPreferences", Context.MODE_PRIVATE)
val teamName = preferences.getString("team_name", "") ?: ""
val eventCode = preferences.getString("event_code", "") ?: ""
if (teamName.isNotEmpty() && eventCode.isNotEmpty()) {
val gpsData = GpsData(
id = 0,
teamName = teamName,
eventCode = eventCode,
lat = lat,
lon = lng,
isCheckin = isCheckin,
createdAt = timestamp
)
gpsDatabaseHelper.insertGps(gpsData)
Log.d("LocationService", "Android: addGPStoDB.")
}
} catch (e: Exception) {
Log.e("LocationService", "Error adding GPS data to DB", e)
// エラーメッセージをユーザーに表示するなどの処理を追加
}
}
}

View File

@ -0,0 +1,142 @@
package com.dvox.gifunavi
import android.Manifest
import android.app.ActivityManager
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import android.os.Bundle
import android.widget.Toast
import androidx.annotation.NonNull
import androidx.core.content.ContextCompat
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
import android.util.Log
class MainActivity: FlutterActivity() {
private val CHANNEL = "location"
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
MethodChannel(
flutterEngine.dartExecutor.binaryMessenger,
CHANNEL
).setMethodCallHandler { call, result ->
when (call.method) {
"startLocationService" -> {
Log.d("MainActivity", "Android: called startLocationService.")
//val intent = Intent(this, LocationService::class.java)
startLocationService()
result.success(null)
}
"stopLocationService" -> {
Log.d("MainActivity", "Android: called stopLocationService.")
//val intent = Intent(this, LocationService::class.java)
stopLocationService()
result.success(null)
}
"isLocationServiceRunning" -> {
Log.d("MainActivity", "Android: called isLocationServiceRunnung.")
val isRunning = isServiceRunning(LocationService::class.java)
result.success(isRunning)
}
else -> {
result.notImplemented()
}
}
}
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Log.d("MainActivity", "Android: onCreate.")
// 位置情報の権限をリクエストする==> main() の前にコールされるので除外 2024-7-19
/*
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.ACCESS_FINE_LOCATION), PERMISSION_REQUEST_CODE)
} else {
// startLocationService() // アプリ起動時にLocationServiceを開始する ==> main.dartで制御する。
}
*/
}
override fun onRequestPermissionsResult(
requestCode: Int,
permissions: Array<out String>,
grantResults: IntArray
) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
if (requestCode == PERMISSION_REQUEST_CODE) {
if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
// startLocationService()
Log.d("MainActivity", "Android: PERMISSION_GRANTED.")
} else {
// 位置情報の権限が拒否された場合の処理
Toast.makeText(this, "Location permission denied.", Toast.LENGTH_SHORT).show()
}
}
}
companion object {
private const val PERMISSION_REQUEST_CODE = 1
}
private fun startLocationService() {
if (ContextCompat.checkSelfPermission(
this,
Manifest.permission.ACCESS_FINE_LOCATION
) == PackageManager.PERMISSION_GRANTED &&
ContextCompat.checkSelfPermission(
this,
Manifest.permission.FOREGROUND_SERVICE_LOCATION
) == PackageManager.PERMISSION_GRANTED
) {
if (!isServiceRunning(LocationService::class.java)) {
val intent = Intent(this, LocationService::class.java)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
Log.d("MainActivity", "startForegroundService")
startForegroundService(intent)
} else {
Log.d("MainActivity", "startService")
startService(intent)
}
} else {
Log.d("MainActivity", "Location service is already running.")
}
} else {
Log.d(
"MainActivity",
"Location permission or Foreground service location permission is not granted."
)
// 位置情報の権限またはフォアグラウンドサービスの位置情報の権限が許可されていない場合の処理を追加する
// 例: ユーザーに権限の必要性を説明し、許可を求めるダイアログを表示するなど
}
}
private fun stopLocationService() {
if (isServiceRunning(LocationService::class.java)) {
val intent = Intent(this, LocationService::class.java)
stopService(intent)
} else {
Log.d("MainActivity", "Location service is not running.")
}
}
private fun isServiceRunning(serviceClass: Class<*>): Boolean {
val manager = getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
for (service in manager.getRunningServices(Int.MAX_VALUE)) {
if (serviceClass.name == service.service.className) {
return true
}
}
return false
}
}

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()

View File

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

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen --> <!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" /> <item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here --> <!-- You can insert your own image assets here -->
<!-- <item> <!-- <item>
<bitmap <bitmap
android:gravity="center" android:gravity="center"
android:src="@mipmap/launch_image" /> android:src="@mipmap/launch_image" />
</item> --> </item> -->
</layer-list> </layer-list>

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen --> <!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" /> <item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here --> <!-- You can insert your own image assets here -->
<!-- <item> <!-- <item>
<bitmap <bitmap
android:gravity="center" android:gravity="center"
android:src="@mipmap/launch_image" /> android:src="@mipmap/launch_image" />
</item> --> </item> -->
</layer-list> </layer-list>

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

@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- 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.
This theme determines the color of the Android Window while your This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its Flutter UI initializes, as well as behind your Flutter UI while its
running. running.
This Theme is only used starting with V2 of Flutter's Android embedding. --> This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item> <item name="android:windowBackground">?android:colorBackground</item>
</style> </style>
</resources> </resources>

View File

@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- 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.
This theme determines the color of the Android Window while your This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its Flutter UI initializes, as well as behind your Flutter UI while its
running. running.
This Theme is only used starting with V2 of Flutter's Android embedding. --> This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"> <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item> <item name="android:windowBackground">?android:colorBackground</item>
</style> </style>
</resources> </resources>

View File

@ -1,7 +1,7 @@
<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"/>
</manifest> </manifest>

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,7 +1,5 @@
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true #org.gradle.jvmargs=-Xmx6G -XX:MaxMetaspaceSize=3G -XX:+HeapDumpOnOutOfMemoryError
android.enableJetifier=true android.useAndroidX=true
RELEASE_STORE_FILE=release-key.keystore android.enableJetifier=true
RELEASE_STORE_PASSWORD=SachikoMiyata123 kotlin.code.style=official
RELEASE_KEY_ALIAS=release_key
RELEASE_KEY_PASSWORD=SachikoMiyata123

View File

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

View File

@ -1,11 +1,39 @@
include ':app' pluginManagement {
def flutterSdkPath = {
def localPropertiesFile = new File(rootProject.projectDir, "local.properties") def properties = new Properties()
def properties = new Properties() file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert localPropertiesFile.exists() assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } return flutterSdkPath
}()
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.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 properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
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>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>

View File

@ -0,0 +1,3 @@
<resources>
<string name="app_name">gifunavi</string>
</resources>

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_500</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