Skip to Content

Designing Mobile App User Interface and Running the App in Android Emulator

 

A Simple SUP Hybrid App to access Web Service: Part I

 

Next task is to design UI for mobile application.

 

  1. Right Click Project>New>Hybrid App Designer
    • Give some name to application i.e. Currency (extension should be .xbw)
    • select Can be started, on demand, from the client in the next screen.

9.PNG

 

 

 

2. By default, there is only one screen “Start”, add a new screen “CurrentRate

 

3. Go to screen design of Start screen,

    • Add 3 new edit boxes from the controls (right hand side) one by one and corresponding their keys
    • You may assign default values here itself i.e. USD for Source Currency

 

10.PNG

 

 

    • Add a new menu item “Get Value” to the start screen,
    • Under General tab, do these settings:
      • select Type as Online Request
      • respective MBO
      • select findByParameter object query under Invoke object query

 

11.PNG

    • Under Parameter mappingsmap keys respective to each parameter

 

11.PNG

    • After mapping, it should like this. save everything.

 

12.PNG

 

    • Under Success/Error tab, select newly created screen “CurrentRate” as Default success screen from the dropdown.

 

13.PNG

 

4.  Go to screen design of CurrentRate screen,

 

  • Add a new listview (from palette) to the CurrencyRate screen
  • Right click listview>properties>General
  • select CurrMBO key from the dropdown
  • Save all

 

 

14.PNG

 

  • Under Cell tab, Add 4 different Cell lines and corresponding its Fields

e.g. cell line 0 and its Field value as CurrMBO_SrcCurrency_attribKey

cell line 1 and its Field value as CurrMBO_TrgtCurrency_attribKey

cell line 2 and its Field value as CurrMBO_Prvdr_attribKey

cell line 3 and its Field value as CurrMBO_getCurrencyValueResult_attribKey

  • Save All      

 

15.PNG

 

5, Launch Android Emulator,

 

  • Before this, make sure you have registered a user in sybase control center
  • Provide all settings in HWC container and cross check if registered user has come online.

 

6. From the workspace, right click Currency.xbw, select Generate Hybrid App

 

 

16.PNG

 

7. In the Android Emulator you will see something like,

 

 

17.PNG

 

Same app is running fine in BlackeBerry simulator also:

 

18.PNG

 

Tried with other source currency and target currency values and getting a reasonable output.

20.PNG

 

 

I hope this blog would be helpful.

Your suggestion and comments are most welcome.

 

 

Rgrds,

Jitendra

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply