| | |
| | | using Microsoft.AppCenter.Crashes; |
| | | using HDL_ON.UI; |
| | | using HDL_ON.DAL.Server; |
| | | using Intents; |
| | | using Other.Siri; |
| | | |
| | | namespace SharedMethod |
| | | { |
| | |
| | | // // If not required for your application you can safely delete this method |
| | | // return true; |
| | | //} |
| | | internal static UINavigationController rootViewController; |
| | | public static UINavigationController rootViewController; |
| | | |
| | | public static void CleanApplicationIconBadgeNumber() |
| | | { |
| | |
| | | |
| | | public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) |
| | | { |
| | | Console.WriteLine("111111111111"); |
| | | SetCurrentLanguage(); |
| | | //Shared.Application.FontSize = 12; |
| | | //Bugly.Bugly.StartWithAppId("b58fb35436"); |
| | |
| | | //{ |
| | | // //RemoteInfo.Current.ReadMsgList(true); |
| | | //} |
| | | //中文国内key、英文海外key |
| | | EZSDK.IOS.EZSDK.InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b"); |
| | | |
| | | //高德key |
| | | GDMapKit.setGDApiKey("f0635ea15c5d579c6e93d9f07a06da69"); |
| | | |
| | | Console.WriteLine("FinishedLaunching"); |
| | | return true; |
| | | } |
| | |
| | | var expandData = ""; |
| | | var messageType = ""; |
| | | var expantContent = ""; |
| | | var homeId = ""; |
| | | if (userInfo.ContainsKey(new NSString("expandData"))) |
| | | { |
| | | var expandDataStr = userInfo["expandData"] as NSString; |
| | |
| | | Utlis.WriteLine("expantContent: " + expantContent); |
| | | } |
| | | |
| | | if (expandDataNSD.ContainsKey(new NSString("homeId"))) |
| | | { |
| | | homeId = expandDataNSD["homeId"].ToString(); |
| | | Utlis.WriteLine("homeId: " + homeId); |
| | | } |
| | | |
| | | } |
| | | } |
| | | else |
| | |
| | | } |
| | | var pushMes = new JPushMessageInfo() |
| | | { |
| | | HomeId = homeId, |
| | | Title = title, |
| | | Content = body, |
| | | Extras = expandData, |
| | |
| | | HDL_ON.DriverLayer.Control.Ins.SearchLoaclGateway(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public override bool ContinueUserActivity(UIApplication application, NSUserActivity userActivity, UIApplicationRestorationHandler completionHandler) |
| | | { |
| | | var intent = userActivity.GetInteraction()?.Intent as HDLSceneSiri.HDLRunSceneIntent; |
| | | if (!(intent is null)) |
| | | { |
| | | HandleIntent(intent); |
| | | return true; |
| | | } |
| | | else if (userActivity.ActivityType == NSUserActivityHelper.ViewMenuActivityType) |
| | | { |
| | | HandleUserActivity(); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | void HandleIntent(HDLSceneSiri.HDLRunSceneIntent intent) |
| | | { |
| | | var handler = new SiriKit.HDLRunSceneIntentHandlder(); |
| | | handler.HandleRunScene(intent, (response) => { |
| | | if (response.Code != HDLSceneSiri.HDLRunSceneIntentResponseCode.Success) |
| | | { |
| | | Console.WriteLine("Siri执行失败。"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | void HandleUserActivity() |
| | | { |
| | | //var rootViewController = Window?.RootViewController as UINavigationController; |
| | | //var orderHistoryViewController = rootViewController?.ViewControllers?.FirstOrDefault() as OrderHistoryTableViewController; |
| | | //if (orderHistoryViewController is null) |
| | | //{ |
| | | // Console.WriteLine("Failed to access OrderHistoryTableViewController."); |
| | | // return; |
| | | //} |
| | | //var segue = OrderHistoryTableViewController.SegueIdentifiers.SoupMenu; |
| | | //orderHistoryViewController.PerformSegue(segue, null); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |