Example #1
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            //lo agrego para que funcione el googlemap:
            Xamarin.FormsMaps.Init(this, bundle);
            MobileBarcodeScanner.Initialize(Application);
            LoadApplication(new App());
        }
Example #2
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            /*Se inicializa Scanner*/
            MobileBarcodeScanner.Initialize(this.Application);

            LoadApplication(new AppGestionRIED.App());
        }
Example #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            ZXing.Net.Mobile.Forms.Android.Platform.Init();

            MobileBarcodeScanner.Initialize(Application);

            LoadApplication(new App());
        }
Example #4
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            MobileBarcodeScanner.Initialize(Application);
            //platform specific init
            ImageCircleRenderer.Init();
            LoadApplication(new App());
        }
Example #5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            //-->Inicializamos el scanner
            MobileBarcodeScanner.Initialize(this.Application);

            LoadApplication(new App());
        }
Example #6
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);

            MobileBarcodeScanner.Initialize(Application);
            scanner = new MobileBarcodeScanner();

            SetContentView(Resource.Layout.activity_main);

            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);

            this.btnPair   = FindViewById <Button>(Resource.Id.main_pair_button);
            btnPair.Click += async delegate  {
                btnPair.Background = this.Resources.GetDrawable(Resource.Drawable.gradient);
                btnPair.RefreshDrawableState();

                scanner.UseCustomOverlay = false;
                scanner.TopText          = this.Resources.GetString(Resource.String.pair_top_text);
                scanner.BottomText       = this.Resources.GetString(Resource.String.pair_bottom_text);

                var result = await scanner.Scan();

                this.HandlePairResult(result);
            };

            this.btnScan   = FindViewById <Button>(Resource.Id.main_scan_button);
            btnScan.Click += delegate {
                btnScan.Background = this.Resources.GetDrawable(Resource.Drawable.gradient);
                btnScan.RefreshDrawableState();

                scanner.UseCustomOverlay = false;
                scanner.TopText          = this.Resources.GetString(Resource.String.scan_top_text);
                scanner.BottomText       = this.Resources.GetString(Resource.String.scan_bottom_text);

                var opt = new MobileBarcodeScanningOptions()
                {
                    DelayBetweenContinuousScans = 1000,
                    AutoRotate = false
                };
                scanner.ScanContinuously(opt, HandleScanResult);
            };
            this.chkSound = FindViewById <CheckBox>(Resource.Id.main_sound_checkbox);
            this.chkSound.CheckedChange += delegate
            {
                this.skbVolume.Enabled = this.chkSound.Checked;
            };

            this.skbVolume = FindViewById <SeekBar>(Resource.Id.main_volume_seekbar);
        }
Example #7
0
        async void scanClicked(object sender, EventArgs e)
        {
			
            //MobileBarcodeScanner.Initialize(Application);
            //await DisplayAlert("notice", "start scan carcode", "yes");

#if __ANDROID__
    // Initialize the scanner first so it can track the current context
            MobileBarcodeScanner.Initialize (Application);
#endif
            // Initialize the scanner first so it can track the current context
            //if (Device.RuntimePlatform == Device.Android)
            //        {
            //ZXing.Mobile.MobileBarcodeScanner.Initialize(Application);
            //}
            var scanPage = new ZXingScannerPage();
            //string results="";
            scanPage.Title = "Please Scan barcode";
            scanPage.OnScanResult += (result) => {
                // stop scanning
                scanPage.IsScanning = false;

                // show scan result
                Device.BeginInvokeOnMainThread(() => {
                    App.barcode = result.Text;
                    //DisplayAlert("Scanned Barcode", result.Text, "OK");
                    //DisplayAlert("Scanned Barcode from APP", App.barcode, "OK");
                    Navigation.PopAsync();

                });
            };

            // go to scan page
            await Navigation.PushAsync(scanPage);

            Device.StartTimer(new TimeSpan(0, 0, 1), () =>
            {
                if (App.barcode == null)
                    return true;
                else
                {
                    var result = App.barcode;
                    bar.Text = result;
					SearchBarcodeAsync();
                    return false;
                }
            });
            
         

        }
