public static void Error(string errorMsg, Java.Lang.Exception javaEx,
                          [CallerMemberName] string memberName    = "",
                          [CallerFilePath] string sourceFilePath  = "",
                          [CallerLineNumber] int sourceLineNumber = 0)
 {
     Error(errorMsg, new Exception(javaEx.ToString()), memberName, sourceFilePath, sourceLineNumber);
 }
Exemplo n.º 2
0
 public void OnInitCompleted(bool p0, Java.Lang.Exception p1)
 {
     Log.Info("APX", "init completed listener - MainActivity");
     RunOnUiThread(() => {
         pushEnable.Checked = appoxeeInstance.IsPushEnabled;;
     });
 }
Exemplo n.º 3
0
 public void OnFailure(Java.Lang.Exception e)
 {
     Failure?.Invoke(this, new TaskFailureEventArgs
     {
         Cause = e.Message
     });
 }
 public void OnFailure(Java.Lang.Exception e)
 {
     OnSendingResult?.Invoke(this, new ResultEventArgs
     {
         Result = "Error occured: " + e.Message
     });
 }
 public static void Error(Java.Lang.Exception javaEx,
                          [CallerMemberName] string memberName    = "",
                          [CallerFilePath] string sourceFilePath  = "",
                          [CallerLineNumber] int sourceLineNumber = 0)
 {
     Error("", javaEx, memberName, sourceFilePath, sourceLineNumber);
 }
Exemplo n.º 6
0
        public void OnFailure(Java.Lang.Exception e)
        {
            int statusCode = ((ApiException)e).StatusCode;

            switch (statusCode)
            {
            case CommonStatusCodes.ResolutionRequired:
                Log.Info(Activity.Tag, "Location settings are not satisfied. Attempting to upgrade location settings ");
                try
                {
                    ResolvableApiException rae = (ResolvableApiException)e;
                    rae.StartResolutionForResult(Activity, Activity.RequestCheckSettings);
                }
                catch (IntentSender.SendIntentException)
                {
                    Log.Info(Activity.Tag, "PendingIntent unable to execute request.");
                }
                break;

            case LocationSettingsStatusCodes.SettingsChangeUnavailable:
                string errorMessage = "Location settings are inadequate, and cannot be fixed here. Fix in Settings.";
                Log.Error(Activity.Tag, errorMessage);
                Toast.MakeText(Activity, errorMessage, ToastLength.Long).Show();
                Activity.mRequestingLocationUpdates = false;
                break;
            }

            Activity.UpdateUi();
        }
Exemplo n.º 7
0
        public virtual void OnError(Java.Lang.Exception error)
        {
            System.Diagnostics.Debug.WriteLine("Error received (" + error.GetType() + "): " + error.Message);
            System.Diagnostics.Debug.WriteLine(error.StackTrace);

            ShowDialog("An error occurred ");
        }
Exemplo n.º 8
0
        public void OnFailure(Java.Lang.Exception e)
        {
            Log.Error(MainActivity.TAG, Caller + " OnFailure");
            ApiException Excp = (ApiException)e;

            Toast.MakeText(context, Caller + " Failed " + Excp.StatusCode + " " + Excp.StatusMessage, ToastLength.Long).Show();
        }
Exemplo n.º 9
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Main);
            mSurfaceView           = FindViewById <GLSurfaceView>(Resource.Id.surfaceview);
            mDisplayRotationHelper = new DisplayRotationHelper(this);

            Java.Lang.Exception exception = null;
            string message = null;

            try {
                mSession = new Session(/*context=*/ this);
            } catch (UnavailableArcoreNotInstalledException e) {
                message   = "Please install ARCore";
                exception = e;
            } catch (UnavailableApkTooOldException e) {
                message   = "Please update ARCore";
                exception = e;
            } catch (UnavailableSdkTooOldException e) {
                message   = "Please update this app";
                exception = e;
            } catch (Java.Lang.Exception e) {
                exception = e;
                message   = "This device does not support AR";
            }

            if (message != null)
            {
                Toast.MakeText(this, message, ToastLength.Long).Show();
                return;
            }

            // Create default config, check is supported, create session from that config.
            var config = new Google.AR.Core.Config(mSession);

            if (!mSession.IsSupported(config))
            {
                Toast.MakeText(this, "This device does not support AR", ToastLength.Long).Show();
                Finish();
                return;
            }

            mGestureDetector = new Android.Views.GestureDetector(this, new SimpleTapGestureDetector {
                SingleTapUpHandler = (MotionEvent arg) => {
                    onSingleTap(arg);
                    return(true);
                },
                DownHandler = (MotionEvent arg) => true
            });

            mSurfaceView.SetOnTouchListener(this);

            // Set up renderer.
            mSurfaceView.PreserveEGLContextOnPause = true;
            mSurfaceView.SetEGLContextClientVersion(2);
            mSurfaceView.SetEGLConfigChooser(8, 8, 8, 8, 16, 0);             // Alpha used for plane blending.
            mSurfaceView.SetRenderer(this);
            mSurfaceView.RenderMode = Rendermode.Continuously;
        }
