Release 4.8.0 - 2024-05-26

This commit is contained in:
2024-05-26 11:00:06 +09:00
parent 6a49aed98d
commit ae05a8bbcd
10 changed files with 170 additions and 162 deletions

View File

@ -398,11 +398,11 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 469;
CURRENT_PROJECT_VERSION = 480;
DEVELOPMENT_TEAM = UMNEWT25JR;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 4.5.3;
FLUTTER_BUILD_NUMBER = 469;
FLUTTER_BUILD_NAME = 4.8.0;
FLUTTER_BUILD_NUMBER = 480;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "岐阜ナビ";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.healthcare-fitness";
@ -411,7 +411,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.5.3;
MARKETING_VERSION = 4.8.0;
PRODUCT_BUNDLE_IDENTIFIER = com.dvox.gifunavi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -539,11 +539,11 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 469;
CURRENT_PROJECT_VERSION = 480;
DEVELOPMENT_TEAM = UMNEWT25JR;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 4.5.3;
FLUTTER_BUILD_NUMBER = 469;
FLUTTER_BUILD_NAME = 4.8.0;
FLUTTER_BUILD_NUMBER = 480;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "岐阜ナビ";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.healthcare-fitness";
@ -552,7 +552,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.5.3;
MARKETING_VERSION = 4.8.0;
PRODUCT_BUNDLE_IDENTIFIER = com.dvox.gifunavi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -571,11 +571,11 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 469;
CURRENT_PROJECT_VERSION = 480;
DEVELOPMENT_TEAM = UMNEWT25JR;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 4.5.3;
FLUTTER_BUILD_NUMBER = 469;
FLUTTER_BUILD_NAME = 4.8.0;
FLUTTER_BUILD_NUMBER = 480;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "岐阜ナビ";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.healthcare-fitness";
@ -584,7 +584,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.5.3;
MARKETING_VERSION = 4.8.0;
PRODUCT_BUNDLE_IDENTIFIER = com.dvox.gifunavi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@ -59,6 +59,13 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "IDEPreferLogStreaming"
value = "YES"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"

View File

