Developing android app using ui5 in phonegap

System: Ubuntu 16.04

Requirements:
npm cli [sudo apt-get install npm]
phonegap cli [link]
gradle [link] I installed 4.1
Android Studio
UI5 SDK or runtime [link]

Step 1: Create a basic template

Make a project folder my-app
cd my-app
phonegap create
The above command will generate a boilerplate code for phonegap application.

Note: Following command can be used to serve the existing code in a web browser
phonegap serve
try opening the URL shown in console.

Step 2: Using ui5 libraries inside your website’s code

Code for your website is inside www/ folder, try opening and playing around.

Copy resources folder from your UI5 SDK/runtime to www/ folder. Now you can include ui5 libraries into your index.html

Step 3: Run your application as an android app

phonegap build
phonegap run android
The above command will produce the app code in platforms/android, open this folder inside Android Studio and run your application in whichever way you want, emulator or through USB debugging.

Boilerplate code for phonegap with ui5 is here.

Advertisements