Exemplo n.º 10
0
 public void OnFailure(Java.Lang.Exception e)
 {
     Raised?.Invoke(this, new FirebaseEventArgs()
     {
         exception = e
     });
 }
Exemplo n.º 11
0
 public void OnFailure(Java.Lang.Exception e)
 {
     if (ErrorAction != null)
     {
         ErrorAction(e);
     }
 }
Exemplo n.º 12
0
 public void OnFailure(Java.Lang.Exception e)
 {
     Log.Info(TAG, "Onfailure");
     if (e.GetType() == typeof(IapApiException))
     {
         IapApiException apiException = (IapApiException)e;
         if (apiException.Status.StatusCode == OrderStatusCode.OrderHwidNotLogin)
         {
             if (apiException.Status.HasResolution)
             {
                 try
                 {
                     Log.Info(TAG, apiException.Status.StatusMessage);
                     apiException.Status.StartResolutionForResult(MainActivity.CurrentContext, Constants.REQ_CODE_LOGIN);
                 }
                 catch (Java.Lang.Exception exp)
                 {
                     Log.Error(TAG, exp.Message);
                 }
             }
         }
         else if (apiException.Status.StatusCode == OrderStatusCode.OrderAccountAreaNotSupported)
         {
             Toast.MakeText(MainActivity.CurrentContext, "This is unavailable in your country/region.", ToastLength.Long).Show();
         }
     }
 }
Exemplo n.º 13
0
 public void OnError(Java.Lang.Exception exc)
 {
     AlertDialog.Builder builder = new AlertDialog.Builder(context);
     builder.SetTitle("Error");
     builder.SetMessage(exc.Message);
     builder.Create().Show();
 }
Exemplo n.º 14
0
 public void OnFailure(Java.Lang.Exception e)
 {
     OnResult?.Invoke(this, new ResultEventArgs
     {
         Result = "Inviting friend failed due to an error: " + e.Message
     });
 }
Exemplo n.º 15
0
        public void OnFailure(Java.Lang.Exception e)
        {
            var source    = e.Cause;
            var errorType = e.GetType();

            Console.WriteLine("Exception caught: ", e.GetType());
        }
Exemplo n.º 16
0
 public void OnApiFailure(string p0, Java.Lang.Exception p1)
 {
     if (failure != null)
     {
         failure(p0, p1);
     }
 }
Exemplo n.º 17
0
 public void error(Java.Lang.String tag, Java.Lang.String msg, Exception e)
 {
     if (_logLevel <= _static_Logger.LOG_ERROR_)
     {
         Console.Error.WriteLine("[" + ((string)tag) + "] " + ((string)msg) + " " + e.ToString());
     }
 }
Exemplo n.º 18
0
        public void OnFailure(Java.Lang.Exception e)
        {
            progressDialog.Dismiss();

            this.ShowMessage(Resource.String.change_avatar_failure);

            Dismiss();
        }
 public void OnFailure(bool res, Java.Lang.Exception e, Context context)
 {
     //Send call back to caller
     if (OnAddMemberFailedHandler != null)
     {
         OnAddMemberFailedHandler(res, e, context);
     }
 }
