Hello World

Hello World


To create a "Hello World" terminal commerce application, start by selecting Start a Verifone Commerce Project in the Commerce Applications/Android Studio welcome window.



From the two application types presented, select Terminal Commerce App to create your "Hello World" application.



Enter "Hello World" for the Application name under New Commerce Project.



When the user creates a new Verifone Terminal application or imports old application in Commerce Applications SDK through 'welcome screen' or 'File' menu, a pop up message will be displayed as the below image.



If user selects check box on the pop up, it will not be displayed again.
This feature enables a user to automatically replicate contents of one resolution to other resolutions, when auto selection mode is set ON.

Each application UI view is saved as a separate HTML page in the application project. Term "page" is used in this document for Terminal Commerce app UI views.

Open the Storyboard to design UI for your "Hello World" application. Click "New HTML File" to define the first pages. You can select a populated page template or a blank template.




Note: You can develop your application to support multiple display resolutions. While generating the HTML pages in the Storyboard, the tool auto-generates the pages for each selected display resolution. However, you can also design different app flow/UI displays for each resolution; it is not mandated to have the exact same app flow. The created set of files includes the HTML pages for each selected terminal display resolution.  

Transitions between the pages, as well as triggers to wake up the Terminal Commerce App, can be defined in the Storyboard. To define the transitions, move your mouse over a UI element and click when it's highlighted with a red rectangle. In the Properties window, you can define the target page of the transitions (newfile2.html in the example image). In the Data Parameters window, you can define parameters and their values to be transferred from the current page to the next page.  




In the Storyboard, you can also define a trigger to wake up the Terminal Commerce App. Open a window for the trigger definition by clicking on the Add Trigger button on the selected page. Select the Trigger from the first drop-down menu and, from the second Target drop-down menu, the HTML page from where the app execution will begin when this trigger takes place.

Where it says Type, select Application if the application start page includes a UI. For a headless application page (no UI), select Service.




After completing transitions between the pages, your "Hello World" application is ready to be tested. You will use the Simulator to test your app. (See chapter on Application Simulation.)