I have created an adobe air application. I have integrated facebook in my application.
Now when the facebook login page opens in the webview, user has the option to use "Forgot your password" and "Sign Up" links. I want to prevent the use of these links.
I am using LOCATION_CHANGED and LOCATION_CHANGING events to detect the browsing of the user. How can i prevent this?
Any help appreciated.
Have you tried using event.preventDefault()? I think that should stop the web view from redirecting. Perhaps you can evaluate the url the view is trying to go to and selectively call preventDefault() then?
Related
I'm creating a mediaplayer in my website using html5 audio.
I'm struggling with not allowing the users to download my audiofile. The problem is not in my webpage, as I can simply use the controlslist to disable download. The problem is, if someone gets the link to the source on my server, and opens it in a new tab in chrome, then they have a download-button in the chrome audioplayer.
How can I remove this option? I can not allow the users to download the audiofiles.
Edit:
Or maybe the best way to go around this is to use the javascript Audio-class? Then I won't expose the sourceurl. What do you think? Any downsides/upsides choosing one of them?
Does anyone know if the GCM native notification prompt you see on Browsers such as Chrome, can be replaced or adjusted in any way so that we show a more presentable popup instead?
Here is a native prompt example:
No, you cannot customize it.
The only option would be do draw your custom dialog with HTML / CSS, then when someone clicks subscribe display the default browser dialog: I've already seen it on some websites, but I strongly recommend against it (because of the bad UX it provides).
Basically, I have this chatting website.
I want it to open up the web app inside of a popup, and I would also like for it to create a notification when I have unread messages.
I need to know if I can make it so it opens like it's in a website, or if I need to completely rewrite the coding.
You can in principle try to embed an iframe in the popup to show the webapp, but a popup page is completely destroyed when you close it, so it won't stay connected that way.
You would probably need another way.
It does not seem like Hall has any public API that you can use.
So probably your only option is to use a content script to interact with Hall opened in a tab. If you're adventurous, you could try to embed an iframe in your background page and interact with it there, but Hall may disallow framing.
All that said, I'm not so sure Hall will appreciate creating alternative software to interact with it.
I have managed to integrate a donate paypal button in a Cordova app:
<form action='https://www.paypal.com/cgi-bin/webscr' method='post' target='_top'>
...
</form>
All works fine except that when the button is pressed, a new window appears and completly covers the app webview making it impossible for the user to go back to the app (the only way is killing the app process), which I think is a very bad user experience.
Things that I've tried:
target='_blank': same result
target='myIFrameName': Cross-domain problem
Post the form via ajax and put result in a div: Form must be calculated on the fly error (with $http.put in ionic, haven't tried with jQuery)
Please, any solution?
The best one would be to have the paypal window inside the current webview not covering header, as I could place a back button there (something like iframe solution that could work with cross domain) but also could be with placing a link to go back in the paypal donate page. I haven't investigated deeper enought the paypal plugin at this location: https://github.com/paypal/PayPal-Cordova-Plugin. anyone knows if it could do the work? (I've already opened an issue there asking for this feature)
Why not use a inApp browser ? Cordova InAppBrowser
And call cordova.InAppBrowser.open( url, '_blank', 'location=yes'); on a button click function, or whatever suits you.
_blank = inside the app
_system = system's browser( will redirect you from app )
I'm creating a chrome packaged app, and I need to navigate my htmls without creating a lot of windows, like, if the user click one button, it opens the html in the same window the user are.
Is it even possible? If not, is there a way to make windows modal? So the user can't focus another window without closing the current?
Packaged apps intentionally do not support navigation. Apps are not in a browser, there is no concept of forward, back, or reload. Applications which do require the concept of navigation, or modal dialogs, should use a user interface framework that supports that functionality. In fundamentals, you can navigate by manipulating the DOM or by using CSS to animate and control visibility of components of your app.
The page you want to navigate to can be opened in a new window, then the previous page can be closed.
function navigateToLink (link) {
var current = chrome.app.window.current();
chrome.app.window.create(link);
current.close();
}