Exemplo n.º 20
0
        public static int handle(Activity activity, Java.Lang.Exception e)
        {
            if ((e.GetType() == typeof(IapApiException)))
            {
                IapApiException iapApiException = (IapApiException)e;
                int             StatusCode      = iapApiException.Status.StatusCode;
                Log.Debug("Error", "returnCode: " + StatusCode);
                switch (StatusCode)
                {
                case OrderStatusCode.OrderStateCancel:
                    Toast.MakeText(activity, "Order has been canceled!", ToastLength.Short).Show();
                    return(SOLVED);

                case OrderStatusCode.OrderStateParamError:
                    Toast.MakeText(activity, "Order state param error!", ToastLength.Short).Show();
                    return(SOLVED);

                case OrderStatusCode.OrderStateNetError:
                    Toast.MakeText(activity, "Order state net error!", ToastLength.Short).Show();
                    return(SOLVED);

                case OrderStatusCode.OrderVrUninstallError:
                    Toast.MakeText(activity, "Order vr uninstall error!", ToastLength.Short).Show();
                    return(SOLVED);

                case OrderStatusCode.OrderProductOwned:
                    Toast.MakeText(activity, "Product already owned error!", ToastLength.Short).Show();
                    return(OrderStatusCode.OrderProductOwned);

                case OrderStatusCode.OrderProductNotOwned:
                    Toast.MakeText(activity, "Product not owned error!", ToastLength.Short).Show();
                    return(SOLVED);

                case OrderStatusCode.OrderProductConsumed:
                    Toast.MakeText(activity, "Product consumed error!", ToastLength.Short).Show();
                    return(SOLVED);

                case OrderStatusCode.OrderAccountAreaNotSupported:
                    Toast.MakeText(activity, "Order account area not supported error!", ToastLength.Short).Show();
                    return(SOLVED);

                case OrderStatusCode.OrderNotAcceptAgreement:
                    Toast.MakeText(activity, "User does not agree the agreement", ToastLength.Short).Show();
                    return(SOLVED);

                default:
                    // handle other error scenarios
                    Toast.MakeText(activity, "Order unknown error!", ToastLength.Short).Show();
                    return(SOLVED);
                }
            }
            else
            {
                Toast.MakeText(activity, "external error", ToastLength.Short).Show();
                Log.Debug("Error", e.Message);
                return(SOLVED);
            }
        }
Exemplo n.º 21
0
 public void OnFailure(int p0, Java.Lang.Exception p1)
 {
     // Do whatever you need to do with the user info data
     Activity.mUserInfoJson[KeyUserInfo] = null;
     Activity.RunOnUiThread(() => {
         Activity.displayAuthorizationInfo();
         Activity.showSnackbar(Activity.GetString(Resource.String.token_failure_message));
     });
 }
            public override void OnCompleted(Java.Lang.Exception exception, IAsyncHttpResponse s, string t)
            {
                var handler = onCompleted;

                if (handler != null)
                {
                    handler(exception, s, t);
                }
            }
Exemplo n.º 23
0
 public void OnError(Java.Lang.Exception exc)
 {
     AlertDialog.Builder builder = new AlertDialog.Builder(context);
     builder.SetTitle("Error");
     builder.SetMessage(exc.Message);
     builder.SetCancelable(false);
     builder.SetPositiveButton("OK", (sender, args) => { });
     builder.Create().Show();
 }
Exemplo n.º 24
0
        void IFutureCallback.OnCompleted(Java.Lang.Exception ex, Java.Lang.Object response)
        {
            var handler = onCompleted;

            if (handler != null)
            {
                handler(ex, response.JavaCast <T> ());
            }
        }
            public void OnCompleted(Java.Lang.Exception ex, IWebSocket webSocket)
            {
                var handler = onCompleted;

                if (handler != null)
                {
                    handler(ex, webSocket);
                }
            }
Exemplo n.º 26
0
        void IResultCallback.OnCompleted(Java.Lang.Exception exception, Java.Lang.Object s, Java.Lang.Object t)
        {
            var handler = onCompleted;

            if (handler != null)
            {
                handler(exception, s.JavaCast <S> (), t.JavaCast <T> ());
            }
        }
            void ICompletedCallback.OnCompleted(Java.Lang.Exception exception)
            {
                var handler = onCompleted;

                if (handler != null)
                {
                    handler(exception);
                }
            }
Exemplo n.º 28
0
        void IHttpConnectCallback.OnConnectCompleted(Java.Lang.Exception ex, IAsyncHttpResponse response)
        {
            var handler = onConnectCompleted;

            if (handler != null)
            {
                handler(ex, response);
            }
        }
Exemplo n.º 29
0
        public void OnCollectorError(DeviceCollector.ErrorCode errorCode, Java.Lang.Exception javaException)
        {
            String errorReason   = String.Empty;
            String errorCodeName = errorCode.Name();

            WriteLine(errorCodeName + " - " + errorReason);
            ProcessJavaException(javaException);
            RunOnUiThread(() => sendDeviceInformation.Enabled = true);
            RunOnUiThread(() => generateSessionButton.Enabled = true);
        }
Exemplo n.º 30
0
 public void ProcessJavaException(Java.Lang.Exception ex)
 {
     if (ex != null)
     {
         foreach (Java.Lang.StackTraceElement element in ex.GetStackTrace())
         {
             WriteLine(element.ClassName + " " + element.MethodName + "(" + element.LineNumber + ")");
         }
     }
 }
        public static Java.Lang.Exception ToJavaException(this System.Exception exception)
        {
            Java.Lang.Exception javaException = new Java.Lang.Exception (Java.Lang.Exception.FromException (exception));

            return javaException;
        }
            public void OnError(JException p0)
            {
                var ex = Throwable.ToException(p0);

                _paymentMethodNonce.TrySetException(ex);
            }