Is there solution to detect click anywhere on reacts-native WebView? Tried to put it inside TouchableOpacity but I'm getting errors. Is there some work around it, to detect click?
This will be a great feature if react native team can add it in the future. Currently this is still an open issue https://github.com/facebook/react-native/issues/586
Somebody provide a suggestion at there you can give it a try. But it is better wait for facebook team to provide a more elegant solution.
Any events taking place inside a webview is sandboxed from the rest of the application. This is by design of this native component, not a limitation of React Native.
What you will need to do is to manually bubble up the event that you are interested in from the webview to your app yourself.
You can currently do so by using react-native-webview-bridge. You set a global listener to the DOM event that you are interested in. Once you catch it, you send it to your application via the bridge.
Related
I'm trying to call a number from my app, but I want to do that without having to click on the modal that appears with "Cancel" and "Call" after I clicked my button in the app. Just click the button in the app and go straight to the call. Can I do that?
I already installed the native plugin [call-number] and the ionic package. It's working, it's making the call, It's just that I would like to make the call without that extra step.
Not sure if thats possible. Plugins provide communication between the ionic layer and the native layer so you are usually limited by the options the plugin gives you.
According to the documentation all you can do is bypass the choice of the calling app.
https://github.com/Rohfosho/CordovaCallNumberPlugin
You can't bypass that dialog. It is provided by iOS as an extra layer of protection for the user. It stops malicious apps initiating calls that may incur costs without user acknowledgement.
I'm part of a team that has made a Keyboard Extension with a lot of users using google docs. A recent update of google docs is broken and causes textWillChange and textDidChange to stop being fired if the user manually moves the cursor around by holding the finger down. If the user closes the keyboard and opens i again it will work until broken again...
Above event are quite important as all suggestions rely on these events in order to update (this goes for all keyboard extensions, also big ones as Swiftkey).
To make matters worse google has stopped giving support of editing documents from the website only supporting edit through apps.
So my questions are as follows:
So is there any way we can detect this issue has happened?
Is there any way we can reenable it when it happens?
Is there any way we can avoid it from happening?
Where should we report this to google (tried: https://productforums.google.com/forum/#!topic/docs/0OsHxzOjTq4)
This is a general problem with keyboard-extension in iOS. Different apps react different and sends somewhat different event.
I used touch Id plugin in my IOS Application by following below URL:
https://www.ibm.com/developerworks/community/blogs/worklightsmobileplayground/entry/touchid_authentication_with_worklight?lang=en
I implemented plugin properly and it is working. I want to change in the plugin code such that the Touch ID default popup should be removed but the touch authentication should work.
Please suggest on this.
In my opinion you are attempting to subvert the way TouchID works, and that is a big no-no. You should keep the TouchID UI as it is since that is part of the Touch ID experience Apple decided on. And I don't think you can change that anyway.
I'm developing a simple content blocker for iOS 9+ devices. Everything seems to be working fine in terms of blocking ad's / trackers etc and I even have the ability to 'whitelist' websites directly from Safari using a Share Extension Action.
My question is when the user taps Action > My Apps Share Extension [which adds it to a list inside the main app] I want to show a simple Alert that says something like 'This site has been added to your whitelist..." for a few seconds and then disappear.
... how do I do this?
**UPDATE I have read all of Apples documentation on this but still can't figure it out. The post here does actually refer to how to design a streamlined UI but doesn't really cover my situation.
Hoping someone will know :-)
Why you don't use Notifications for this , you can have your notification style set to show like an UIAlert. You can see something like that in Calendar app in iOS.
UPDATE:
I did a little bit more digging , it's not possible to change the style programmatically according to this. So the best choice is handling it when your app is in foreground. I can't think of any other OS wide solution other than local notifications.
I am building simple HTML5 presentations that will be served through an iPad app which pushes these local html5 files through UIWebView. As a developer, I am only limited to my own HTML5 code in each of these presentations. I have no access to the platform or the app these presentations reside in.
I have implemented Google Analytics. Doesn't work. I have implemented Localytics. Doesn't work. I have tried other numerous tracking platforms. They Don't work. The same code works when I upload my files to a web server and then visit it and click through. The same code does not work on the iPad. UIWebView is killing these Javascript libraries included for metrics/tracking.
Anyone ever use any metrics/tracking in a local HTML/HTML5 presentation that is served through an App using UIWebView? I am looking for somekind of solution. Your time is very much appreciated. Thank you.
Can you elaborate on "doesn't work"? I use both Google Analytics and Omniture from within a UIWebView and both work properly.
It sounds like you're tracking events, not just pageviews. That is, you're tracking when people tap on things. One thing that could be happening is the app is "trapping" those events. UIWebViews receive notifications when the apps inside them do certain things, so they can help those apps have a "native" experience. This includes things like link-handling, allowing an app to trap a Twitter intent, for instance, and send it to the actual Twitter app rather than keeping it in HTML.
It's not clear from your description whether this is the problem - but if it is, you would need to work with the app developer(s) if you wanted to keep using link tags. There's no choice - you can't stop the UIWebView from being notified, and if it does something with the event you won't get it back.
If all of this is true, try changing the elements to something other than tags. A DIV or LI, for instance, would not trigger this behavior. You'd have to do more work in your app to simulate "link-following" workflows. Something like this:
$('.tappable-item').click(function(e) {
e.preventDefault();
// Fire the analytics event
// Possibly wait 250ms or so to let the event get recorded
window.location.href = $(this).attr('data-href');
}
Google Analytics only accepts requests from the domain you configured for the campaign. What I did is create a secret page on my domain, and in the html I put an iframe that loads that page.