protected override void OnClosing()
 {
     base.OnClosing();
     if (!_processedResult)
     {
         VKSDK.ProcessLoginResult(null, _isValidating, _validationCallback);
     }
 }
 protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
 {
     base.OnNavigatingFrom(e);
     if (e.NavigationMode == NavigationMode.Back && !_processedResult)
     {
         VKSDK.ProcessLoginResult(null, _isValidating, _validationCallback);
     }
 }
Exemplo n.º 3
0
        public static void HandleProtocolLaunch(ProtocolActivatedEventArgs protocolArgs)
        {
            if (protocolArgs.Uri.OriginalString.StartsWith("vk") && protocolArgs.Uri.OriginalString.Contains("://authorize"))
            {
                var launchUriDecoded = protocolArgs.Uri.ToString();
                launchUriDecoded = launchUriDecoded.Replace("authorize/#", "authorize/?");

                var innerQueryParamsString = VKUtil.GetParamsOfQueryString(launchUriDecoded);

                VKSDK.ProcessLoginResult(innerQueryParamsString, false, null);
            }
        }
        private void BrowserOnNavigating(WebView sender, WebViewNavigationStartingEventArgs args)
        {
            var url = args.Uri.AbsoluteUri;

            if (url.StartsWith(REDIRECT_URL) && !_processedResult)
            {
                var result = url.Substring(url.IndexOf('#') + 1);

                _processedResult = true;
                VKSDK.ProcessLoginResult(result, _isValidating, _validationCallback);
                this.IsShown = false;
            }
        }
        private void BrowserOnNavigating(object sender, NavigatingEventArgs args)
        {
            var url = args.Uri.AbsoluteUri;

            if (url.StartsWith(REDIRECT_URL))
            {
                var result = url.Substring(url.IndexOf('#') + 1);

                _processedResult = true;
                VKSDK.ProcessLoginResult(result, _isValidating, _validationCallback);
                RootFrame.GoBack();
            }
        }