From 10ef74e90cb5fc66e32db0b20f2e81a711886c1f Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 14 七月 2020 16:53:51 +0800
Subject: [PATCH] 2020-07-14-1
---
Shared.IOS/BaseApplicationDelegate.cs | 30 +++++++++++++++++-------------
1 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/Shared.IOS/BaseApplicationDelegate.cs b/Shared.IOS/BaseApplicationDelegate.cs
index 8ae820b..904144b 100644
--- a/Shared.IOS/BaseApplicationDelegate.cs
+++ b/Shared.IOS/BaseApplicationDelegate.cs
@@ -21,11 +21,15 @@
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
registerForRemoteNotification(application);
- //var musicInfo = new MusicInfo { };
- //Volume.Init();
+
+ if (Shared.Application.IsMusicEnable)
+ {
+ var musicInfo = new MusicInfo { };
+ Volume.Init();
+ }
FinishedLaunchingAction?.Invoke(application, launchOptions);
- /*
+
//GPS
if (Shared.Application.IsGpsEnable)
{
@@ -53,7 +57,7 @@
///TODO 鍙互鎻愮ず鐢ㄦ埛鎵撳紑瀹氫綅鏉冮檺
}
}
- */
+
return true;
}
@@ -77,7 +81,7 @@
application.RegisterForRemoteNotificationTypes(UIRemoteNotificationType.NewsstandContentAvailability | UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound);
}
}
- /*
+
class MyCLLocationManager : CLLocationManager
{
public static MyCLLocationManager Instance
@@ -121,18 +125,18 @@
{
var location = e.Locations[e.Locations.Length - 1];
//adjustDistanceFilter(location);
- //System.Console.WriteLine($"浣嶇疆淇℃伅鍙樺寲 缁忓害{location.Coordinate.Longitude} 绾害{location.Coordinate.Latitude}");
+ //Shared.HDLUtils.WriteLine($"浣嶇疆淇℃伅鍙樺寲 缁忓害{location.Coordinate.Longitude} 绾害{location.Coordinate.Latitude}");
uploadToServer(location);
};
}
}
-
- //* 瑙勫垯: 濡傛灉閫熷害灏忎簬minSpeed m/s 鍒欐妸瑙﹀彂鑼冨洿璁惧畾涓�100m
- //* 鍚﹀垯灏嗚Е鍙戣寖鍥磋瀹氫负minSpeed*minInteval
- //* 姝ゆ椂鑻ラ�熷害鍙樺寲瓒呰繃10% 鍒欐洿鏂板綋鍓嶇殑瑙﹀彂鑼冨洿(杩欓噷闄愬埗鏄洜涓轰笉鑳戒笉鍋滅殑璁剧疆distanceFilter,
- //* 鍚﹀垯uploadLocation浼氫笉鍋滆瑙﹀彂)
-
+ /**
+ * 瑙勫垯: 濡傛灉閫熷害灏忎簬minSpeed m/s 鍒欐妸瑙﹀彂鑼冨洿璁惧畾涓�100m
+ * 鍚﹀垯灏嗚Е鍙戣寖鍥磋瀹氫负minSpeed*minInteval
+ * 姝ゆ椂鑻ラ�熷害鍙樺寲瓒呰繃10% 鍒欐洿鏂板綋鍓嶇殑瑙﹀彂鑼冨洿(杩欓噷闄愬埗鏄洜涓轰笉鑳戒笉鍋滅殑璁剧疆distanceFilter,
+ * 鍚﹀垯uploadLocation浼氫笉鍋滆瑙﹀彂)
+*/
void adjustDistanceFilter(CLLocation location)
{
// NSLog(@"adjust:%f",location.speed);
@@ -200,7 +204,7 @@
}
}
}
- */
+
public override void OnResignActivation(UIApplication application) => OnResignActivationAction?.Invoke(application);// Invoked when the application is about to move from active to inactive state.// This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) // or when the user quits the application and it begins the transition to the background state.// Games should use this method to pause the game.
public override void DidEnterBackground(UIApplication application) => DidEnterBackgroundAction?.Invoke(application);// Use this method to release shared resources, save user data, invalidate timers and store the application state.// If your application supports background exection this method is called instead of WillTerminate when the user quits.
--
Gitblit v1.8.0