There has been an exponential rise in the purchase of android devices. With this growth of android devices, the demand for the apps is constantly increasing.
What are hybrid apps?
Android Studio is an easy to use Integrated Development Environment (IDE) that is used to develop android and hybrid apps. One can develop hybrid apps by following these simple steps:-
Design your Application
The first baby step towards building hybrid apps is designing your project. Before you start the development process, it is advisable to make sure that you have all the pre-requisites of the development process.
It is essential to have access to the features available in the browser if you are creating a pure HTML5 application. Make sure that you have all the pre-requisites in place. For example make Cordova CLI and the android SDK tools ready before going into the development phase. You will have to install Node.js before installing Cordova CLI.
Now, to install Cordova CLI, run the following commands
sudo npm install -g cordova
The next step is to download the Android SDK tools which you can download by clicking the following link…
HTML5 Mobile Framework Application
Testing Application through Browser
HTML5 comes with an advantage that you can test the application through your local server browser. You can easily access your application by going through the following URL replacing MyHybridApp with the name of your app
If you are a chrome user, then you have added advantages. For example you can use Chrome DevTools to debug your application. You can even check the responsiveness of the app by clicking of the mobile icon on the top left side of the debugging page.
You can debug your application by inspecting the elements and using features like console, Network, source, application etc.
Packaging the application
To package the application, you will have to use third party applications like Xamarin and PhoneGap. Now, what these third party applications do is – they package the application in a native wrapper which acts as a bridge between the native API and your app. The application is loaded into the web view by the third party applications like PhoneGap. And this web view displays the application to the users.
Now, after the packaging of the application is done, we can generate a release version of the APK
Cordova build –release
When we have generated a release version, you can find your apk in the following location platforms/android/ant-build/MyHybridApp-release-unsigned.apk
To submit the apk in the app store, simply sign in and submit it.
The Testing Process
We know that we can test and debug our application using the chrome DevTools like console, Network, sources, application etc. But do you know that you can debug the application without using chrome development tools? We will have to run the application on actual device to test the hybrid app using native API.
One of the options on phone to debug app is GapDebug. By using this Gap Debug you can install .ipa files for IOS or .apk for android. It provides a debugging interface in which any kind of change in the interface will reflect the change in the application.
Before you can launch the application on the play store, you will need to sign your application on app store. The pre-requisite for signing your application on the play store is to generate a keystore.
To create a keystore, one can use Java Keytool utility. This utility already comes with the standard JDK distribution and can be located at %JAVA_HOME%\bin. In windows, this can be found at C:\Program Files\Java\jre7\bin.
After creating a keystore, you can easily sign in and users can install the uploaded app on the play store.