示例#1
0
 /// <summary>
 /// Initializes the singleton application object.  This is the first line of authored code
 /// executed, and as such is the logical equivalent of main() or WinMain().
 /// </summary>
 public App()
 {
     this.InitializeComponent();
     this.Suspending += OnSuspending;
     Plugin.SecureStorage.WinSecureStorageBase.StoragePassword = "******";
     CrossPushNotification.Initialize <CrossPushNotificationListener>();
 }
示例#2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            AppProvider.Log          = new Conarh_2016.Android.Services.Log();
            AppProvider.IOManager    = new IOManager();
            AppProvider.PopUpFactory = new PopUpFactory();

            AppProvider.Screen      = new ScreenOptions();
            AppProvider.MediaPicker = new MediaPicker();

            AppProvider.ShareService  = new ShareServiceAndroid();
            AppProvider.ImageService  = new ImageServiceAndroid();
            AppProvider.ImageCache    = new ImageLoaderCache();
            AppProvider.LinkedinLogin = new LinkedinLogin();
            AppProvider.FastCellCache = FastCellCache.Instance;
            AppProvider.Initialize();

            Forms.Init(this, bundle);
            UserDialogs.Init(() => (Activity)Forms.Context);


            CrossPushNotification.Initialize <CrossPushNotificationListener>("241198731184");
            CrossPushNotification.Current.Register();

            StartPushService();

            LoadApplication(new App());

            ActionBar.SetIcon(new ColorDrawable(global::Android.Graphics.Color.Transparent));

            DbClient.Instance.Initialize(new SQLitePlatformAndroid());

            AppController.Instance.Start();
        }
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // enable Notification Fetch Service
            UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum);


            // TODO: set Values
            // set the application tag ID.
            // used for logging
            CrossPushNotification.NotificationTokenKey      = "TokenKey";
            CrossPushNotification.NotificationAppVersionKey = "VersionKey";
            CrossPushNotification.NotificationTagKey        = "AppTag";
            CrossPushNotification.Initialize <PushNotificationListener>();

            // TODO: change code to handle your notifications
            HandleNotification(options);

            // TODO: register for Notifications
            RegisterForNotifications();

            global::Xamarin.Forms.Forms.Init();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
示例#4
0
文件: AppDelegate.cs 项目: wsabor/AX
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var resolverContainer = new SimpleContainer();

            resolverContainer
            .Register <IDevice>(t => AppleDevice.CurrentDevice)
            .Register <IGeolocator>(t => new Geolocator());

            Resolver.SetResolver(resolverContainer.GetResolver());

            Xamarin.Forms.DependencyService.Register <Custom.AjusteImagem>();
            Xamarin.Forms.DependencyService.Register <Custom.Arquivo>();

            Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeModule());

            global::Xamarin.Forms.Forms.Init();
            Xamarin.FormsMaps.Init();
            ImageCircleRenderer.Init();

            FormsPlugin.Iconize.iOS.IconControls.Init();

            LoadApplication(new App());

            CrossPushNotification.Initialize <CrossPushNotificationListener>();

            UIApplication.SharedApplication.ApplicationIconBadgeNumber = 0;

            //LoadApplication(UXDivers.Gorilla.iOS.Player.CreateApplication(
            //    new UXDivers.Gorilla.Config("Gorilla on WelitonDesktop")));

            return(base.FinishedLaunching(app, options));
        }
示例#5
0
 private void InitGlobalLibraries()
 {
     CrossPushNotification.Initialize <CrossPushNotificationListener>();
     CrossPushNotification.Current.Register();
     CarouselViewRenderer.Init();
     CachedImageRenderer.Init();
 }
