I need to create a react-native project for Android and Web environments.
For that, I need to place a map (free one) on one of the screens in my app.
I followed this guide:
https://developer.tomtom.com/blog/build-different/using-tomtom-maps-web-sdk-react-native-web-view-app
I changed a few things and I managed to load the TomTom map with WebView on Android only.
I used expo to load my app on my desktop browser and it won't display anything. Also, I can't send a reference object to the 'ref' field in WebView when using my browser. The reference works fine in Android.
After many tries I read that 'react-native-webview' does not support Web.
Basically I need a working map with locations (stores, parks etc.) and when the user will click or touch a location marker - I need to take the location details and show him a floating window with my data regarding the location.
How can I make it work on both Android and Web?
Do you think I should change to another free maps API that is more suitable for my situation?
Related
I'd like to have a single 'Get App' link that auto-detects the user's device type and browser and directs to the appropriate location (iTunes, Google Play, or website sign-up). I am currently using Onelink.to, but it has the following limitations:
if you're on iOS using a non-Safari browser (like Chrome) you end up looking at a bunch of raw JSON because it doesn't know to launch the App Store app. In this case, I'd prefer to direct to the iTunes website or better yet, deep link into the App Store app.
if using the link on your own site and a user is on a device that redirects to a different page of your own website, it complicates setting up event-based goals in Google Analytics
Are there any good JavaScript solutions that handle the App Store redirect while excluding this action on browsers that don't support the iTunes headers?
Thanks!
You can use javascript navigator.userAgent and parse it to detect the device. Then just generate the link according to it.
Here is an example for ios detection:
Detect if device is iOS
I'm facing an issue on publishing a Cordova app on IOS store.
I'm using "Maps JavaScript API" that refers to google map browser view.
As I publish the app the tech support (first and second level) refuse it multiple times due to this problem "app’s location feature is not integrated with the built-in mapping functionality, which limits users to a third party Maps application. Revise your app to give users the option to launch the native Apple Maps application".
NOTE: I'm not talking about call the map application's device that is performed by:
if(device.platform == 'iOS')
link = 'maps:q='+ item.address;
and produce this HTML:
Click Here
Can anyone suggest how to solve this issue? Documentation or examples are welcome.
Thanks
One way to do this is to use http://docs.phonegap.com/en/edge/cordova_geolocation_geolocation.md.html plugin so you can collect the devices coordinates, and before that send warning to user so he can allow you to use his position. You can find full example on the link.
I'm looking for leads on how to capture web page metadata from the current browser page. I want to create a feature in my application that will allow the user to press a hot key and record meta data from the web page currently open in the user's browser. My application will be running minimized, this feature is to be activated by a global hot key.
I'm using nw.js (formerly Node-Webkit) to create this application, so ideally, the solution would be javascript running in a desktop installation of Node.js. If this is not practical, I understand that I can call platform specific code from nw.js, so solutions developed in any desktop os language would be of interest.
My application targets OS X and Windows.
I'm hoping to capture metadata from all major modern browsers (Chrome, Firefox, Safari and IE 10+).
At a minimum I need to capture the page url, but I also want to capture Keywords, Description and highlighted text for the source web page.
I need to implement this function without modifying the source webpage in any way, and I prefer to avoid the need for browser extensions, bookmarklets or plugins.
If a solution exists using a remote controlled browser extension (no user interaction) that would be of interest, but ideally I want to avoid requiring the end user to install or interact with anything but my application.
My search to date has located no information on reading web page information from applications outside the browser.
Any thoughts or leads are much appreciated.
I want to dial number using javascript.
I have used following code
document.location.href = "tel:15555551212"
It brings me to dial screen of mobile application. But I want to make a call directly.
I have also used "callto" but it is not working.
This is not possible, unless:
the Web browser holds the CALL_PHONE permission (so that the user knows at install time that this app might place phone calls), and
the Web browser exposes some means to have you place a phone call directly, perhaps via some DOM extension or magic snippet of JavaScript
Few, if any, browsers will meet these criteria.
A hybrid application (e.g., PhoneGap) could do this, given the proper permission and some API to enable it (e.g., PhoneGap plugin, if it is not part of the standard PhoneGap API).
You will probably need to use apache cordova to get access to native device APIs, including the one you can dial with. Link to the respective plugin
This is obviosuly only possible on mobile devices, and this plugin can only operate on iOS and Android. For more information about cordova, see this Link.
I am developping an app for Ipad (2 and 3).
The app needs a continuous synchronization with a remote web app. Point is, my app needs to keep "listening" whenever there is connectivity in order to receive updates (lots of data), alerts,... etc.
PS: Before going further I would like to highlight that my app is not targeted to the appstore and moreover it can't rely on push notifications.
What I am confused about is the multitasking on the ipad. I would like my app's local db to stay synchronized by communicating with the remote web app. And hence my questions are:
Does any of the ipads have a real multitasking? (like android's where you can have "services") Meaning that my app or at least a small part of it would still operate even if it is not active on the screen.
How can I achieve that using phonegap standard framework?
If the above points show that at some extent it's not possible. Is there still a possibility to extend phonegap with a plugin and make this happen?
If the above three points are unfortunately fully negative; how would you address the problem by keeping in mind that the syncrhonization involves a lot of data and is mandatory to cover the app's usability?
Does any of the ipads have a real multitasking? (like android's where
you can have "services") Meaning that my app or at least a small part
of it would still operate even if it is not active on the screen.
IOS only has limited background services - in that your app goes into a background state when not active. Really only limited to receiving push notifications. As Phonegap uses a webview and javascript that is only active when the app is active in the foreground.
How can I achieve that using phonegap standard framework?
If you want to keep data connection open you might have to look at development of an application for a computer tablet, rather then an IOS device.
If the above points show that at some extent it's not possible. Is
there still a possibility to extend phonegap with a plugin and make
this happen?
No.
If the above three points are unfortunately fully negative; how would
you address the problem by keeping in mind that the syncrhonization
involves a lot of data and is mandatory to cover the app's usability?
You only option (if you can only use phonegap) is to have the app active all the time, and set a constant sync using Jquery & XML/JSON data. Of course this depends on what type of data you are going to show. For showing a page of data - similar to a webpage you won't have any problems - as long as you understand once you change apps that data won't be synced.
I would like my app's local db to stay synchronized by communicating with the remote web app.
If I were you, I'd be questioning why would I need to do that? Why not just make the app works online? You can have all the assets locally, and just setup some sort of API to retrieve whatever data you need to display on demand.
Otherwise, you'll need to hack your way through to do all the things you wanted, plus you need offline / online syncing. Since you have most data available offline, I assume the app also works offline? And you'll have a really bad time working on offline / online syncing...