Basic tips for Beginners on use of Phonegap

  • 1
  • Question
  • Updated 4 years ago
  • Answered
Hello guys,
I am totally new to Phonegap. I want to build Android apps using phonegap.
Its a plaform to build Andiod/ios/Windows apps, this is the only thing which I know about this.

On website, its mentioned that we can buil apps using HTML, CSS or JavaScript. But I was thinking of Android programming language to build the app.

I am bit confuse about the language to be used for building the apps.

Please help me out guys.
Photo of Vivek Gawari

Vivek Gawari

  • 3 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 1
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Sure, you can develop Android apps using the Android SDK, Java and Eclipse (for instance). If you like to do that, you won't need Phonegap.
Tutorial: https://developer.android.com/trainin...

Phonegap uses a subset of the Android views: only the Webview. Apps can be created from 'mobile websites' (HTML5) plus specific plugins that allow hardware functionality to be used. For many developers, coming from web development environments, this approach enables them to create apps without a steep learning curve AND without having to code for several OSs separately.
Photo of ismael jimoh

ismael jimoh

  • 4116 Posts
  • 192 Reply Likes
Hi Vivek,

As Petra mentioned, PhoneGap let's you write your code in HTML, CSS, JavaScript and translates/bridges it to Native.

Hence you can use this to Build for Multiple platforms writing just one code.

If however you intend to write your code in the various Native Code, then PhoneGap isn't the way to go.

The link he provided should help with Android.

Here's a link to help with Windows Phone.

Here's one for iOS also reference Apples official instructions.

Hope it helps.
Photo of Vivek Gawari

Vivek Gawari

  • 3 Posts
  • 0 Reply Likes
Thanks Petra and Ismael for giving me such a nice clarification.

I understood that we can code our UI and Business logic in HTML, CSS, JavaScript; and then Phonegap will translate it into native code (in my case, android).

And I have heard one thing that using Java (or native code) it takes 4-5 months to build an app, but using Phonegap this can be achieved in just 15-20 days.
Is it really true ?

Ohk , I've decided to go with Phonegap only, to build Android mobile apps.

What are the starting steps to create my 1st app.

(P.S. - I am brand new to Mobile app development and not very good in web technologies like html5, js and css - I know th basic syntax of HTML, and I am good in Core Java)

If you have any suggestion, then please do the needful.

Please, I need your guidance.
Photo of ismael jimoh

ismael jimoh

  • 4116 Posts
  • 192 Reply Likes
Hi Vicek,

In regards "And I have heard one thing that using Java (or native code) it takes 4-5 months to build an app, but using Phonegap this can be achieved in just 15-20 days. 
Is it really true"

This is true due to to the ease of picking up HTML, JavaScript and CSS, however if you are very good and used to Java, you can always meet the 15 - 20 day time frame also.

Here are some useful resources for understanding HTML, JavaScript and CSS:


Getting started with PhoneGap:

Have a look at our documentation, this is just for understanding the various API though recommend having a look at the whole documentation.

Have a look at our PhoneGap Build documentation for understanding PhoneGap Build configuration mainly.

If you have any questions, feel free to ask here, we'll be happy to help.

(Edited)
Photo of Vivek Gawari

Vivek Gawari

  • 3 Posts
  • 0 Reply Likes
Thank u so much Ismael

And yes, You are gonna help me further ;)

Really thanks.

Please keep in touch. :)
Photo of ismael jimoh

ismael jimoh

  • 4116 Posts
  • 192 Reply Likes
Sure.
Photo of John Weidner

John Weidner, Champion

  • 435 Posts
  • 80 Reply Likes
Start by writing a single page html app using html, css, and javascript. Use javascript to dynamically update the page for displaying other views. Test your app using Chrome. Once you have some of your basic app working, add a config.xml file for Phone Gap Build. Zip up all the contents and submit the zip file to Phone Gap Build. Then test the app on a real mobile device.
Photo of David Ramsey

David Ramsey

  • 1 Post
  • 0 Reply Likes
how do you test it on a mobile device? I have done all the above?
DMR
Photo of John Weidner

John Weidner, Champion

  • 435 Posts
  • 80 Reply Likes
Are you testing on an iOS device or Android device? I think the next step is to generate your signing keys. (This seems quite complicated for iOS but fairly trivial for Android.) Once you have your keys created and imported into PhoneGap Build, then you can build the .ipa file for iOS and .apk file for Android. The .apk file you can install onto an android device by scanning the QR code that PhoneGap displays. I'm not sure if you can just scan the QR code on iOS or not. I usually download the .ipa file and then upload it to TestFlight and send it to multiple testers at the same time.
Photo of ismael jimoh

ismael jimoh

  • 4116 Posts
  • 192 Reply Likes
Hi David,

As mentioned by John,  for iOS and Android after building, you can use a barcode scanner to scan the QR code(recommend Bakodo for iOS or Google Goggle for android).

For Windows Phone, you need to download the .xap file and install directly to device using Application Deployment program that comes with Visual Studio for Windows Phone.

Hope that helps.
Photo of Chris Griffith

Chris Griffith, Champion

  • 347 Posts
  • 92 Reply Likes
Here are some resources that might be helpful as well:
Apache Cordova 3 Programming by John M. Wargo

I gave an talk "CREATING APP STORE READY APPS WITH PHONEGAP" that you can view for free at: http://experts.adobeconnect.com/p2uhl...

I also just released my first course of lynda.com, “Up and Running with PhoneGap Build“ This course does require a subscription. http://www.lynda.com/Creative-Cloud-t...
Photo of Koushik Dutta

Koushik Dutta

  • 2 Posts
  • 0 Reply Likes
do u guys have any tutorials about phonegap,no android, no ios include... only Phonegap from scratch to advance..
Thanking you,
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
You could read the Faq and the Docs, see links in top bar.
However, I feel that you want a tutorial about how to develop hybrid applications. That's not what Phonegap does!
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Koushik

I have more links, not just videos. Let know what else you are looking for.

Like: An HTML Boilerplate for Phonegap
and
Explanation of PhoneGap/Cordova for the layman (Steve Husting)

Jesse