示例#6
0
        private void SetIoc()
        {
            var container = new Container();

            // Services
            container.RegisterSingleton <IDatabaseService, DatabaseService>();
            container.RegisterSingleton <ISqlService, SqlService>();
            container.RegisterSingleton <ISecureStorageService, SecureStorageService>();
            container.RegisterSingleton <ICryptoService, CryptoService>();
            container.RegisterSingleton <IKeyDerivationService, KeyDerivationService>();
            container.RegisterSingleton <IAuthService, AuthService>();
            container.RegisterSingleton <IFolderService, FolderService>();
            container.RegisterSingleton <ILoginService, LoginService>();
            container.RegisterSingleton <ISyncService, SyncService>();
            container.RegisterSingleton <IDeviceActionService, DeviceActionService>();
            container.RegisterSingleton <IAppIdService, AppIdService>();
            container.RegisterSingleton <IPasswordGenerationService, PasswordGenerationService>();
            container.RegisterSingleton <ILockService, LockService>();
            container.RegisterSingleton <IAppInfoService, AppInfoService>();
            container.RegisterSingleton <IGoogleAnalyticsService, GoogleAnalyticsService>();
            container.RegisterSingleton <IDeviceInfoService, DeviceInfoService>();
            container.RegisterSingleton <ILocalizeService, LocalizeService>();
            container.RegisterSingleton <ILogService, LogService>();
            container.RegisterSingleton <IHttpService, HttpService>();
            container.RegisterSingleton <ITokenService, TokenService>();
            container.RegisterSingleton <ISettingsService, SettingsService>();
            container.RegisterSingleton <IAppSettingsService, AppSettingsService>();
            container.RegisterSingleton <IReflectionService, ReflectionService>();

            // Repositories
            container.RegisterSingleton <IFolderRepository, FolderRepository>();
            container.RegisterSingleton <IFolderApiRepository, FolderApiRepository>();
            container.RegisterSingleton <ILoginRepository, LoginRepository>();
            container.RegisterSingleton <IAttachmentRepository, AttachmentRepository>();
            container.RegisterSingleton <IConnectApiRepository, ConnectApiRepository>();
            container.RegisterSingleton <IDeviceApiRepository, DeviceApiRepository>();
            container.RegisterSingleton <IAccountsApiRepository, AccountsApiRepository>();
            container.RegisterSingleton <ICipherApiRepository, CipherApiRepository>();
            container.RegisterSingleton <ISettingsRepository, SettingsRepository>();
            container.RegisterSingleton <ISettingsApiRepository, SettingsApiRepository>();
            container.RegisterSingleton <ITwoFactorApiRepository, TwoFactorApiRepository>();
            container.RegisterSingleton <ISyncApiRepository, SyncApiRepository>();

            // Other
            container.RegisterSingleton(CrossConnectivity.Current);
            container.RegisterSingleton(UserDialogs.Instance);
            container.RegisterSingleton(CrossFingerprint.Current);

            container.RegisterSingleton <ISettings>(Plugin.Settings.CrossSettings.Current);

            // Push
            var pushListener = new PushNotificationListener();

            container.RegisterSingleton <IPushNotificationListener>(pushListener);
            CrossPushNotification.Initialize(pushListener);
            container.RegisterSingleton(CrossPushNotification.Current);
            CachedImageRenderer.Init();

            Resolver.SetResolver(new SimpleInjectorResolver(container));
        }
示例#7
0
        public static void SetIoc(Application application)
        {
            UserDialogs.Init(application);

            var container = new UnityContainer();

            container
            // Android Stuff
            .RegisterInstance(application.ApplicationContext)
            .RegisterInstance <Application>(application)
            // Services
            .RegisterType <IDatabaseService, DatabaseService>(new ContainerControlledLifetimeManager())
            .RegisterType <ISqlService, SqlService>(new ContainerControlledLifetimeManager())
            .RegisterType <ISecureStorageService, KeyStoreStorageService>(new ContainerControlledLifetimeManager())
            .RegisterType <ICryptoService, CryptoService>(new ContainerControlledLifetimeManager())
            .RegisterType <IKeyDerivationService, BouncyCastleKeyDerivationService>(new ContainerControlledLifetimeManager())
            .RegisterType <IAuthService, AuthService>(new ContainerControlledLifetimeManager())
            .RegisterType <IFolderService, FolderService>(new ContainerControlledLifetimeManager())
            .RegisterType <ILoginService, LoginService>(new ContainerControlledLifetimeManager())
            .RegisterType <ISyncService, SyncService>(new ContainerControlledLifetimeManager())
            .RegisterType <IClipboardService, ClipboardService>(new ContainerControlledLifetimeManager())
            .RegisterType <IPushNotificationListener, PushNotificationListener>(new ContainerControlledLifetimeManager())
            .RegisterType <IAppIdService, AppIdService>(new ContainerControlledLifetimeManager())
            .RegisterType <IPasswordGenerationService, PasswordGenerationService>(new ContainerControlledLifetimeManager())
            .RegisterType <IReflectionService, ReflectionService>(new ContainerControlledLifetimeManager())
            .RegisterType <ILockService, LockService>(new ContainerControlledLifetimeManager())
            .RegisterType <IAppInfoService, AppInfoService>(new ContainerControlledLifetimeManager())
            .RegisterType <IGoogleAnalyticsService, GoogleAnalyticsService>(new ContainerControlledLifetimeManager())
            .RegisterType <IDeviceInfoService, DeviceInfoService>(new ContainerControlledLifetimeManager())
            .RegisterType <ILocalizeService, LocalizeService>(new ContainerControlledLifetimeManager())
            .RegisterType <ILogService, LogService>(new ContainerControlledLifetimeManager())
            .RegisterType <IHttpService, HttpService>(new ContainerControlledLifetimeManager())
            .RegisterType <ITokenService, TokenService>(new ContainerControlledLifetimeManager())
            .RegisterType <ISettingsService, SettingsService>(new ContainerControlledLifetimeManager())
            .RegisterType <IMemoryService, MemoryService>(new ContainerControlledLifetimeManager())
            // Repositories
            .RegisterType <IFolderRepository, FolderRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <IFolderApiRepository, FolderApiRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <ILoginRepository, LoginRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <ILoginApiRepository, LoginApiRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <IConnectApiRepository, ConnectApiRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <IDeviceApiRepository, DeviceApiRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <IAccountsApiRepository, AccountsApiRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <ICipherApiRepository, CipherApiRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <ISettingsRepository, SettingsRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <ISettingsApiRepository, SettingsApiRepository>(new ContainerControlledLifetimeManager())
            // Other
            .RegisterInstance(CrossSettings.Current, new ContainerControlledLifetimeManager())
            .RegisterInstance(CrossConnectivity.Current, new ContainerControlledLifetimeManager())
            .RegisterInstance(UserDialogs.Instance, new ContainerControlledLifetimeManager())
            .RegisterInstance(CrossFingerprint.Current, new ContainerControlledLifetimeManager());

            CrossPushNotification.Initialize(container.Resolve <IPushNotificationListener>(), "962181367620");
            container.RegisterInstance(CrossPushNotification.Current, new ContainerControlledLifetimeManager());
            CachedImageRenderer.Init();

            Resolver.SetResolver(new UnityResolver(container));
            CrossFingerprint.SetCurrentActivityResolver(() => CrossCurrentActivity.Current.Activity);
        }
示例#8
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            CrossPushNotification.Initialize <CrossPushNotificationListener>();
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
示例#9
0
 private void InitGlobalLibraries()
 {
     CoreSettings.AppIcon = Resource.Drawable.icon;
     CrossPushNotification.Initialize <CrossPushNotificationListener>(CoreSettings.Config.SocialMedia.GoogleSettings.GoogleAppId);
     //StartPushService();
     CrossPushNotification.Current.Register();
     CarouselViewRenderer.Init();
     CachedImageRenderer.Init(true);
 }
示例#10
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);

            CrossPushNotification.Initialize <CrossPushNotificationListener>(Keys.GOOGLE_APIs_ID);

            LoadApplication(new App());
        }
