Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to detect URL changes in tabs.openWithOptions?
    primarykey
    data
    text
    <p>So I have the following code:</p> <pre><code>options = { url: "http://mywebsite.com/login/" + authService, pattern: "http://*mywebsite.com/complete/" + authService + "*", }; forge.tabs.openWithOptions(options, function(data) { // We've logged in. Do something now }, function(data) { forge.logging.error("Error"); }); </code></pre> <p>The code works fine on the iPhone simulator, but the success callback doesn't get called in the Android emulator. It doesn't seem to register going to the redirect url from Oauth. In the emulator, it does load my redirect URL but it doesn't log that it does. This is what is logged in forge run:</p> <pre><code>[ INFO] I/Forge ( 393): Loading initial page in webview. [ INFO] I/Forge ( 393): Application in focus, resuming webview. [ INFO] D/Forge ( 393): Returning event: {"event":"internal.connectionStateChange","params":{"wifi":false,"connected":true}} [ INFO] D/Forge ( 393): Native call "tabbar.hide" with task.params: {} [ INFO] D/Forge ( 393): Returning: {"status":"success","callid":"2C1DB06C-9438-4AFD-841B-C2E3BBF8AA85"} [ INFO] D/Forge ( 393): Native call "tabbar.addButton" with task.params: {"text":"Events","icon":"img/logo-forge.png"} [ INFO] D/Forge ( 393): Native call "tabbar.addButton" with task.params: {"text":"Activity","icon":"img/logo-forge.png"} [ INFO] D/Forge ( 393): Native call "tabbar.addButton" with task.params: {"text":"Me","icon":"img/logo-forge.png"} [ INFO] D/Forge ( 393): Returning: {"content":"37F88F37-9A08-4541-8B1D-D7D08C2605D8","status":"success","callid":"37F88F37-9A08-4541-8B1D-D7D08C2605D8"} [ INFO] D/Forge ( 393): Returning: {"content":"FFA69B04-006E-45CB-8BD7-A3CBB7E8403C","status":"success","callid":"FFA69B04-006E-45CB-8BD7-A3CBB7E8403C"} [ INFO] D/Forge ( 393): Returning: {"content":"99681BEB-E79B-4309-B230-90B731A3DA61","status":"success","callid":"99681BEB-E79B-4309-B230-90B731A3DA61"} [ INFO] D/Forge ( 393): Native call "internal.hideLaunchImage" with task.params: {} [ INFO] D/Forge ( 393): Native call "tabbar.setActive" with task.params: {"id":"37F88F37-9A08-4541-8B1D-D7D08C2605D8"} [ INFO] D/Forge ( 393): Returning: {"status":"success","callid":"23F0D9E1-5F63-4F6A-BFE0-14D674CDEB65"} [ INFO] D/Forge ( 393): Native call "tabs.open" with task.params: {"url":"http://mywebsite.com/login/twitter","pattern":"^http://*mywebsite.com/complete/twitter.*$","title":"Sign in with Twitter"} [ INFO] I/Forge ( 393): Displaying modal view. [ INFO] I/Forge ( 393): subView load http://mywebsite.com/login/twitter/ [ INFO] I/Forge ( 393): subView load http://api.twitter.com/oauth/authenticate?oauth_token=TOKEN&amp;oauth_callback=http%3A%2F%2Fmywebsite.com%2Fcomplete%2Ftwitter%2F </code></pre> <p>If I can't detect these URL changes consistently, is it possible to get the URL of the current tab at a point in time?</p> <p>Note: I am using django-social-auth on my backend.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload