Monday, 25 June 2018

Create Oracle JET Hybrid Mobile Application

In this blog, I will explain the steps involved in creating a hybrid mobile app using Oracle JET

Follow the below steps to get started :

1) Install Node.js on your development machine. Download from here https://nodejs.org/en.After installation, you should be able to run npm commands.
2) Run cmd as Administrator and then run the below commands to install various modules via npm :

There are two ways to create Oracle JET Hybrid mobile application

(i) For ojet 4.1 or later use the below steps:

You can just install  oracle-jet cli and Cordova to get started

npm install -g @oracle/ojet-cli cordova

@oracle-jet cli contains the oraclejet generator, so there is no need to install it separately. Also to install a specific version of the oracle jet-cli use @version

eg.
npm install -g @oracle/ojet-cli@5.0.0 cordova

You can build and serve your app using ojet command-

Build JET  app for android:
ojet build android

Serve JET  app for android:
ojet serve android
  
    
(ii) For ojet 2.0 use the below steps: 

    a. Install Yeoman :  

        npm install -g yo

Enter npm list –g yo to verify that the command succeeded. If the package isn’t listed, scroll through the install command output to locate the source of the failure.

    bInstall Grunt :  

        npm install -g grunt-cli

    cInstall Bower :  

        npm install -g bower

           dInstall Cordova  :  

        npm install -g cordova

    e. Install generator-oraclejet


               npm install -g generator-oraclejet

Note:  you can check the above installed packages and their versions using  
                                                                

                                                                      npm list -g --depth=0



3) Install Mobile tooling to deploy, debug on devices

Install Android Tools
To develop applications for the Android platform, you must install the Android SDK and create Android Virtual Devices (AVDs) so that you can run your app in the Android emulator. 

Use Cordova’s Android Platform Guide to install the Android tools on your machine.

Install iOS Tools

Use Cordova’s iOS Platform Guide, install Xcode and the iOS Simulator on your IOS machine. This step is sufficient for developing iOS applications and testing it.

Create a simple hybrid mobile project using ojet command
ojet create myHybridApp --hybrid --appid="com.oracle.myApp" --appname="MyHybridApp" --platforms=ios,android --template=navdrawer

You can build and serve your app using ojet command-

Build JET  app for the Android platform:
ojet build android

Serve JET  app for android platform:
ojet serve android


3 comments:

  1. Great post! I am actually getting ready to across this information, It's very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    Mobile App Development Company in Dubai
    Android App Development Company in Dubai

    ReplyDelete
  2. Wow, excellent post. I'd like to draft like this too - taking time and real hard work to make a great article. This post has encouraged me to write some posts that I am going to write soon. website

    ReplyDelete

Thanks for the comments. I`ll get back to you shortly.

Regards
Tushar