示例#11
0
        private void SetIoc()
        {
            var container = new UnityContainer();

            container
            // Services
            .RegisterType <IDatabaseService, DatabaseService>(new ContainerControlledLifetimeManager())
            .RegisterType <ISqlService, SqlService>(new ContainerControlledLifetimeManager())
            .RegisterType <ISecureStorageService, KeyChainStorageService>(new ContainerControlledLifetimeManager())
            .RegisterType <ICryptoService, CryptoService>(new ContainerControlledLifetimeManager())
            .RegisterType <IKeyDerivationService, CommonCryptoKeyDerivationService>(new ContainerControlledLifetimeManager())
            .RegisterType <IAuthService, AuthService>(new ContainerControlledLifetimeManager())
            .RegisterType <IFolderService, FolderService>(new ContainerControlledLifetimeManager())
            .RegisterType <ILoginService, LoginService>(new ContainerControlledLifetimeManager())
            .RegisterType <ISyncService, SyncService>(new ContainerControlledLifetimeManager())
            .RegisterType <IClipboardService, ClipboardService>(new ContainerControlledLifetimeManager())
            .RegisterType <IPushNotificationListener, PushNotificationListener>(new ContainerControlledLifetimeManager())
            .RegisterType <IAppIdService, AppIdService>(new ContainerControlledLifetimeManager())
            .RegisterType <IPasswordGenerationService, PasswordGenerationService>(new ContainerControlledLifetimeManager())
            .RegisterType <IReflectionService, ReflectionService>(new ContainerControlledLifetimeManager())
            .RegisterType <ILockService, LockService>(new ContainerControlledLifetimeManager())
            .RegisterType <IAppInfoService, AppInfoService>(new ContainerControlledLifetimeManager())
            .RegisterType <IGoogleAnalyticsService, GoogleAnalyticsService>(new ContainerControlledLifetimeManager())
            .RegisterType <IDeviceInfoService, DeviceInfoService>(new ContainerControlledLifetimeManager())
            .RegisterType <ILocalizeService, LocalizeService>(new ContainerControlledLifetimeManager())
            .RegisterType <ILogService, LogService>(new ContainerControlledLifetimeManager())
            .RegisterType <IHttpService, HttpService>(new ContainerControlledLifetimeManager())
            .RegisterType <ITokenService, TokenService>(new ContainerControlledLifetimeManager())
            .RegisterType <ISettingsService, SettingsService>(new ContainerControlledLifetimeManager())
            // Repositories
            .RegisterType <IFolderRepository, FolderRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <IFolderApiRepository, FolderApiRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <ILoginRepository, LoginRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <ILoginApiRepository, LoginApiRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <IConnectApiRepository, ConnectApiRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <IDeviceApiRepository, DeviceApiRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <IAccountsApiRepository, AccountsApiRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <ICipherApiRepository, CipherApiRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <ISettingsRepository, SettingsRepository>(new ContainerControlledLifetimeManager())
            .RegisterType <ISettingsApiRepository, SettingsApiRepository>(new ContainerControlledLifetimeManager())
            // Other
            .RegisterInstance(CrossConnectivity.Current, new ContainerControlledLifetimeManager())
            .RegisterInstance(UserDialogs.Instance, new ContainerControlledLifetimeManager())
            .RegisterInstance(CrossFingerprint.Current, new ContainerControlledLifetimeManager());

            Settings = new Settings("group.com.8bit.bitwarden");
            container.RegisterInstance(Settings, new ContainerControlledLifetimeManager());

            CrossPushNotification.Initialize(container.Resolve <IPushNotificationListener>());
            container.RegisterInstance(CrossPushNotification.Current, new ContainerControlledLifetimeManager());
            CachedImageRenderer.Init();

            Resolver.SetResolver(new UnityResolver(container));
        }
示例#12
0
 public override void OnCreate()
 {
     base.OnCreate();
     AppContext = this.ApplicationContext;
     CrossPushNotification.Initialize <CrossPushNotificationListener>("187239749720");
     if (CrossPushNotification.IsInitialized)
     {
     }
     //This service will keep your app receiving push even when closed.
     StartPushService();
 }
示例#13
0
 public override void OnCreate()
 {
     base.OnCreate();
     RegisterActivityLifecycleCallbacks(this);
     AppContext = this.ApplicationContext;
     //A great place to initialize Xamarin.Insights and Dependency Services!
     SecureStorageImplementation.StoragePassword = "******";
     UserDialogs.Init(this);
     CrossPushNotification.Initialize <CrossPushNotificationListener>("1486387770");
     StartPushService();
 }
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            CrossPushNotification.Initialize <CrossPushNotificationListener>(Constants.SENDER_ID);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
示例#15
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            CrossPushNotification.Initialize <CrossPushNotificationListener>("910326547168");

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());


            //CrossPushNotification.Current.Register();
        }
示例#16
0
        public override void OnCreate()
        {
            base.OnCreate();
            AppContext = this.ApplicationContext;
            CrossCurrentActivity.Current.Init(this);

            //RegisterActivityLifecycleCallbacks(this);
            CrossPushNotification.Initialize <CrossPushNotificationListener>("705545900899");
            CrossPushNotification.Current.Register();

            StartPushService();
        }
示例#17
0
        public override void OnCreate()
        {
            base.OnCreate();

            AppContext = this.ApplicationContext;
            CrossPushNotification.Initialize <CrossPushNotificationListener>("673256660703");
            StartPushService();


            RegisterActivityLifecycleCallbacks(this);
            //A great place to initialize Xamarin.Insights and Dependency Services!
        }
示例#18
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            KeyboardOverlapRenderer.Init();
            CrossPushNotification.Initialize <CrossPushNotificationListener>();
            StaticDataModel.isFromNotification = false;
            StaticDataModel.DeviceHeight       = (double)UIScreen.MainScreen.Bounds.Height;
            StaticDataModel.DeviceWidth        = (double)UIScreen.MainScreen.Bounds.Width;

            if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
            {
                var pushSettings = UIUserNotificationSettings.GetSettingsForTypes(
                    UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound,
                    new NSSet());

                UIApplication.SharedApplication.RegisterUserNotificationSettings(pushSettings);
                UIApplication.SharedApplication.ApplicationIconBadgeNumber = -1;
                UIApplication.SharedApplication.RegisterForRemoteNotifications();
            }
            else
            {
                UIRemoteNotificationType notificationTypes = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound;
                UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(notificationTypes);
            }
            ///Language selector page
            Login.dictionary2 = NSUserDefaults.StandardUserDefaults.DictionaryForKey(Login.key2);
            if (Login.dictionary2 == null)
            {
                var device = StaticMethods.DeviceType();
                if (device == "ipad")
                {
                    var Loginviewcontroller = GetViewController(Main_ArabicStoryboard, "LanguageSelectorIpad");
                    SetRootViewController(Loginviewcontroller, false);
                }
                else
                {
                    var Loginviewcontroller = GetViewController(Main_ArabicStoryboard, "LanguageSelector");
                    SetRootViewController(Loginviewcontroller, false);
                }
            }
            else
            {
                AutoLoginProcess(false);
            }

            StaticDataModel.DeviceId = UIKit.UIDevice.CurrentDevice.IdentifierForVendor.AsString();
            Console.WriteLine(StaticDataModel.DeviceId);
            //Changing current language
            //StaticMethods.ChangeLocalization("en");
            //StaticDataModel.CurrentLanguage = "en";

            return(true);
        }
示例#19
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Realtime.Messaging.IOS.WebsocketConnection.Link();

            CrossPushNotification.Initialize <Realtime.Messaging.CrossPushNotificationListener> ();

            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());



            return(base.FinishedLaunching(app, options));
        }
示例#20
0
        public override void OnCreate()
        {
            base.OnCreate();

            AppContext = this.ApplicationContext;

            //TODO: Initialize CrossPushNotification Plugin
            //TODO: Replace string parameter with your Android SENDER ID
            //TODO: Specify the listener class implementing IPushNotificationListener interface in the Initialize generic
            CrossPushNotification.Initialize <CrossPushNotificationListener>("994528331355");

            StartPushService();
        }
示例#21
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            CrossPushNotification.Initialize <CrossPushNotificationListener>();

            //per notifiche toast
            var settings = UIUserNotificationSettings.GetSettingsForTypes(UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, new NSSet());

            UIApplication.SharedApplication.RegisterUserNotificationSettings(settings);

            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
示例#22
0
        public override void OnCreate()
        {
            base.OnCreate();

            AppContext = this.ApplicationContext;

            //TODO: Initialize CrossPushNotification Plugin
            //TODO: Replace string parameter with your Android SENDER ID
            //TODO: Specify the listener class implementing IPushNotificationListener interface in the Initialize generic
            CrossPushNotification.Initialize <CrossPushNotificationListener>("934159595686");

            //This service will keep your app receiving push even when closed.
            StartPushService();
        }
