2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
20 using Tizen.Telephony;
22 namespace XamarinForTizen.Tizen
24 internal static class Globals
26 internal static string LogTag = "TelephonyTest";
27 internal static SlotHandle slotHandle = null;
29 public class App : Application
31 private static bool s_isTelephonySupported = false;
34 SystemInfo.TryGetValue("http://tizen.org/feature/network.telephony", out s_isTelephonySupported);
35 if (s_isTelephonySupported)
37 Log.Debug(Globals.LogTag, "Telephony feature check = " + s_isTelephonySupported);
38 MainPage = new NavigationPage(new MainPage());
43 Log.Debug(Globals.LogTag, "Telephony feature is not supported");
47 protected override void OnStart()
49 // Handle when your app starts
52 protected override void OnSleep()
54 // Handle when your app sleeps
57 protected override void OnResume()
59 // Handle when your app resumes
63 class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication
65 private static App _app;
66 protected override void OnCreate()
70 Log.Debug(Globals.LogTag, "OnCreate()");
72 LoadApplication(_app);
75 public static App getApp()
79 static void Main(string[] args)
81 var app = new Program();
82 global::Xamarin.Forms.Platform.Tizen.Forms.Init(app);