Interested in building an app fast and easy? Then this is the place to be. Native apps take ages to create with some consuming hours which can lead to months before an app is completed and the app may still be unsuccessful, in addition coding can be very complex and might also require a huge investment on capital. However there is a solution! With cross platform applications, which can reuse the same of code, have the same design and developing made easy, PhoneGap is the best option.
Hot-Dog or legs is another app developed by David Smith using the same technology, and is a hilarious and entertaining game, in which players are required to differentiate between hotdogs or legs in various images. Sounds hilarious try it out and laugh your head off!
Other apps are available, from educational, to music discovery platforms or utilities, apps which utilize real world events, and Untappd captures my attention. Untappd was developed using PhoneGap app, and is available for all major platforms Android, Apple, Blackberry and Windows. It allows you to discover and enjoy new beers and bars near you, though am not sure if it has an option of giving you the route back home once you are drank. Maybe after reading this article you will develop this feature but remember the source of the idea once you become rich. Fingers crossed! The app also allows sharing of experiences, ratings and reviews and in addition has social media links which enables users to connect and interact. Brew manufacturing companies can use it to engage with their clients and evaluate customer trends.
Since you have an idea of what we are talking about let’s build a Phonegap App using WordPress backend.
This is a walk-through in which users can enter their credentials upon login, view and display WordPress Blog Posts. The procedure is flexible and can be used to create other apps of the same nature. WordPress, NodeJS and PhoneGap app are required, they are open source programs. NodeJS is a cross platform used for network applications, while WordPress is a web development application.
1. First we need to create REST APIs which are used to enable PhoneGap to communicate with WordPress. You may ask, what are REST APIs? REST abbreviates Representational State Transfer and in simple terms it is an architecture style used to provide guidelines for creation of web services that allows connection to networks and is also often used for mobile applications. While an Application Program Interface(API) is a set of tools, program instructions and protocols used to build and access software apps. Together Rest APIs can have various purposes including uploading , downloading data, exporting, among other purposes that interact with parse.
2. WordPress provides you the necessary tools to create REST APIs which can be used by any Hypertext Transfer Protocol(HTTP) client. REST APIs can be installed via a WordPress plugin or theme. A function called already_logged_in is executed if a user is logged in while making an Ajax request using PhoneGap and a session cookie is sent automatically to the server. Login function is executed if no user is logged in. A HTTP request is then sent and the REST API action is executed.
3. GET or POST REST APIs should be created using WordPress actions wp_ajax_ and wp_ajax_nopriv_ if the HTTP client making the request is logged in WordPress and a callback attached to wp_ajax_ and wp_ajax_nopriv_ are executed. I know all this jargon sounds very complicated, but try to follow and do it practically if possible, practice makes perfect.
If you already have a WordPress website or you are planning to get one, AppPresser plugin can be used to integrate PhoneGap API to your website easily and it offers various features used to create mobile apps. It also allows integration of themes and plugins for both offline and online apps, when updating your website the content is automatically updated to your apps.
That’s it, use these techniques and tools build apps, customize, compile and sell them in different app stores after packaging, which people will then download and use. The ball is now in your court, start simple and with time it will be easy to build more complex apps.