示例#23
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            CrossPushNotification.Initialize <CrossPushNotificationListener>();

            //var manager = BITHockeyManager.SharedHockeyManager;
            //manager.Configure("0647a7cb6e174f408643bc4c1f145c81");
            //manager.StartManager();
            //manager.Authenticator.AuthenticateInstallation(); // This line is obsolete in crash only builds

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
示例#24
0
        public override void OnCreate()
        {
            base.OnCreate();

            Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeModule());

            AppContext = this.ApplicationContext;

            //TODO: Initialize CrossPushNotification Plugin
            //TODO: Replace string parameter with your Android SENDER ID
            //TODO: Specify the listener class implementing IPushNotificationListener interface in the Initialize generic
            CrossPushNotification.Initialize <CrossPushNotificationListener>("1038368474519");

            StartPushService();
        }
        public override void OnCreate()
        {
            base.OnCreate();
            AppContext = this.ApplicationContext;

            //RegisterActivityLifecycleCallbacks(this);

            AndroidPlaystoreAudit.Instance.UsesUntilPrompt = 20;
            AndroidPlaystoreAudit.Instance.TimeUntilPrompt = new TimeSpan(0, 10, 0);

            CrossPushNotification.Initialize <CrossPushNotificationListener>("705545900899");
            CrossPushNotification.Current.Register();

            StartPushService();
        }
示例#26
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);

            Insights.Initialize(Constants.INSIGHT_API_KEY);

            global::Xamarin.Forms.Forms.Init();
            CachedImageRenderer.Init();
            ImageCircleRenderer.Init();

//			UINavigationBar.Appearance.BarTintColor = UIColor.Red;
            CrossPushNotification.Initialize <CrossPushNotificationListener>();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
示例#27
0
        public override void OnCreate()
        {
            base.OnCreate();

            AppContext = this.ApplicationContext;

            CrossPushNotification.Initialize <CrossPushNotificationListener>(Constants.GcmSenderId);


            var container = TinyIoCContainer.Current;

            container.Register <IApiService, ApiService> (new ApiService(Constants.ApiUrl));
            container.Register <IPushNotification> (CrossPushNotification.Current);



            StartPushService();
        }
示例#28
0
        public override void OnCreate()
        {
            base.OnCreate();
            AppContext = this.ApplicationContext;

            CrossPushNotification.Initialize <CrossPushNotificationListener>("623924830057");
            CrossPushNotification.NotificationContentTitleKey = "title";
            CrossPushNotification.NotificationContentTextKey  = "text";
            CrossPushNotification.NotificationContentDataKey  = "info";
            CrossPushNotification.IconResource = Resource.Drawable.police;

            RegisterActivityLifecycleCallbacks(this);
            //A great place to initialize Xamarin.Insights and Dependency Services!

            //This service will keep your app receiving push even when closed.
            StartPushService();
            Foreground = true;
        }
示例#29
0
        public override void OnCreate()
        {
            base.OnCreate();
            RegisterActivityLifecycleCallbacks(this);
            //A great place to initialize Xamarin.Insights and Dependency Services!
            AppContext = this.ApplicationContext;

            //TODO: Initialize CrossPushNotification Plugin
            //TODO: Replace string parameter with your Android SENDER ID
            //TODO: Specify the listener class implementing IPushNotificationListener interface in the Initialize generic
            CrossPushNotification.Initialize <CrossPushNotificationListener>(Constants.ANDROID_PROJECT_ID);
            ContainerBuilder builder = new ContainerBuilder();

            builder.RegisterType <NotificationImplement>().As <INotification>().SingleInstance();

            CrossPushNotificationListener.Container = builder.Build();

            StartPushService();
        }
示例#30
0
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                this.DebugSettings.EnableFrameRateCounter = true;
            }
#endif

            Frame rootFrame = Window.Current.Content as Frame;

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                CrossPushNotification.Initialize <CrossPushNotificationListener>();

                Xamarin.Forms.Forms.Init(e);

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: Load state from previously suspended application
                }

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            if (rootFrame.Content == null)
            {
                // When the navigation stack isn't restored navigate to the first page,
                // configuring the new page by passing required information as a navigation
                // parameter
                rootFrame.Navigate(typeof(MainPage), e.Arguments);
            }
            // Ensure the current window is active
            Window.Current.Activate();
        }