Giter Site home page Giter Site logo

Comments (9)

jonnysamps avatar jonnysamps commented on June 17, 2024 1

Looks like you can close any active activity on Android if you have access to it. Just need to figure that part out. Disclosure: never written a native Android app.

I'll put together a PR.

from nativescript-advanced-webview.

bradmartin avatar bradmartin commented on June 17, 2024

from nativescript-advanced-webview.

jonnysamps avatar jonnysamps commented on June 17, 2024

I know iOS has it:
https://developer.apple.com/documentation/uikit/uiviewcontroller/1621505-dismissviewcontrolleranimated

Not sure about Android

from nativescript-advanced-webview.

jonnysamps avatar jonnysamps commented on June 17, 2024

Also, I can't use the built-in webview because of Google's restricted requirements for OAuth.

from nativescript-advanced-webview.

bradmartin avatar bradmartin commented on June 17, 2024

from nativescript-advanced-webview.

bradmartin avatar bradmartin commented on June 17, 2024

Poke around here on the android docs: https://developer.android.com/reference/android/support/customtabs/CustomTabsIntent.Builder.html - my quick glance didn't look promising on the API for customtabs - but yea closing the Chrome activity seems reasonable 👍 I wasn't thinking that direction to be honest.

from nativescript-advanced-webview.

chrisbellman avatar chrisbellman commented on June 17, 2024

@jonnysamps trying to do something similar (use WebView to login / grab token from WebView then close WebView). How did you end up implementing?

from nativescript-advanced-webview.

alexmeia avatar alexmeia commented on June 17, 2024

Hello, any progress on this? I think this is a major issue for developers using advanced webview for OAuth authentication flow. Especially in iOS, the plugin should expose e method to closed automatically Safari View Controller after redirect to custom URL.

from nativescript-advanced-webview.

etelford avatar etelford commented on June 17, 2024

The way I handle this: from my web app that completes OAuth, I use an x-callback-url that my native app receives. Based on that, I dispatch an event globally to dismiss/close the SafariViewController.

from nativescript-advanced-webview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.