Hybrid Applications for Mobile Operating Systems Using AOS

0
210
Hybrid Applications for Mobile Operating Systems Using AOS

This article provides basic information about hybrid applications for mobile operating systems, using the Android operating system as an example. The main advantages and disadvantages, common features and differences of embedded and hybrid mobile applications, and the necessary elements of hybrid applications are considered.

Laptop, tablet computer, e-book, and smartphone – this is just an incomplete list of mobile devices that people use every day for work, study, communication, and recreation. However, these devices are usually controlled by their own separate operating system (OS) (iOS, Android, Windows Phone, BlackBerry, etc.). This creates certain inconveniences for the exchange of information between them through built-in applications.

To create an embedded mobile application for any OS, you need to study the programming language, as well as the SDK – software development kit – a specialized development package that takes into account the features of a particular mobile operating system. For example, to create an embedded mobile application for the Android operating system, you need to know the Java programming language and the Android SDK package. This condition imposes certain restrictions on developers who have to choose a certain direction for work.

The solution to this problem, on the one hand, can be considered the creation of web applications, this option is familiar to web developers who use HTML, PHP, and JavaScript in their work. In other words, this type of application is a web service on the Internet. To use it, the user needs to open a web browser on his mobile device, type the website address in the address bar, and start using the service. The above algorithm is often very inconvenient.

These two technologies have their advantages and disadvantages. Embedded applications are loaded once from the public application storage and, in the future, do not require an Internet connection, but, on the other hand, as mentioned above, the process of creating embedded applications for different mobile operating systems is a complex and time-consuming business. Web applications are cross-platform and require only a web browser and an Internet connection. On the other hand, such applications have significantly limited access to the internal resources of the device.

Hybrid mobile applications are a kind of solution. To create them, you need minimal knowledge of built-in mobile applications IOS and Android, as well as knowledge of web technologies. Hybrid applications, like web applications, are programmed using web technologies but are packaged as embedded applications. These mobile apps are distributed through public app stores, just like built-in ones. Unlike web applications, they have direct access to the resources of a mobile device, which makes them more functional.

PhoneGap

The most popular tool for mobile app developing hybrid mobile applications is the Phone Gap software platform. This free open-source framework for creating mobile applications allows you to create applications for mobile devices using JavaScript, HTML5 and CSS3, without the need to know the “native” programming languages ​​for all mobile operating systems. The Phone Gap engine extends the browser API and adds the following features: Access to the accelerometer, access to the camera, compass, contact list, recording and listening to audio files, provides access to the file system, allows you to work with various HTML5 local Storage, Web SQL and allows you to painlessly access any cross-domain address.

PhoneGap provides a set of JavaScript interfaces for accessing many device features not available from mobile Web browsers for typical Web applications. This is accomplished by using a Web application inside a built-in wrapper. Phone Gap combines Web application code with a device browser renderer to create a native application that can be deployed to an app store and installed on a device.

In addition, the basic functionality of Phone Gap can be extended by using additional plugins from a special repository. At the moment there is a set of plugins for four operating systems: iOS, Android, BlackBerry, and Palm.

In addition to the platform itself for mobile applications, Phone Gap provides access to its “cloud”, where you can build a project and download an executable file to your mobile device. To access the cloud, you need to register on the official Phone Gap Build website, and after that, the online program builder will become available. The advantage of this service is its general availability and a large library of other users’ developments with open source. On the other hand, this advantage is also a disadvantage. The fact is that only open source applications are available in the free version of the service, i.e. after building, your application code is published in the application library and becomes available to other developers as an open-source project. Building closed-source applications is available only in the paid version of the service.

Phone Gap is a framework that allows you to “redesign” a website with the help of professional logo designers and make it a conditionally embedded application. Through the use of built-in JavaScript interfaces, you can access many device features not available from mobile web browsers. Using the Phone Gap functionality, you can significantly expand the functionality of the web service, but it will still remain a resource on the Internet. In order for a web service to become a mobile application, it is also necessary to create a mobile interface, which will be part of the embedded application. There are a large number of frameworks for creating a mobile interface. One of these frameworks is Dojo.

Dojo

Dojo UI elements are packages made up of JavaScript, HTML, and CSS components. In fact, they are not “native” View-elements for Android applications, they are all the same web-elements but specially adapted and styled for mobile devices. Thus, the user has a complete feeling that he is working with a built-in mobile application.

Portions of the Dojo package can be used to add various interactivity to a site:

  • Menus, bookmarks, tooltips
  • Selectors of date, time, hours
  • Sortable tables, dynamic charts, vector 2D graphics
  • Elements of the “tree” interface, with drag-and-drop capabilities (nested sets, nested sets)
  • Rich Text Editor
  • Animated effects, and build your own

Therefore, Phone Gap adapts the site for a mobile device and makes it look like an embedded application using Dojo-interface elements, so the main element of the embedded part of an Android application will be Web view, that is, an embedded web browser in a simple mobile application. To create hybrid applications, an embedded part of it, developers of the Android mobile OS recommend using the Eclipse development environment.

As well as for a regular built-in application, for a hybrid one the standard Android Application project is used, in which, as an addition, the PhoneGap.jar library and a set of Dojo-scripts are included in the project as js-files as needed.

The difference from the standard project is the use of the loader () method in the main App.java file, which, in principle, makes the embedded application part of the hybrid, i.e. when the application starts, the web service is loaded, not the built-in Activity.

When developing hybrid applications, you first need to create a simple web application using web technologies, thoroughly debug and test it in a browser on a computer and then start adapting it for mobile devices by creating an embedded part of the application.

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here