An HTML Boilerplate for Phonegap

  • 1
  • Idea
  • Updated 5 years ago
  • Not Planned
Hey All,
Tonight I'm releasing my HTML5 boilerplate for Phonegap on to github.com. For those unfamiliar with Phonegap, using HTML5, CSS3, and Javascript you can create a mobile App. This boilerplate supports Android and iOS; it is intended for Phonegap Build. The boilerplate contains 3 important components.

# index.html
# AndroidManifest.xml
# config.xml

Details available available on my blog.

BLOG: http://codesnippets.altervista.org/blog/2015/BLOG.2015-06-10.jssnippets.html
BLOG: https://jssnippets.wordpress.com/2015...
CODE: https://github.com/jessemonroy650/Phonegap--Generic-Boilerplate
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes

Posted 5 years ago

  • 1
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Hi Jesse,
What is the AndroidManifest.xml for? PGB only requires index.html and config.xml, right?
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Yes, but....PGB generates an AndroidManifest.xml. The contents can partly be changed and/or extended through the config-file element in config.xml.
But....PGB users should not include an AndroidManifest.xml file in their assets, should they?
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Petra, users are not required to use AndroidManifest.xml for sometime now, but you can use it to add features not easily available in config.xml. Such as, show all views in landscape mode, or hide the keyboard always (although you could do this with CSS now).
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Hi Jesse,
I would like to understand this a bit better.
If Phonegap Build generates the AndroidManifest.xml (and info.plist for that matter) from the specifications in config.xml, what would happen with such files if included in your assets?
Are they ignored? Merged? Or do they even prevent PGB from generating them?

The features you mentioned should not be specified in AndroidManifest, but rather in config.xml, because otherwise they would only be set for Android (if PGB takes specifications from AndroidManifest supplied in the assets) and not for iOS and WinPhone.
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Petra, The two (2) xml files are merged. I do NOT know how, nor the sequence, nor the order. I only know it works. It is a blackbox till I get to ask the phonegap people (in person) how it works. (Yes, I will be at a conference).

As for iOS, Windows, etc., currently I own one (1) iOS device. I have just started to lean how the Info.plist works. I will try more stuff, as I need it. Recently, I helped someone with a screenOrientation issue. But I only know what I have read, I have NOT test this yet.
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
It is a blackbox till I get to ask the phonegap people (in person) how it works.

Well, let's do that right here and now. I'll start a new thread.
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
Hi Jesse

Are you refering to PhoneGap CLI or PhoneGap Build?
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
Sorry, I put that in the fourth sentence - near the end. That blog post was a last minute thing and I just wanted to get it out. Usually when I do a post like that it get cross-posted heavily. So, I don't get a chance to customize for all parties.

However, since my main target is Phonegap Build. I'll try to move it up.

thanks for the note, I'll improve it next time.
If you can change the Subject, I'd apppreciate it.

Jesse