Example #8
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Profil);
            MobileBarcodeScanner.Initialize(Application);

            var menuProfil        = FindViewById <ImageView>(Resource.Id.imageViewProfilProfil);
            var menuHistorique    = FindViewById <ImageView>(Resource.Id.imageViewProfilHistorique);
            var menuScanner       = FindViewById <ImageView>(Resource.Id.imageViewProfilScann);
            var menuConseil       = FindViewById <ImageView>(Resource.Id.imageViewProfilConseil);
            var menuAvertissement = FindViewById <ImageView>(Resource.Id.imageViewProfilAvertissement);


            menuProfil.Click += delegate
            {
                StartActivity(typeof(Profil));
            };
            menuHistorique.Click += delegate
            {
                StartActivity(typeof(Historique));
            };

            menuConseil.Click += delegate
            {
                StartActivity(typeof(Conseil));
            };

            //Clik sur le bouton scanner
            menuScanner.Click += async(sender, e) =>
            {
                var scanner = new ZXing.Mobile.MobileBarcodeScanner();
                var result  = await scanner.Scan();

                if (result != null)
                {
                    //Intent garde la variable ID Produit et la transmet à l'activité Produit
                    Intent produit = new Intent(this, typeof(Produit));
                    produit.PutExtra("IDproduit", result.Text);
                    StartActivity(produit);
                }
                else
                {
                }
            };

            menuAvertissement.Click += delegate
            {
                StartActivity(typeof(Avertissement));
            };
        }
Example #9
0
        private void FindViews()
        {
            #region FindViewsById
            lblGeolocalizacao = FindViewById <TextView>(Resource.Id.lblGeolocalizacao);
            txtCodigoNF       = FindViewById <EditText>(Resource.Id.txtCodigoNF);
            spinnerOcorrencia = FindViewById <Spinner>(Resource.Id.spinnerOcorrencia);
            spinnerOcorrencia.ItemSelected += new EventHandler <AdapterView.ItemSelectedEventArgs>(SpinnerOcorrencia_ItemSelected);
            txtDataEntrega         = FindViewById <TextView>(Resource.Id.txtDataEntrega);
            txtHoraEntrega         = FindViewById <TextView>(Resource.Id.txtHoraEntrega);
            txtObservacao          = FindViewById <EditText>(Resource.Id.txtObservacao);
            lblObservacao          = FindViewById <TextView>(Resource.Id.lblObservacao);
            lblCNPJ                = FindViewById <TextView>(Resource.Id.lblCNPJ);
            lblNumeroNF            = FindViewById <TextView>(Resource.Id.lblNumeroNF);
            btnAnexarImagem        = FindViewById <Button>(Resource.Id.btnAnexarImagem);
            btnSalvar              = FindViewById <Button>(Resource.Id.btnSalvar);
            btnEscanearNF          = FindViewById <Button>(Resource.Id.btnEscanearNF);
            btnEnviar              = FindViewById <Button>(Resource.Id.btnEnviar);
            btnEnviarViaEmail      = FindViewById <Button>(Resource.Id.btnEnviarViaEmail);
            imageView              = FindViewById <ImageView>(Resource.Id.imageView);
            lblStatus              = FindViewById <TextView>(Resource.Id.lblStatus);
            txtStatus              = FindViewById <TextView>(Resource.Id.txtStatus);
            checkBoxGeolocalizacao = FindViewById <CheckBox>(Resource.Id.checkBoxGeolocalizacao);
            txtGeolocalizacao      = FindViewById <EditText>(Resource.Id.txtGeolocalizacao);
            #endregion FindViewsById

            lblGeolocalizacao.Visibility = ViewStates.Gone;

            if (operacao == "selecionado")
            {
                spinnerOcorrencia.Enabled = false;
                txtObservacao.Focusable   = false;
                txtCodigoNF.Focusable     = false;

                btnEscanearNF.Visibility          = ViewStates.Gone;
                btnAnexarImagem.Visibility        = ViewStates.Gone;
                btnEnviar.Visibility              = ViewStates.Gone;
                btnSalvar.Visibility              = ViewStates.Gone;
                checkBoxGeolocalizacao.Visibility = ViewStates.Gone;
            }


            imageView = FindViewById <ImageView>(Resource.Id.imageView);

            MobileBarcodeScanner.Initialize(Application);
            scanner = new MobileBarcodeScanner();

            toolbar                = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            this.Title             = "Informar Ocorrência";
            toolbar.MenuItemClick += Toolbar_MenuItemClick;
        }
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

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

            ZXing.Net.Mobile.Forms.Android.Platform.Init();
            MobileBarcodeScanner.Initialize(Application);

            LoadApplication(new App(new ComponentProvider()));
        }
Example #11
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            CrossCurrentActivity.Current.Init(this, bundle);
            CustomizeTabs();
            AsNumAssemblyHelper.HoldAssembly();
            MobileBarcodeScanner.Initialize(this.Application);

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

            var set = this.CreateBindingSet <GameActivity, GameStepNavigationViewModel>();

            set.Bind(this)
            .For(view => view.DialogInteraction)
            .To(viewModel => viewModel.DialogInteraction).OneTime();
            set.Apply();

            MobileBarcodeScanner.Initialize(Application);
            SetContentView(Resource.Layout.activity_game);
        }
Example #13
0
        protected override void OnCreate(Bundle bundle)
        {
            //TabLayoutResource = Resource.Layout.Tabbar;
            //ToolbarResource = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            MobileBarcodeScanner.Initialize(this.Application);
            global::ZXing.Net.Mobile.Forms.Android.Platform.Init();
            LoadApplication(new App());

            Initializer.Initialize();
        }
Example #14
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.qrcode_layout);
            MobileBarcodeScanner.Initialize(Application);
            _result = FindViewById <TextView>(Resource.Id.textResult);
            var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);

            _scan_button = FindViewById <Button>(Resource.Id.scan);

            SetActionBar(toolbar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetHomeButtonEnabled(true);
        }
Example #15
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            DependencyService.Register <QrScanningService>();
            MobileBarcodeScanner.Initialize(Application);
            ImageCarouselRenderer.Init();

            base.OnCreate(savedInstanceState);
            global::Xamarin.Forms.Forms.SetFlags("Shell_Experimental", "Visual_Experimental", "CollectionView_Experimental");
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());
        }
Example #16
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Platform.Init(this, savedInstanceState);
            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.activity_main);


            //Mostrar el toolbar
            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar_main);
            SetSupportActionBar(toolbar);

            //Iniciar el boton agregar items
            btnAdd        = this.FindViewById <Button>(Resource.Id.btnAdd);
            btnAdd.Click += BtnAdd_Click;

            //Mostrar el panel deslizante
            drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            toggle = new ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open,
                                               Resource.String.navigation_drawer_close);
            drawer.AddDrawerListener(toggle);
            toggle.SyncState();//Mostrar el menu hamburguesa

            //Mostrar items en el panel de navegacion
            navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);
            navigationView.SetNavigationItemSelectedListener(this);

            //Crear una nueva instancia de nuestro Scanner
            MobileBarcodeScanner.Initialize(Application);
            fabScanDefaultView        = FindViewById <FloatingActionButton>(Resource.Id.fabAdd);
            fabScanDefaultView.Click += async delegate
            {
                scanner = new MobileBarcodeScanner();

                //Decir a nuestro Scanner que use la superposicion predeterminada
                scanner.UseCustomOverlay = false;

                //Podemos especificar el texto superior e inferior de nuestra disposicion predeterminada
                scanner.TopText    = "Presiones para enfocar la imagen en el codio de barras";
                scanner.BottomText = "Espere a que se realice la operación automáticamente";

                //Empezar a escanear
                var result = await scanner.Scan();

                HandleScanResult(result);
            };

            //Iniciar la decoracion
            IinitRecylcerView();
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            MobileBarcodeScanner.Initialize(Application);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);

            RootView = FindViewById(Android.Resource.Id.Content);

            AskPermissions();
        }
Example #18
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.activity_main);

            btnClick   = FindViewById <Button>(Resource.Id.btnScan);
            txtBarcode = FindViewById <TextView>(Resource.Id.txtBarcode);

            btnClick.Click += btnScan_Clicked;

            MobileBarcodeScanner.Initialize(Application);
        }
Example #19
0
        public async void ScanQRCode()
        {
            // Initialize the scanner first so it can track the current context
            MobileBarcodeScanner.Initialize(Application);

            var scanner = new ZXing.Mobile.MobileBarcodeScanner();

            var result = await scanner.Scan();

            if (result != null)
            {
                System.Diagnostics.Debug.WriteLine("Scanned Barcode: " + result.Text);
            }
        }
Example #20
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            TokenManager manager = new TokenManager();

            tableItems.AddRange(manager.LoadTokens());

            SetContentView(Resource.Layout.CustomList);

            listView = FindViewById <ListView>(Resource.Id.List);
            Button addButton = FindViewById <Button>(Resource.Id.buttonAddToken);


            var adpt = new ListAdapter(this, tableItems);

            listView.Adapter = adpt;

            listView.ItemClick     += OnListItemClick;
            listView.ItemLongClick += OnListItemLongClick;


            TimerCallback tmCallback = (obj =>
            {
                RunOnUiThread(() => adpt.Refresh());
            });

            Timer timer = new Timer(tmCallback, "refresh", 1000, 1000);


            addButton.Click += async(sender, e) =>
            {
                // Initialize the scanner first so it can track the current context
                MobileBarcodeScanner.Initialize(Application);

                var scanner = new MobileBarcodeScanner();

                var result = await scanner.Scan();

                // No results? No new token
                if (result == null)
                {
                    return;
                }

                var newToken = manager.TokenScanned(result.Text);

                tableItems.Add(newToken);
            };
        }
Example #21
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.QRView);
            FindViewById <TextView>(Resource.Id.QRresult).Text = "";

            MobileBarcodeScanner.Initialize(Application);

            buttonScan = FindViewById <Button>(Resource.Id.button1);

            buttonScan.Click += ButtonScan_Click;
        }
Example #22
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

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

            CrossMessaging.Current.Settings().Email.UseStrictMode = true;

            LoadApplication(new App());
        }
        public async Task <Result> ScanBarcode()
        {
            #if __ANDROID__
            // Initialize the scanner first so it can track the current context
            MobileBarcodeScanner.Initialize(Application);
            #endif

            var scanner = new ZXing.Mobile.MobileBarcodeScanner();

            var result = await scanner.Scan();

            //return result;
            return(new Result("Example dummy data", null, null, BarcodeFormat.QR_CODE));
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Window.SetFlags(WindowManagerFlags.Secure, WindowManagerFlags.Secure);
            SetContentView(Resource.Layout.activityMain);

            var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);
            SupportActionBar.SetTitle(Resource.String.categoryAll);

            _bottomAppBar = FindViewById <BottomAppBar>(Resource.Id.bottomAppBar);
            _bottomAppBar.NavigationClick += OnBottomAppBarNavigationClick;
            _bottomAppBar.MenuItemClick   += (sender, args) =>
            {
                toolbar.Menu.FindItem(Resource.Id.actionSearch).ExpandActionView();
                _authList.SmoothScrollToPosition(0);
            };

            _coordinatorLayout = FindViewById <CoordinatorLayout>(Resource.Id.coordinatorLayout);
            _progressBar       = FindViewById <ProgressBar>(Resource.Id.appBarProgressBar);

            _addButton        = FindViewById <FloatingActionButton>(Resource.Id.buttonAdd);
            _addButton.Click += OnAddButtonClick;

            _authList               = FindViewById <RecyclerView>(Resource.Id.list);
            _emptyStateLayout       = FindViewById <LinearLayout>(Resource.Id.layoutEmptyState);
            _emptyMessageText       = FindViewById <TextView>(Resource.Id.textEmptyMessage);
            _viewGuideButton        = FindViewById <MaterialButton>(Resource.Id.buttonViewGuide);
            _viewGuideButton.Click += (sender, args) =>
            {
                StartChildActivity(typeof(GuideActivity));
            };

            _isChildActivityOpen = false;
            _keyguardManager     = (KeyguardManager)GetSystemService(KeyguardService);

            MobileBarcodeScanner.Initialize(Application);
            _barcodeScanner = new MobileBarcodeScanner();

            DetectGoogleAPIsAvailability();

            var prefs       = PreferenceManager.GetDefaultSharedPreferences(this);
            var firstLaunch = prefs.GetBoolean("firstLaunch", true);

            if (firstLaunch)
            {
                StartChildActivity(typeof(IntroActivity));
            }
        }
Example #25
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.AddCopy);
            // Create your application here

            toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);
            SetActionBar(toolbar);
            ActionBar.SetDisplayHomeAsUpEnabled(true);
            ActionBar.SetHomeButtonEnabled(true);

            btnScan        = FindViewById <ImageButton>(Resource.Id.button1);
            btnCheck       = FindViewById <ImageButton>(Resource.Id.button2);
            btnSave        = FindViewById <Button>(Resource.Id.button3);
            edtISBN        = FindViewById <EditText>(Resource.Id.editText1);
            edtNumber      = FindViewById <EditText>(Resource.Id.editText2);
            edtTitulo      = FindViewById <EditText>(Resource.Id.editText3);
            btnSave.Click += BtnSave_Click;

            isbn         = Intent.GetStringExtra("libroId");
            edtISBN.Text = isbn;


#pragma warning disable CS0618 // El tipo o el miembro están obsoletos
            btnScan.SetBackgroundDrawable(null);
#pragma warning restore CS0618 // El tipo o el miembro están obsoletos
#pragma warning disable CS0618 // El tipo o el miembro están obsoletos
            btnCheck.SetBackgroundDrawable(null);
#pragma warning restore CS0618 // El tipo o el miembro están obsoletos

            btnCheck.Click += BtnCheck_Click;

            MobileBarcodeScanner.Initialize(Application);
            scanner = new MobileBarcodeScanner();

            btnScan.Click += async delegate {
                //Tell our scanner to use the default overlay
                scanner.UseCustomOverlay = false;

                //PERSONALIZAR LOS MENSAJES QUE SE MOSTRARAN EN LA CAMARA DEL SCANNER
                scanner.TopText    = "Por favor, no mueva el dispositivo móvil\nMantengalo al menos 10cm de distancia";
                scanner.BottomText = "Espere mientras el scanner lee el código de barra";

                //COMIENZO DEL SCANEO
                var result = await scanner.Scan();

                HandleScanResult(result);
            };
        }
Example #26
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);
            global::Xamarin.Forms.Forms.SetTitleBarVisibility(Xamarin.Forms.AndroidTitleBarVisibility.Never);
            global::Xamarin.Forms.Forms.Init(this, bundle);
            Xamarin.Forms.DependencyService.Register <CloseApplication>();
            global::ZXing.Net.Mobile.Forms.Android.Platform.Init();

            MobileBarcodeScanner.Initialize(Application);

            LoadApplication(new App());
        }
Example #27
0
        protected override void OnCreate(Bundle bundle)
        {
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            TaskScheduler.UnobservedTaskException      += TaskScheduler_UnobservedTaskException;

            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            global::ZXing.Net.Mobile.Forms.Android.Platform.Init();
            MobileBarcodeScanner.Initialize(Application);
            LoadApplication(new App(new AndroidGlobalSetup(), new PresentationFactory(ApplicationContext, new Permissions(this))));
        }
Example #28
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;
            base.OnCreate(bundle);
            //UserDialogs.Init(this);
            UserDialogs.Init(() => (Activity)this);
            Forms.SetFlags("FastRenderers_Experimental");
            ZXing.Net.Mobile.Forms.Android.Platform.Init();
            MobileBarcodeScanner.Initialize(Application);


            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
Example #29
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);
            CrossCurrentActivity.Current.Init(this, savedInstanceState);
            ZXing.Net.Mobile.Forms.Android.Platform.Init();
            MobileBarcodeScanner.Initialize(Application);
            Xamarin.FormsMaps.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            FirebasePushNotificationManager.ProcessIntent(this, Intent);

            LoadApplication(new App());
        }
Example #30
0
        private void LaunchScanner(object sender, EventArgs e)
        {
            MobileBarcodeScanner.Initialize(Application);
            _scanner = new MobileBarcodeScanner
            {
                FlashButtonText = "Flash",
                TopText         = "Hold camera up to barcode to scan",
                BottomText      = "Barcode will automatically scan"
            };

            _option = new MobileBarcodeScanningOptions {
                DelayBetweenContinuousScans = 1000
            };
            _scanner.ScanContinuously(_option, HandleScanResult);
        }