@ -1,8 +1,10 @@
import UIKit
import CoreLocation
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
@objc class AppDelegate: FlutterAppDelegate, CLLocationManagerDelegate {
var locationManager: CLLocationManager?
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
@ -12,6 +14,7 @@ import Flutter
let controller : FlutterViewController = window?.rootViewController as! FlutterViewController
let locationServiceChannel = FlutterMethodChannel(name: "location",
binaryMessenger: controller.binaryMessenger)
/*
locationServiceChannel.setMethodCallHandler { (call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
if call.method == "isLocationServiceRunning" {
result(self.isLocationServiceRunning())
@ -19,6 +22,18 @@ import Flutter
result(FlutterMethodNotImplemented)
}
}
*/
locationServiceChannel.setMethodCallHandler { [weak self] (call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
if call.method == "startLocationService" {
//self?.startLocationService()
result(nil)
} else if call.method == "isLocationServiceRunning" {
result(self?.isLocationServiceRunning() ?? false)
} else {
result(FlutterMethodNotImplemented)
}
}
locationManager = CLLocationManager()
locationManager?.delegate = self

View File

@ -24,8 +24,6 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>FLTEnableImpeller</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
@ -38,6 +36,8 @@
<string>このアプリはチェックポイントへのチェックインや走行履歴を記録するために、位置情報にアクセスします。</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>撮影した写真はデバイスのアルバムに保存されます。これにより、不具合時の通過記録を安全に担保することができます。</string>
<key>NSMicrophoneUsageDescription</key>
<string>このアプリではカメラは使用しますが、マイクの使用は当面行いません。</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>LSApplicationCategoryType</key>

View File

@ -3,11 +3,13 @@ import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:path/path.dart' as path;
import 'package:path_provider/path_provider.dart';
import 'package:rogapp/model/destination.dart';
class CustomCameraView extends StatefulWidget {
final Function(String) onImageCaptured;
final Destination? destination;
const CustomCameraView({Key? key, required this.onImageCaptured}) : super(key: key);
const CustomCameraView({Key? key, required this.onImageCaptured, required this.destination}) : super(key: key);
@override
_CustomCameraViewState createState() => _CustomCameraViewState();
@ -19,11 +21,13 @@ class _CustomCameraViewState extends State<CustomCameraView> {
int _selectedCameraIndex = 0;
double _currentScale = 1.0;
FlashMode _currentFlashMode = FlashMode.off;
Destination? destination;
@override
void initState() {
super.initState();
_initializeCamera();
destination = widget.destination;
}
Future<void> _initializeCamera() async {
@ -98,7 +102,25 @@ class _CustomCameraViewState extends State<CustomCameraView> {
return Stack(
children: [
CameraPreview(_controller!),
Padding(
padding: const EdgeInsets.only(top: 60.0), // 上部に60ピクセルのパディングを追加
child: CameraPreview(_controller!),
),
Positioned(
bottom: 120.0,
left: 16.0,
right: 16.0,
child: Center(
child: Text(
destination?.tags ?? '',
style: const TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
),
),
Positioned(
bottom: 16.0,
left: 16.0,

View File

@ -764,6 +764,7 @@ class DestinationController extends GetxController {
onImageCaptured: (imagePath) {
photos.add(File(imagePath));
},
destination: destination,
),
/*
builder: (_) => CameraCamera(
@ -973,7 +974,7 @@ class DestinationController extends GetxController {
is_checkin: isCheckin,
created_at: DateTime.now().millisecondsSinceEpoch);
var res = await db.insertGps(gps_data);
debugPrint("Saved GPS data into DB...:${gps_data}");
//debugPrint("Saved GPS data into DB...:${gps_data}");
}
} catch (err) {
print("errr ready gps ${err}");

View File

@ -41,7 +41,7 @@ class _HistoryPageState extends State<HistoryPage> {
} else if (snapshot.hasData) {
final dests = snapshot.data;
if (dests!.isNotEmpty) {
debugPrint("----- history -----");
debugPrint("----- 通過履歴表示 -----");
return SizedBox(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,

View File

@ -21,13 +21,13 @@ class PermissionController {
*/
static Future<bool> checkStoragePermission() async {
debugPrint("(gifunavi)== checkStoragePermission ==");
//debugPrint("(gifunavi)== checkStoragePermission ==");
final storagePermission = await Permission.storage.status;
return storagePermission == PermissionStatus.granted;
}
static Future<void> requestStoragePermission() async {
debugPrint("(gifunavi)== requestStoragePermission ==");
//debugPrint("(gifunavi)== requestStoragePermission ==");
final storagePermission = await Permission.storage.request();
if (storagePermission == PermissionStatus.granted) {
@ -43,26 +43,26 @@ class PermissionController {
}
static Future<bool> checkLocationBasicPermission() async {
debugPrint("(gifunavi)== checkLocationBasicPermission ==");
//debugPrint("(gifunavi)== checkLocationBasicPermission ==");
final locationPermission = await Permission.location.status;
return locationPermission == PermissionStatus.granted;
}
static Future<bool> checkLocationWhenInUsePermission() async {
debugPrint("(gifunavi)== checkLocationWhenInUsePermission ==");
//debugPrint("(gifunavi)== checkLocationWhenInUsePermission ==");
final whenInUsePermission = await Permission.locationWhenInUse.status;
return whenInUsePermission == PermissionStatus.granted;
}
static Future<bool> checkLocationAlwaysPermission() async {
debugPrint("(gifunavi)== checkLocationAlwaysPermission ==");
//debugPrint("(gifunavi)== checkLocationAlwaysPermission ==");
final alwaysPermission = await Permission.locationAlways.status;
return alwaysPermission == PermissionStatus.granted;
}
static bool isBasicPermission=false;
static Future<void> requestLocationBasicPermissions() async {
debugPrint("(gifunavi)== requestLocationBasicPermissions ==");
//debugPrint("(gifunavi)== requestLocationBasicPermissions ==");
try{
if(!isBasicPermission){
isBasicPermission=true;
@ -84,7 +84,7 @@ class PermissionController {
static bool isRequestedWhenInUsePermission = false;
static Future<void> requestLocationWhenInUsePermissions() async {
debugPrint("(gifunavi)== requestLocationWhenInUsePermissions ==");
//debugPrint("(gifunavi)== requestLocationWhenInUsePermissions ==");
try{
if(!isRequestedWhenInUsePermission){
@ -116,7 +116,7 @@ class PermissionController {
static bool isRequestedAlwaysPermission = false;
static Future<void> requestLocationAlwaysPermissions() async {
debugPrint("(gifunavi)== requestLocationAlwaysPermissions ==");
//debugPrint("(gifunavi)== requestLocationAlwaysPermissions ==");
try {
if( !isRequestedAlwaysPermission ){

View File

@ -75,7 +75,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
}
} else {
GeoJSONFeature gf = indexController.currentFeature[0];
print("=== photo sss ${gf.properties!["photos"]}");
//print("=== photo sss ${gf.properties!["photos"]}");
if (gf.properties!["photos"] == null || gf.properties!["photos"] == "") {
return const Image(image: AssetImage('assets/images/empty_image.png'));
} else {
@ -170,6 +170,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
(destination.cp == -1 || destination.cp == 0 ) &&
destinationController.rogainingCounted.value == false) {
// ゲームが始まってなければ
// ロゲ開始している && (開始地点から100m以内 又は 電波が弱い) && CP番号が 1 or 0 && rogainingCounted==false(どこにもチェックインしていない) なら
return Obx(() {
final isInRog = destinationController.isInRog.value;
@ -196,6 +197,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
// ダイアログをキャンセルした場合はボタンを再度有効化
destinationController.isInRog.value = false;
Get.back(); // Close the dialog
Get.back(); // Close the bottom sheet
},
),
TextButton(
@ -215,7 +217,8 @@ class BottomSheetNew extends GetView<BottomSheetController> {
saveGameState();
await ExternalService().startRogaining();
Get.back(); // Close the dialog and potentially navigate away
Get.back();
Get.back();// Close the dialog and potentially navigate away
},
),
],
@ -240,7 +243,11 @@ class BottomSheetNew extends GetView<BottomSheetController> {
(destination.cp == 0 || destination.cp == -2 || destination.cp == -1) &&
// (destination.cp == 0 || destination.cp == -2 ) &&
DestinationController.ready_for_goal == true) {
// ready_for_goal && (開始地点から500m以内 又は 電波が弱い) && CP番号が -1 or -2 or 0 && rogainingCounted==true なら
// Goal ボタン
//goal
return ElevatedButton(
style: ElevatedButton.styleFrom(backgroundColor: Colors.red),
onPressed: destinationController.rogainingCounted.value == true &&
@ -268,8 +275,10 @@ class BottomSheetNew extends GetView<BottomSheetController> {
"finish_rogaining".tr,
style: TextStyle(color: Colors.white),
));
} else if (distanceToDest <=
destinationController.getForcedChckinDistance(destination)) {
// cpごとの強制チェックイン以内にいれば
//start
return ElevatedButton(
style: ElevatedButton.styleFrom(
@ -281,6 +290,8 @@ class BottomSheetNew extends GetView<BottomSheetController> {
try{
destinationController.isCheckingIn.value = true; // ここを追加
Get.back();
Get.back();
await Future.delayed(Duration(milliseconds: 500));
await destinationController.callforCheckin(destination);
destinationController.isCheckingIn.value = false;
} catch (e) {
@ -296,62 +307,6 @@ class BottomSheetNew extends GetView<BottomSheetController> {
print('Error processing check-in: $e');
}
},
/*
// Check conditions to show confirmation dialog
if (destinationController.isInRog.value == false &&
(destinationController.distanceToStart() <= 500 || destinationController.isGpsSignalWeak() ) && //追加 Akira 2024-4-5
destination.cp == -1 &&
destinationController.rogainingCounted.value == false) {
print("counted ${destinationController.rogainingCounted.value}");
// Show confirmation dialog
Get.dialog(
AlertDialog(
title: const Text("確認"), //confirm
content: const Text(
"ロゲを開始すると、今までのロゲデータが全てクリアされます。本当に開始しますか?"), //are you sure
actions: <Widget>[
TextButton(
child: const Text("いいえ"), //no
onPressed: () {
Get.back(); // Close the dialog
},
),
TextButton(
child: const Text("はい"), //yes
onPressed: () async {
// Clear data and start game logic here
destinationController.isInRog.value = true;
destinationController.resetRogaining();
destinationController.addToRogaining(
destinationController.currentLat,
destinationController.currentLon,
destination.location_id!,
);
saveGameState();
await ExternalService().startRogaining();
Get.back(); // Close the dialog and potentially navigate away
},
),
],
),
barrierDismissible:
false, // User must tap a button to close the dialog
);
} else if (destinationController.isInRog.value == true &&
destination.cp != -1) {
//print("counted ${destinationController.rogainingCounted.value}");
// Existing logic for other conditions
Get.back();
await destinationController.callforCheckin(destination);
} else {
return;
}
},
*/
child: Text(
destination.cp == -1 &&
destinationController.isInRog.value == false &&
@ -418,23 +373,23 @@ class BottomSheetNew extends GetView<BottomSheetController> {
destinationController.currentLat, destinationController.currentLon),
LatLng(cdest.lat!, cdest.lon!));
LogManager().addLog("Distance from current point : $distanceToDest");
LogManager().addLog(
debugPrint("Distance from current point : $distanceToDest");
debugPrint(
"forced distance for point : ${destinationController.getForcedChckinDistance(destination)}");
LogManager().addLog(
debugPrint(
"current point : ${destinationController.currentLat}, ${destinationController.currentLon} - ${DateTime.now().hour}:${DateTime.now().minute}:${DateTime.now().second}:${DateTime.now().microsecond}");
LogManager().addLog("Checkin radius : ${destination.checkin_radious}");
LogManager().addLog("--${destination.cp}--");
debugPrint("Checkin radius : ${destination.checkin_radious}");
debugPrint("--${destination.cp}--");
return SingleChildScrollView(
child: Column(
children: [
Padding(
Padding( // 1行目
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
MaterialButton(
MaterialButton( // キャンセルボタン
onPressed: () {
Get.back();
},
@ -447,7 +402,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
size: 14,
),
),
Expanded(
Expanded( // チェックポイント番号+ポイント名
child: Container(
alignment: Alignment.centerLeft,
child: Obx(() => Text(
@ -462,7 +417,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
],
),
),
Row(
Row( // 2行目 チェックポイント写真
children: [
Expanded(
child: SizedBox(
@ -471,31 +426,37 @@ class BottomSheetNew extends GetView<BottomSheetController> {
)),
],
),
Obx(() => Padding(
Obx(() => Padding( // 3行め ボタン類
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Row(
Row( // 開始・ゴールボタン
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
// Finish or Goal
(destination.cp == -1 || destination.cp == 0)
(destination.cp == -1 || destination.cp == 0 || destination.cp == -2)
? getActionButton(context, destination)
: Container(),
: Container(), // 一般CPは空
],
),
Row(
Row( // 2列目 チェックインボタン
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
//checkin or remove checkin
destinationController.isInRog.value == true && destination.cp != 0 && destination.cp != -1 && destination.cp != -2
destinationController.isInRog.value == true
&& (distanceToDest <=
destinationController.getForcedChckinDistance(destination) || destination.checkin_radious==-1 )
&& destination.cp != 0 && destination.cp != -1 && destination.cp != -2
? (isAlreadyCheckedIn == false
? ElevatedButton(
? ElevatedButton( // まだチェックインしていなければ、チェックインボタンを表示
style: ElevatedButton.styleFrom(
backgroundColor: Colors.red),
onPressed: () async {
try {
Get.back();
await destinationController.callforCheckin(destination);
} catch (e) {
// エラーハンドリング
Get.snackbar(
@ -512,16 +473,14 @@ class BottomSheetNew extends GetView<BottomSheetController> {
child: Text(
"checkin".tr,
style: TextStyle(color: Colors.white),
))
: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.grey[300]),
)
)
: ElevatedButton( // チェックインしていれば、チェックイン取消ボタン
style: ElevatedButton.styleFrom(backgroundColor: Colors.grey[300]),
onPressed: () async {
try {
await destinationController
.removeCheckin(destination.cp!.toInt());
destinationController
.deleteDestination(destination);
await destinationController.removeCheckin(destination.cp!.toInt());
destinationController.deleteDestination(destination);
Get.back();
Get.snackbar(
'チェックイン取り消し',
@ -546,8 +505,9 @@ class BottomSheetNew extends GetView<BottomSheetController> {
child: Text(
"cancel_checkin".tr,
style: TextStyle(color: Colors.black),
)))
: Container(),
)
)
) : Container(), // 近くにいなければ空
// go here or cancel route
Obx(() => ElevatedButton(
style: ElevatedButton.styleFrom(
@ -557,6 +517,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
onPressed: () async {
if (destinationController.isRouteShowing.value) {
destinationController.clearRoute();
Get.back();
} else {
Get.back();
Position position =
@ -575,14 +536,16 @@ class BottomSheetNew extends GetView<BottomSheetController> {
.destinationMatrixFromCurrentPoint([ds, tp]);
}
},
child: Text(
child: Text( //ルート表示 or ルート消去
destinationController.isRouteShowing.value
? "cancel_route".tr
: "go_here".tr,
style: TextStyle(
color:
Theme.of(context).colorScheme.onPrimary),
))),
)
)
),
],
),
Row(

View File

@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 4.5.3+469
version: 4.8.0+480
environment:
sdk: ">=3.2.0 <4.0.0"