I want to know when a user screenshots while being in the app for analytics. for both Android and IOS.
It seems like there's not a direct way to do this, but somehow might be possible.
Take a look at these posts:
iOS Detection of Screenshot?
Detect a screenshot Android
And for react native there's actually a package for that.
Related
I am building an IOT device for my home and have mDNS responder on it (to avoid static IP setup for IoT devices).
Devices are to be controlled with React Native Android app, but the same seems to be not working and am getting Network error (using Axios).
My endpoints have changed from http://192.168.0.2/setSettings to http://mymdnstest.local/setSettings same works from windows chrome browser but not from android browser as well.
I came across zeroconf but it seems it searches for mdns URL but I am looking for more of invoking them.
Note: the mDNS endpoint is known to my React Native app.
Zeroconf actually works, the issue is with emulator it doesnt let us know if it works.. If you test it with physical device will get to know the mDNS details.
We would like to create a clickable button/link in a Cordova mobile app for iOS and Android that allows the user to go directly to the phone's settings screen, ideally in either iOS or Android, so that they can easily find and enable any disabled permissions for our app. This is especially relevant for less tech-savvy users who may not know how to find their phones settings. If possible, even better if this button/link can take the user directly to the settings relevant to our app (eg if user did not enable something in settings). Also, even better if this can be done using html5/js, and without using native code, or if native code is required then using a Cordova plugin for the purpose.
Have seen apps that do this -- not sure how.
Thanks
I am struggling with opening the website inside the Cordova app using the Crosswalk engine. The default InAppBrowser is rendering the page inproperly, because it uses native WebView(which works bad on older phones like Android 4.3). I am trying to use the cordova-plugin-crosswalk-webview and while it seems to render the cordova view with Crosswalk(the navigator.userAgent says so), when I call either window.open or cordova.InAppBrowser(after installing cordova-plugin-inappbrowser) it uses the native WebView.
Is there something special I have to do to make it render that way ? I also tried this package github, but it seems to not be able to allow executing scripts in the inner browser and I need some sort of communication between the Cordova app and the browser page. Maybe there is some other way for making this communication work(the intention is to be able to show barcode scanner when clicking on the button).
Do you have any idea how to solve this issue ? Big thanks !
Try using this:
//config.xml
<allow-navigation href="http://cordova.apache.org/*" />
//code
window.open('http://cordova.apache.org/', '_self');
https://issues.apache.org/jira/browse/CB-9573
Open a website in crosswalk webview
I'm aware that when using React Native to develop for iOS, I have access to the LinkingIOS and WebView modules to work with URLs. Is there any sort of equivalent for Android? All I'm looking to do is open the URL in the device's browser.
I know that the contributors are working on implementing WebView in Android:
https://facebook.github.io/react-native/docs/known-issues.html#views
https://github.com/facebook/react-native/issues/2701
But is there anything I can use in the meantime?
Again, All I need is an equivalent to LinkingIOS.openUrl(url) for Android.
Try this module https://github.com/ivanph/react-native-webintent for opening urls in the default browser.
With the latest release of React Native (0.21), they provide module Linking to handle incoming as well as outgoing web url.
This can work both on Android and iOS without platform specific.
There is IntentAndroid to open URL.
Example
IntentAndroid.openURL(url)
Please refer to official doc for more info
https://facebook.github.io/react-native/docs/intentandroid.html#content
I make an app...But I found a problem.
I Use telephony hardware for make a call for smartphone..
in my source i use
ng-click="openDial(tel)">
I need to detect SMARTPHONE or TABLET for show or hide DIAL DIV
How can i do it?
You'll have to make some guesses based on userAgent, perhaps on phoneGap's device info API, maybe some other things. It may be possible that there is some native API for figuring out if a dialer app is available .. but considering that it's entirely possible that a tablet could have something registered to dial numbers (at least in Android .. such as Skype or other VOIP dialers), perhaps you should just let it be.