protected override void OnCreate(Bundle bundle) { FormsAppCompatActivity.ToolbarResource = Resource.Layout.toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); Xamarin.FormsMaps.Init(this, bundle); CrossPayPalManager.Init(new PayPalConfiguration(PayPalEnvironment.NoNetwork, KeyConstants.PayPalEnvironmentId) { AcceptCreditCards = true, //Your business name MerchantName = "Project Helin Store", //Your privacy policy Url MerchantPrivacyPolicyUri = "https://www.example.com/privacy", //Your user agreement Url MerchantUserAgreementUri = "https://www.example.com/legal" } ); Websockets.Droid.WebsocketConnection.Link(); // for Toast messages // see https://github.com/aritchie/userdialogs UserDialogs.Init(this); LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); //Llamada a paypal CrossPayPalManager.Init( //new PayPalConfiguration(PayPalEnvironment.Sandbox, "ARIzxJa3tOHO9mLo7FB3YTp3n4Q28zh1kiMPDFie9lmMIvPWk5gN-ardzfJcpPzJ0NHpi2UWBZT6GbuV") //new PayPalConfiguration(PayPalEnvironment.Production, "AZ4CjEeIYvI55U8oiRyPbfaCXXzijjtRskzgf5PGYxnTr62cbocIvncFUATGBXRhfkUXzaubXSEQ2nd5") antunez produccion new PayPalConfiguration(PayPalEnvironment.Production, "AaTHcSUCOzUWTn__0okD1xm3yuGUZyg6TeRY5FXPRVUwn8g14SL75xsEBgfaUYHbpD7OGy4GBteIvpxJ") //andrades produccion { StoreUserData = false, AcceptCreditCards = true, MerchantName = "Test Store", MerchantPrivacyPolicyUri = "https://www.example.com/privacy", MerchantUserAgreementUri = "https://www.example.com/legal", ShippingAddressOption = ShippingAddressOption.Provided, //Direccion que provee el usuario //ShippingAddressOption = ShippingAddressOption.PayPal, Language = "es", PhoneCountryCode = "52" }, this ); LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); UserDialogs.Init(() => (Activity)Forms.Context); global::Xamarin.Forms.Forms.Init(this, bundle); //global::ZXing.Net.Mobile.Forms.Android.Platform.Init(); CrossPayPalManager.Init( new PayPalConfiguration( PayPalEnvironment.NoNetwork, "this_is_your_paypal_key" ) { AcceptCreditCards = true, MerchantName = "PSM2017v2", MerchantPrivacyPolicyUri = "https://www.example.com/privacy", MerchantUserAgreementUri = "https://www.example.com/legal" } ); LoadApplication(new PSM2017v2.App()); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); var config = new PayPalConfiguration(PayPalEnvironment.Sandbox, "AUSqNHjhcdaugdDElFFQHr0GxqWLPgKnfb_TZ-sQhVrS3OaPdOkdax6Pbs22QQKugw3eZtmpSJEgd3yE") { //If you want to accept credit cards AcceptCreditCards = true, //Your business name MerchantName = "BidOnTask.com", //Your privacy policy Url MerchantPrivacyPolicyUri = "https://www.example.com/privacy", //Your user agreement Url MerchantUserAgreementUri = "https://www.example.com/legal", // OPTIONAL - ShippingAddressOption (Both, None, PayPal, Provided) ShippingAddressOption = ShippingAddressOption.None, // OPTIONAL - Language: Default languege for PayPal Plug-In Language = "en", // OPTIONAL - PhoneCountryCode: Default phone country code for PayPal Plug-In PhoneCountryCode = "1", }; Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, bundle); CrossPayPalManager.Init(config, this); Xamarin.FormsMaps.Init(this, bundle); LoadApplication(new App(new AndroidInitializer())); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; initFontScale(); base.OnCreate(savedInstanceState); ///For Performance Forms.SetFlags("FastRenderers_Experimental"); AndroidEnvironment.UnhandledExceptionRaiser -= StoreLogger; AndroidEnvironment.UnhandledExceptionRaiser += StoreLogger; global::Xamarin.Forms.Forms.Init(this, savedInstanceState); var config = new PayPalConfiguration(PayPalEnvironment.NoNetwork, "XamPaypalID") { AcceptCreditCards = true, MerchantName = "XamPaypal", MerchantPrivacyPolicyUri = "https://www.XamPaypal.com/privacy", MerchantUserAgreementUri = "https://www.XamPaypal.com/legal", ShippingAddressOption = ShippingAddressOption.Both, Language = "es", PhoneCountryCode = "52", }; CrossPayPalManager.Init(config, this); LoadApplication(new App(new AndroidInitializer())); }
// // 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(); CrossPayPalManager.Init(new PayPalConfiguration( PayPalEnvironment.NoNetwork, "Your PayPal ID from https://developer.paypal.com/developer/applications/" ) { //If you want to accept credit cards AcceptCreditCards = true, //Your business name MerchantName = "Test Store", //Your privacy policy Url MerchantPrivacyPolicyUri = "https://www.example.com/privacy", //Your user agreement Url MerchantUserAgreementUri = "https://www.example.com/legal", // OPTIONAL - ShippingAddressOption (Both, None, PayPal, Provided) ShippingAddressOption = ShippingAddressOption.Both, // OPTIONAL - Language: Default languege for PayPal Plug-In Language = "es", // OPTIONAL - PhoneCountryCode: Default phone country code for PayPal Plug-In PhoneCountryCode = "52", } ); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { //adding Iconize package Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeModule()); //end Iconize global::Xamarin.Forms.Forms.Init(); CrossPayPalManager.Init(new PayPalConfiguration( PayPal.Forms.Abstractions.Enum.PayPalEnvironment.NoNetwork, "AbpLXvsoTb4Qrd1qQbGl6QsllrYC - QSumRWB3rlM6nbBtx01ngomIDdiyF94lZaz47lVsY7Mt5MveM20" ) { //If you want to accept credit cards AcceptCreditCards = true, //Your business name MerchantName = "Test Store", //Your privacy policy Url MerchantPrivacyPolicyUri = "https://www.example.com/privacy", //Your user agreement Url MerchantUserAgreementUri = "https://www.example.com/legal", // OPTIONAL - ShippingAddressOption (Both, None, PayPal, Provided) ShippingAddressOption = ShippingAddressOption.Both, // OPTIONAL - Language: Default languege for PayPal Plug-In Language = "es", // OPTIONAL - PhoneCountryCode: Default phone country code for PayPal Plug-In PhoneCountryCode = "52", } ); FormsPlugin.Iconize.iOS.IconControls.Init(); // Code for starting up the Xamarin Test Cloud Agent #if ENABLE_TEST_CLOUD Xamarin.Calabash.Start(); #endif LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { NSDictionary dictionary = NSDictionary.FromObjectAndKey(NSObject.FromObject(userAgent), NSObject.FromObject("UserAgent")); NSUserDefaults.StandardUserDefaults.RegisterDefaults(dictionary); PlacesClient.ProvideApiKey("AIzaSyC0m0Td_wjHRWlS9uCOyFpZ_0kt6JYPRl8"); MapServices.ProvideAPIKey("AIzaSyC0m0Td_wjHRWlS9uCOyFpZ_0kt6JYPRl8"); global::Xamarin.Forms.Forms.Init(); CarouselViewRenderer.Init(); MobileAds.Configure("ca-app-pub-8565023384951297/2042844969"); FormsMaps.Init(); //Paypal initialization CrossPayPalManager.Init(new PayPalConfiguration( PayPalEnvironment.Sandbox, "APP-80W284485P519543T" ) { AcceptCreditCards = true, Language = "en_US", ShippingAddressOption = ShippingAddressOption.None } ); ImageCircleRenderer.Init(); FFImageLoading.Forms.Touch.CachedImageRenderer.Init(); PrepareRemoteNotification(); App.ScreenHeight = (double)UIScreen.MainScreen.Bounds.Height; App.ScreenWidth = (double)UIScreen.MainScreen.Bounds.Width; Xamarin.Auth.Presenters.OAuthLoginPresenter.PlatformLogin = (authenticator) => { var oAuthLogin = new OAuthLoginPresenter(); oAuthLogin.Login(authenticator); }; MessagingCenter.Subscribe <ImageSource>(this, "Share", IosMethods.Share, null); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); CrossPayPalManager.Init( new PayPalConfiguration(PayPalEnvironment.NoNetwork, "YOUR ID STRING") { AcceptCreditCards = true, MerchantName = "Test Store", MerchantPrivacyPolicyUri = "https://www.example.com/privacy", MerchantUserAgreementUri = "https://www.example.com/legal" }, this ); LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); //adding iconize package Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeModule()); global::Xamarin.Forms.Forms.Init(this, bundle); IconControls.Init(Resource.Id.toolbar, Resource.Id.sliding_tabs); ToolbarResource = Resource.Layout.toolbar; TabLayoutResource = Resource.Layout.tabs; #region paypal-conf CrossPayPalManager.Init(new PayPalConfiguration( PayPal.Forms.Abstractions.Enum.PayPalEnvironment.NoNetwork, "AbpLXvsoTb4Qrd1qQbGl6QsllrYC - QSumRWB3rlM6nbBtx01ngomIDdiyF94lZaz47lVsY7Mt5MveM20" ) { //If you want to accept credit cards AcceptCreditCards = true, //Your business name MerchantName = "Test Store", //Your privacy policy Url MerchantPrivacyPolicyUri = "https://www.example.com/privacy", //Your user agreement Url MerchantUserAgreementUri = "https://www.example.com/legal", // OPTIONAL - ShippingAddressOption (Both, None, PayPal, Provided) ShippingAddressOption = ShippingAddressOption.Both, // OPTIONAL - Language: Default languege for PayPal Plug-In Language = "es", // OPTIONAL - PhoneCountryCode: Default phone country code for PayPal Plug-In PhoneCountryCode = "52", } ); #endregion LoadApplication(new App()); }
//Image image1; //internal static MainActivity Instance { get; private set; } protected override void OnCreate(Bundle savedInstanceState) { //Instance = this; base.Window.RequestFeature(WindowFeatures.ActionBar); // Name of the MainActivity theme you had there before. // Or you can use global::Android.Resource.Style.ThemeHoloLight base.SetTheme(Resource.Style.MainTheme); TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; App.ScreenHeight = (int)(Resources.DisplayMetrics.HeightPixels / Resources.DisplayMetrics.Density); App.ScreenWidth = (int)(Resources.DisplayMetrics.WidthPixels / Resources.DisplayMetrics.Density); CrossCurrentActivity.Current.Init(this, savedInstanceState); ImageCarouselRenderer.Init(); base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); var config = new PayPalConfiguration(PayPalEnvironment.NoNetwork, "*****@*****.**") { //If you want to accept credit cards AcceptCreditCards = false, //Your business name MerchantName = "Olive", //Your privacy policy Url MerchantPrivacyPolicyUri = "https://www.example.com/privacy", //Your user agreement Url MerchantUserAgreementUri = "https://www.example.com/legal", // OPTIONAL - ShippingAddressOption (Both, None, PayPal, Provided) ShippingAddressOption = ShippingAddressOption.Both, // OPTIONAL - Language: Default languege for PayPal Plug-In Language = "gb", // OPTIONAL - PhoneCountryCode: Default phone country code for PayPal Plug-In PhoneCountryCode = "+44", }; CrossPayPalManager.Init(config, this); LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); //paypal produccion AQrrFs8D-iSCYiAEEmO9ni3CcQ7GjgjPqSBBVhxNTmRKOnLR_Ol_qRcy2Pr4yxhwcQ2BK1BoZbzl0Hka //paypal sandbox AVART2W6j2cnNhmWej6EcQjx_ytsVpl1hmnArzHtVWSsZFRVAWOlZq6y3EjPFM0FHUhG_yrvkftXAAtN var config = new PayPalConfiguration(PayPalEnvironment.Production, "AQrrFs8D-iSCYiAEEmO9ni3CcQ7GjgjPqSBBVhxNTmRKOnLR_Ol_qRcy2Pr4yxhwcQ2BK1BoZbzl0Hka") //var config = new PayPalConfiguration(PayPalEnvironment.Sandbox, "AVART2W6j2cnNhmWej6EcQjx_ytsVpl1hmnArzHtVWSsZFRVAWOlZq6y3EjPFM0FHUhG_yrvkftXAAtN") { //If you want to accept credit cards AcceptCreditCards = false, //Your business name MerchantName = "Tienda", //Your privacy policy Url MerchantPrivacyPolicyUri = "http://tratoespecial.com/politicas-de-privacidad/", //Your user agreement Url MerchantUserAgreementUri = "http://tratoespecial.com/terminos-y-condiciones/", // OPTIONAL - ShippingAddressOption (Both, None, PayPal, Provided) ShippingAddressOption = ShippingAddressOption.Both, // OPTIONAL - Language: Default languege for PayPal Plug-In Language = "es", // OPTIONAL - PhoneCountryCode: Default phone country code for PayPal Plug-In PhoneCountryCode = "52", }; CrossPayPalManager.Init(config, this); Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, bundle);//para pedir los permisos cross plat global::ZXing.Net.Mobile.Forms.Android.Platform.Init(); LoadApplication(new App()); CheckForGoogleServices(); //FirebaseApp.InitializeApp(this.ApplicationContext); //Java.Lang.IllegalStateException: Default FirebaseApp //is not initialized in this process com.alsain.trato4. //Make sure to call FirebaseApp.initializeApp(Context) first. //App.Fn_SetToken(FirebaseInstanceId.Instance.Token); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); CrossPayPalManager.Init( new PayPalConfiguration(PayPalEnvironment.NoNetwork, "YOUR ID STRING") { StoreUserData = false, AcceptCreditCards = true, MerchantName = "Test Store", MerchantPrivacyPolicyUri = "https://www.example.com/privacy", MerchantUserAgreementUri = "https://www.example.com/legal", ShippingAddressOption = ShippingAddressOption.Provided } ); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
// // 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.za // // 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(); global::Xamarin.Forms.FormsMaterial.Init(); var config = new PayPalConfiguration(PayPalEnvironment.NoNetwork, "XamPaypalID") { AcceptCreditCards = true, MerchantName = "XamPaypal", MerchantPrivacyPolicyUri = "https://www.XamPaypal.com/privacy", MerchantUserAgreementUri = "https://www.XamPaypal.com/legal", ShippingAddressOption = ShippingAddressOption.Both, Language = "es", PhoneCountryCode = "52", }; CrossPayPalManager.Init(config); LoadApplication(new App(new iOSInitializer())); return(base.FinishedLaunching(app, options)); }
// // 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(); CrossPayPalManager.Init( new PayPalConfiguration( PayPalEnvironment.NoNetwork, "this_is_your_paypal_key" ) { AcceptCreditCards = true, MerchantName = "PSM2017v2", MerchantPrivacyPolicyUri = "https://www.example.com/privacy", MerchantUserAgreementUri = "https://www.example.com/legal" } ); LoadApplication(new PSM2017v2.App()); ZXing.Net.Mobile.Forms.iOS.Platform.Init(); return(base.FinishedLaunching(app, options)); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); Xamarin.FormsMaps.Init(); CrossPayPalManager.Init(new PayPalConfiguration(PayPalEnvironment.NoNetwork, KeyConstants.PayPalEnvironmentId) { AcceptCreditCards = true, //Your business name MerchantName = "Project Helin Store", //Your privacy policy Url MerchantPrivacyPolicyUri = "https://www.example.com/privacy", //Your user agreement Url MerchantUserAgreementUri = "https://www.example.com/legal" } ); Websockets.Ios.WebsocketConnection.Link(); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); CrossPayPalManager.Init(new PayPalConfiguration( PayPalEnvironment.NoNetwork, "Your PayPal ID from https://developer.paypal.com/developer/applications/" ) { //If you want to accept credit cards AcceptCreditCards = true, //Your business name MerchantName = "Test Store", //Your privacy policy Url MerchantPrivacyPolicyUri = "https://www.example.com/privacy", //Your user agreement Url MerchantUserAgreementUri = "https://www.example.com/legal", // OPTIONAL - ShippingAddressOption (Both, None, PayPal, Provided) ShippingAddressOption = ShippingAddressOption.Both, // OPTIONAL - Language: Default languege for PayPal Plug-In Language = "en-us", // OPTIONAL - PhoneCountryCode: Default phone country code for PayPal Plug-In PhoneCountryCode = "52", } ); LoadApplication(new App()); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); LoadApplication(new App()); //Llamada a paypal CrossPayPalManager.Init( //new PayPalConfiguration(PayPalEnvironment.Sandbox, "ARIzxJa3tOHO9mLo7FB3YTp3n4Q28zh1kiMPDFie9lmMIvPWk5gN-ardzfJcpPzJ0NHpi2UWBZT6GbuV") //new PayPalConfiguration(PayPalEnvironment.Production, "AZ4CjEeIYvI55U8oiRyPbfaCXXzijjtRskzgf5PGYxnTr62cbocIvncFUATGBXRhfkUXzaubXSEQ2nd5") antunez produccion new PayPalConfiguration(PayPalEnvironment.Production, "AaTHcSUCOzUWTn__0okD1xm3yuGUZyg6TeRY5FXPRVUwn8g14SL75xsEBgfaUYHbpD7OGy4GBteIvpxJ") //andrades produccion { StoreUserData = false, AcceptCreditCards = true, MerchantName = "Test Store", MerchantPrivacyPolicyUri = "https://www.example.com/privacy", MerchantUserAgreementUri = "https://www.example.com/legal", ShippingAddressOption = ShippingAddressOption.Provided, //Direccion que provee el usuario //ShippingAddressOption = ShippingAddressOption.PayPal, Language = "es", PhoneCountryCode = "52" } ); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); //.. PayPal Configuration Setup ..// var config = new PayPalConfiguration(PayPalEnvironment.Sandbox, "YOUR CLIENT ID HERE") { AcceptCreditCards = true, MerchantName = "Your Merchant Name Here", //Your privacy policy Url MerchantPrivacyPolicyUri = "https://www.example.com/privacy", //Your user agreement Url MerchantUserAgreementUri = "https://www.example.com/legal" }; CrossPayPalManager.Init(config, this); LoadApplication(new App()); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); Rg.Plugins.Popup.Popup.Init(this, savedInstanceState); //CarouselViewRenderer.Init(); Forms.SetFlags("CollectionView_Experimental"); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); CardsViewRenderer.Preserve(); LoadApplication(new App()); var config = new PayPalConfiguration(PayPalEnvironment.NoNetwork, Constants.PayPalKey) { //If you want to accept credit cards AcceptCreditCards = true, //Your business name MerchantName = "BeGreen", MerchantPrivacyPolicyUri = "https://be-green.mx/front/politicas", MerchantUserAgreementUri = "https://be-green.mx/front/politicas_pagos", // OPTIONAL - ShippingAddressOption (Both, None, PayPal, Provided) //ShippingAddressOption = ShippingAddressOption.Both, // OPTIONAL - Language: Default languege for PayPal Plug-In Language = "es", // OPTIONAL - PhoneCountryCode: Default phone country code for PayPal Plug-In PhoneCountryCode = "52", }; CrossPayPalManager.Init(config, this); }
protected override void OnCreate(Bundle bundle) { try { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); CarouselViewRenderer.Init(); CachedImageRenderer.Init(true); } catch (System.Exception ex) { App.Current.MainPage.DisplayAlert("System", ex.Message, "ok"); } try { if (Intent.Extras != null) { foreach (var key in Intent.Extras.KeySet()) { if (key != null) { var value = Intent.Extras.GetString(key); Log.Debug(TAG, "Key: {0} Value: {1}", key, value); } } } IsPlayServicesAvailable(); CreateNotificationChannel(); global::Xamarin.Forms.Forms.Init(this, bundle); //need this line to init effect in android Xamarin.KeyboardHelper.Platform.Droid.Effects.Init(this); CarouselView.FormsPlugin.Android.CarouselViewRenderer.Init(); DependencyService.Register <PicturePickerImplementation>(); DependencyService.Register <CallService>(); DependencyService.Register <CloseApplication>(); } catch (System.Exception ex) { App.Current.MainPage.DisplayAlert("System", ex.Message, "ok"); } try { var config = new PayPalConfiguration(PayPalEnvironment.Production, "Ae4zGNWtak5RGzB1HXRLmUwDqMgpBd_8oxMZZ_CQNiqKZyHTdjudpoDqMDs69XMdHcgi7NUCDpWFLizK") { //If you want to accept credit cards AcceptCreditCards = false, //Your business name MerchantName = "TeleYuma", //Your privacy policy Url MerchantPrivacyPolicyUri = "https://www.example.com/privacy", //Your user agreement Url MerchantUserAgreementUri = "https://www.example.com/legal", // OPTIONAL - ShippingAddressOption (Both, None, PayPal, Provided) ShippingAddressOption = ShippingAddressOption.Both, // OPTIONAL - Language: Default languege for PayPal Plug-In Language = "es", // OPTIONAL - PhoneCountryCode: Default phone country code for PayPal Plug-In //PhoneCountryCode = "1", }; CrossPayPalManager.Init(config, this); if ((ContextCompat.CheckSelfPermission(this, Manifest.Permission.ReadContacts) == (int)Permission.Granted) && (ContextCompat.CheckSelfPermission(this, Manifest.Permission.CallPhone) == (int)Permission.Granted) && (ContextCompat.CheckSelfPermission(this, Manifest.Permission.ReadExternalStorage) == (int)Permission.Granted)) { var IdSms = this.Intent.GetStringExtra("sms"); var open = _Global.IsOpen; if (IdSms == null) { // startService(); } LoadApplication(new TeleYumaApp.App()); } else { ActivityCompat.RequestPermissions(this, new string[] { Manifest.Permission.ReadContacts, Manifest.Permission.CallPhone, Manifest.Permission.ReadExternalStorage }, 0); } } catch (System.Exception ex) { App.Current.MainPage.DisplayAlert("System", ex.Message, "ok"); } }
//resturar paquetes, actualizar limpiar compilar revisar que el infop.list este en 8 // 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(); ZXing.Net.Mobile.Forms.iOS.Platform.Init(); //paypal produccion AQrrFs8D-iSCYiAEEmO9ni3CcQ7GjgjPqSBBVhxNTmRKOnLR_Ol_qRcy2Pr4yxhwcQ2BK1BoZbzl0Hka //paypal sandbox AVART2W6j2cnNhmWej6EcQjx_ytsVpl1hmnArzHtVWSsZFRVAWOlZq6y3EjPFM0FHUhG_yrvkftXAAtN var config = new PayPalConfiguration(PayPalEnvironment.Production, "AQrrFs8D-iSCYiAEEmO9ni3CcQ7GjgjPqSBBVhxNTmRKOnLR_Ol_qRcy2Pr4yxhwcQ2BK1BoZbzl0Hka") //var config = new PayPalConfiguration(PayPalEnvironment.Sandbox, "AVART2W6j2cnNhmWej6EcQjx_ytsVpl1hmnArzHtVWSsZFRVAWOlZq6y3EjPFM0FHUhG_yrvkftXAAtN") { //If you want to accept credit cards AcceptCreditCards = false, //Your business name MerchantName = "Tienda", //Your privacy policy Url MerchantPrivacyPolicyUri = "http://tratoespecial.com/politicas-de-privacidad/", //Your user agreement Url MerchantUserAgreementUri = "http://tratoespecial.com/terminos-y-condiciones/", // OPTIONAL - ShippingAddressOption (Both, None, PayPal, Provided) ShippingAddressOption = ShippingAddressOption.Both, // OPTIONAL - Language: Default languege for PayPal Plug-In Language = "es", // OPTIONAL - PhoneCountryCode: Default phone country code for PayPal Plug-In PhoneCountryCode = "52", }; CrossPayPalManager.Init(config); LoadApplication(new App()); if (options != null) { //check for remote notification if (options.ContainsKey(UIApplication.LaunchOptionsRemoteNotificationKey)) { NSDictionary _remoteNotif = options[UIApplication.LaunchOptionsRemoteNotificationKey] as NSDictionary; if (_remoteNotif != null) { // new UIAlertView(_remoteNotif.a) } } } // pedir permiso para enviar notificaciones if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { // iOS 8 or later var notifSettings = UIUserNotificationSettings.GetSettingsForTypes( UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, null); // For iOS 8 display notification (sent via APNS) app.RegisterUserNotificationSettings(notifSettings); app.RegisterForRemoteNotifications(); /* UNUserNotificationCenter.Current.Delegate = this; * System.Diagnostics.Debug.WriteLine($"antes 11: {app.IsRegisteredForRemoteNotifications.ToString()}"); * UIApplication.SharedApplication.RegisterForRemoteNotifications(); * System.Diagnostics.Debug.WriteLine($"despues 11: {app.IsRegisteredForRemoteNotifications.ToString()}");*/ } else { //register for remote notifications and get the device token //set what kind of notifiaction type we want UIRemoteNotificationType _notifTypes = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge; //register for remtote notif UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(_notifTypes); /*var allNotificationTypes = UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound; * var settings = UIUserNotificationSettings.GetSettingsForTypes(allNotificationTypes, null); * UIApplication.SharedApplication.RegisterUserNotificationSettings(settings); * System.Diagnostics.Debug.WriteLine($"antes 9: {app.IsRegisteredForRemoteNotifications.ToString()}"); * UIApplication.SharedApplication.RegisterForRemoteNotifications(); * System.Diagnostics.Debug.WriteLine($"despues 9: {app.IsRegisteredForRemoteNotifications.ToString()}");*/ } Firebase.Core.App.Configure(); Firebase.InstanceID.InstanceId.Notifications.ObserveTokenRefresh((sender, e) => { var newtoken = Firebase.InstanceID.InstanceId.SharedInstance.Token; System.Diagnostics.Debug.WriteLine($"FCM Token observe: {newtoken}"); App.Fn_SetToken(newtoken); }); //Firebase.InstanceID.InstanceId.TokenRefreshNotification; //debugAlert(UIApplication.SharedApplication.IsRegisteredForRemoteNotifications.ToString(),V_Token); // Console.WriteLine(" token device " + V_Token); //https://github.com/codercampos/FirebaseXF-XamarinLatino/blob/master/src/FirebaseXL/FirebaseXL.iOS/AppDelegate.cs // blog.xamarians.com/blog/2017/9/18/firebase-cloud-messaging return(base.FinishedLaunching(app, options)); }