Using Google Maps API with PhoneGap - javascript

I'm looking to design an app for use on both iOS & Android. It will have a few tabs, with one tab dedicated to navigation. I'm hoping to use the Google Maps API to run the map, which will include basic mapping features such as route planning.
I've done some research into PhoneGap and from what I can gather I can use web technologies (HTML, Javascript etc.), in which I already have a proficiency, to build the app, which I can then package into an iOS and/or Android app.
So if I went ahead with using phone gap, could I use the Google Maps Javascript API to build the navigation part of the app and then use PhoneGap to package it into an iOS/Android application?

The beauty of cordova is that you always have good plugins which are relatively simple to install and use.One of the plugins available for using google map in cordova apps is given below
https://github.com/mapsplugin/cordova-plugin-googlemaps
However you can also go ahead using the Google maps javascript API in cordova to build the navigation part of your application. I recently used this in my cordova app and it worked very well. I have used the features of Google maps like navigation, adding custom markers, place auto complete etc.

Related

Is it possible to add javascript functions to an embedded webmap?

I have creatd a webmap on ArcGis online.
The embedded map is in an iframe.
I am using HTML and Javascript to develop something whith Phonegap.
Does ArcGis have a JS API similar to GoogleMap?
yes it's perfectly possible and fully documented in their api
you can find the full docs here
There is also this repo on github with a phonegap/arcgis starter set up
It is possible.
Use the ArcGis API https://developers.arcgis.com/javascript/ instead of the GoogleMaps API.
If your project targets Phonegap, it is even more easy: https://github.com/Esri/quickstart-map-phonegap
A set of simple samples that show how to get started with the ArcGIS API for JavaScript and PhoneGap/Cordova. These samples provide best practices for using PhoneGap and Cordova across different device operating systems and within the PhoneGap/Cordova application lifecycle.

Change device profile using phonegap / cordova

Iam using PhoneGap/Cordova + Backbone for developing a cross platform mobile application. Using phonegap i can access almost all the functions of the device. Is there somehow possible to access or change the device's profile using PhoneGap or using backbone ? I searched a lot but couldn't find any relevant results..!!
Is there any documentation available on this ?
Any help will be very much appreciated..!!
I didnt get what you means about "device's profile". You talking about accounts?
About Phonegap/Cordova you can do everything that a native app can. But sometimes you need to write a native plugin to interact with device. I already had to do that to do push notifications using a third lib.
You write a native class to do something, register it in plugins, give permissions and then call it with your javascript.
You can find documentation here: http://cordova.apache.org/docs/en/3.4.0/guide_hybrid_plugins_index.md.html#Plugin%20Development%20Guide
Add this cordova plugin into your project.
https://github.com/apache/cordova-plugin-device
Put these line of codes into your view page
alert(device.cordova);
alert(device.model);
alert(device.name);
alert(device.platform);
alert(device.uuid);
alert(device.version);

How to integrate ads into a hybrid application

I have a hybrid applicaion developed with Telerik. Unfortunately, I cannot figure out how to add banner ads to the app. I've researched everywhere and I cannot find a solution. Does anyone know of an html5 or javascript banner advertising service/API that would be compatible with a Telerik applicaion?
AdSense will not allow their ads to be in an application, as they want devs to use AdMob, which is only compatible for native applications.
Sorry I have never used Telerik. But I used to integrate ads (inmobi) into my hybrid app using Monaca. I found a step-by-step demo for this integration in the link below:
http://docs.monaca.mobi/en/sampleapp/tips/inmobi/
I hope you can use it as a reference. Cheer.
Update: The above link is removed. So, I added the new link for How to integrate AdMob into Cordova app.

What's the difference between the app based on backbone.js/ember.js and the one based on Phonegap/Sencha Touch?

As mobile web app gets more and more prevailing, a lot of tools become available for developing mobile web app. In my opinion(I don't know if it's correct), there are two ways to develop mobile web app.
One way is to use some javascript framework such as backbone.js and ember.js combined with some other libraries such as Zepto and iScroll to do this. The other way is to use some integerated toolkit such as PhoneGap and Sencha Touch to write the whole thing. What I want to know is what's the difference between these two ways? How should I choose between these two ways?
Phonegap is a wrapper framework which helps html/javascript app to run in a native container and give a medium to execute a native code whereever required. Phonegap is not integrated with Sencha Touch, you can use it with any client-size javascript frameworks like backbonejs, amberjs, jquery, jquery mobile, etc. Application built using Phonegap comes under hybrid application category.
Please check some of this preps to get more info:
http://www.slideshare.net/macdonst/building-native-mobile-applications-with-phonegap
http://www.slideshare.net/kurotanshi/jsdctw-introduction-to-phonegap

Creating and using iOS settings.bundle values with JavaScript in PhoneGap

Is it possible to create a section in the iPhone settings app, using PhoneGap (v1.4.1)?
I cannot find anything pertinent in the PhoneGap API.
My aim would be to use the user-set values in JavaScript.
I imagine that if PhoneGap does not currently have this functionality, it is possible to perform this task with a PhoneGap plugin.
Does anyone know of a current plugin that might enable Settings.bundle creation, and reading?
you can use applicationPreferences plugin https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/ApplicationPreferences

Categories