[GitHub] cordova-plugin-inappbrowser pull request: inAppBrowser custom appl...

2016-04-27 Thread osvso
Github user osvso commented on the pull request:


https://github.com/apache/cordova-plugin-inappbrowser/pull/99#issuecomment-215002415
  
I've changed the implementation a bit. Currently defining additional 
property with custom application scheme is not required anymore.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org



[GitHub] cordova-plugin-inappbrowser pull request: inAppBrowser custom appl...

2016-04-07 Thread JPustkuchen
Github user JPustkuchen commented on the pull request:


https://github.com/apache/cordova-plugin-inappbrowser/pull/99#issuecomment-207061483
  
I can confirm that this is really an important feature request. For example 
we want to use skype:// and whatsapp:// links within the webview. The problem 
is, that loadstart acts async and so even a workaround in the event to prevent 
loading the protocol as page is not possible.

A possible and safe solution (from my point of view) could be a new 
"beforeloadstart" event which allows to return false and take the url parameter 
for custom handling. The url should not be prefixed by http:// like currently 
in loadstart. So we can introduce our own custom logic in JS without hacking 
the plugin.

What do you think?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org



[GitHub] cordova-plugin-inappbrowser pull request: inAppBrowser custom appl...

2016-02-16 Thread NGumby
Github user NGumby commented on the pull request:


https://github.com/apache/cordova-plugin-inappbrowser/pull/99#issuecomment-184857676
  
I think a better approach to communicate between an external website and 
the app, is to raise an event in shouldOverrideLoadUrl like this :

```
public boolean shouldOverrideUrlLoading(WebView webView, String url) {
LOG.d(LOG_TAG, "shouldOverrideUrlLoading:" + url);

if (url.startsWith(WebView.SCHEME_TEL)) {
...
}
else if (url.startsWith("myscheme:")) {
try {
JSONObject obj = new JSONObject();
obj.put("type", "customevent");
obj.put("url", url);
sendUpdate(obj, true);
return true;
} catch (JSONException ex) {
LOG.e(LOG_TAG, "URI passed in has 
caused a JSON error.");
}
}
return false;
}
```

add this to InAppBrowser.js 

```
function InAppBrowser() {
this.channels = {
'loadstart': channel.create('loadstart'),
'loadstop': channel.create('loadstop'),
'loaderror': channel.create('loaderror'),
'customevent': channel.create('customevent'),
'exit': channel.create('exit')
};
}

```
in your app, you can then do
  `  appBrowser.addEventListener("customevent", 
function(event){console.log("My custom event raised:" + event.url)});
`

from the external website, you can then have a link like

`Custom Action in the 
app`

It works pretty well, and you can parse the url to do the custom actions!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org



[GitHub] cordova-plugin-inappbrowser pull request: inAppBrowser custom appl...

2015-12-16 Thread iampeter
Github user iampeter commented on the pull request:


https://github.com/apache/cordova-plugin-inappbrowser/pull/99#issuecomment-165376605
  
Could this change be introduced? Seems that on some Android devices the 
"_system" parameter doesn't help with the custom URL scheme.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org



[GitHub] cordova-plugin-inappbrowser pull request: inAppBrowser custom appl...

2015-03-28 Thread osvso
Github user osvso commented on the pull request:


https://github.com/apache/cordova-plugin-inappbrowser/pull/99#issuecomment-87192378
  
I agree that it is responsibility of the parent to dismiss the inAppBrowser 
(fixed that), but from the other hand it is also responsibility of the webView 
to handle the redirect. Listening and interpreting redirections from to top 
level is possible and would probably work, but I consider it as not safe as it 
moves handling sensitive redirection to javascript layer which can be easily 
tampered. Also redirection handling will have to be placed within some android 
specific statement as it works on iOS. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org



[GitHub] cordova-plugin-inappbrowser pull request: inAppBrowser custom appl...

2015-03-27 Thread purplecabbage
Github user purplecabbage commented on the pull request:


https://github.com/apache/cordova-plugin-inappbrowser/pull/99#issuecomment-87025912
  
It should not redirect, it should send a message to it's parent ( the 
application webview )
The parent should then dismiss it's child (InAppBrowser).

The parent gets notifications every time the location of the InAppBrowser 
changes, and can respond based on what the location.href is. Think oauth,  and 
send the InAppBrower to #token=ACCESS_TOKEN or some other signal that you 
define.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org



[GitHub] cordova-plugin-inappbrowser pull request: inAppBrowser custom appl...

2015-03-27 Thread osvso
Github user osvso commented on the pull request:


https://github.com/apache/cordova-plugin-inappbrowser/pull/99#issuecomment-86966392
  
We don't want to system browser.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org



[GitHub] cordova-plugin-inappbrowser pull request: inAppBrowser custom appl...

2015-03-27 Thread osvso
Github user osvso commented on the pull request:


https://github.com/apache/cordova-plugin-inappbrowser/pull/99#issuecomment-86966069
  
Maybe I'm missing something. The problem which we faced with the current 
inAppBrowser plugin implementation is that it doesn't allow to perform the 
redirection back to the application using custom scheme. Although the 
android:scheme is registered the the webView in inAppBrowser returns 
err_unknown_url_scheme when trying navigate back. It works without any problems 
on iOS, and also using system browser.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org



[GitHub] cordova-plugin-inappbrowser pull request: inAppBrowser custom appl...

2015-03-26 Thread jcesarmobile
Github user jcesarmobile commented on the pull request:


https://github.com/apache/cordova-plugin-inappbrowser/pull/99#issuecomment-86389973
  
I can't understand what this changes try to achieve. Looking at the code it 
launchs an intent to open an external app if the url is defined on the 
config.xml. But that can be done right now using the _system option



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org



[GitHub] cordova-plugin-inappbrowser pull request: inAppBrowser custom appl...

2015-03-26 Thread osvso
GitHub user osvso opened a pull request:

https://github.com/apache/cordova-plugin-inappbrowser/pull/99

inAppBrowser custom application scheme handling on android 

Currently the inAppBrowser doesn't handle custom application scheme making 
it impossible to redirect back to the nativeCode from the embedded webView. The 
system browser handles such redirects without a problem, but due to security 
reasons in some cases usage of embedded view is more advisable.  


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/osvso/cordova-plugin-inappbrowser master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-plugin-inappbrowser/pull/99.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #99


commit c21943fa3e48e0e26d26ae31b595ca64d886a46f
Author: Pawel Lewandowski 
Date:   2015-03-26T07:39:03Z

inAppBrowser will allow back-to-the-app-redirections using application's 
custom scheme

scheme can be configured in config.xml using "CustomAppScheme" proererty




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org