Converting from web to PhoneGap

I was going through the PhonGap Documentation about how to package your HTML/JS/CSS to a platform specific "native app". They have maintained separate documentations for the separate Cordova versions which seems fine.

I essentially understand most of the things there. But the confusion I have is the disparity or the loss of information in the documentation from the older ones to the newer ones. For an instance, if you take a look at this documentation for the version 2.1.0 about setting up the android project and scroll a bit down, they have mentioned such things:

  • In the root directory of your project, create two new directories:
    • /libs
    • assets/www
  • Copy cordova-2.0.0.js from your Cordova download earlier to
    assets/www
  • Copy cordova-2.0.0.jar from your Cordova download earlier to /libs

  • Copy xml folder from your Cordova download earlier to /res

….

  • Change the class’s extend from Activity to DroidGap
  • Replace the setContentView() line with
    super.loadUrl(“file:///android_asset/www/index.html”);

… and so on which clearly mentions the steps to follow while migrating or creating an app for a specific platform. But upwards from the version 2.1.0, these information are missing.

Like in the newer documentations, all they have is just the regular android setup stuffs and android hello world which we can obviously find on the official android documentation. I tried searching the whole documentation for that version and I could not find any information regarding the steps I mentioned above in the older documentation.

Otherwise how are the readers supposed to know those steps? Am I missing something here or have they provided?

PhoneGap is constantly being improved upon, and one aspect of the platform that has continued to see development is initializing a project. As new versions are released, there have been steps taken to automate and make this process easier.

In PhoneGap 2.1.0, as you’ve noted, it appears as if none of the initialization process was automated. The documentation that you linked to describes the steps to set up a native Android project. The developer is then instructed, as you described, to modify this project manually, adding the source files, libraries, and folder structure necessary for PhoneGap to function.

The PhoneGap version that I’m most familiar with is 2.5.0. The getting started guide for this version can be found here. In 2.5.0, the developer is directed to navigate to a specific directory in their Cordova distribution and run a script from the command line. This script takes arguments relating to where your project will live and some other metadata about it, then creates the native project for you and performs the aforementioned steps of creating the PhoneGap specific project structure and adding the source files. In addition, it starts you off with a test application, which you can examine and run to start you off, basically their version of “Hello World”.

I haven’t had the opportunity to use PhoneGap 3.0.0 yet, but it appears as though they’ve made our lives as developers even easier by moving the bootstrap process from a script to a program installed using node.js’ npm. The usage is mostly the same as 2.5.0, where you pass the metadata about the program you’re developing to the script, but now you can run it from anywhere, instead of needing to find the script deep in your downloaded cordova files. I suspect this process will result in something similar to 2.5.0, where the entire project structure is created for you, including relevant PhoneGap source files, with a helpful “Hello World” type program to get you started.

So, in summation, these parts of the documentation that you describe have been removed because PhoneGap has automated their bootstrap process and now does all this work for you!

If you’re interested in seeing some of the further differences between versions of PhoneGap, you can view or download their project, including the documentation, on github. They tag each version increase, so you can revert to one of the tagged commits to go through and see everything that’s different in the source code and docs from release to release.

4

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật