What is HAWK?
HAWK is a set of development tools that provides authoring and content management features to:
- Write the application once in HTML, JS, XML, JAVA
- Manage different form factors and screen sizes
- Emulate the application on Windows-based computers
- Create application installers adapted to device specificities
How does it work?
Step 1. Develop
- In HAWK, click File/New/Project,
- in the New Project window, expand HAWK and click HAWK project,
- click Next,

- in the Project name field, enter barcode and click Finish,

- in the Project Explorer, expand barcode,
- right-click the WebContent folder and choose New/HTML file,

- in the file name field, enter barcode.html and click Finish.

The HTML file appears in the edition area.

Step 2. Code
- In the editor, code the HTML content including barcode API, HAWK javascript libraries and jQuery libraries:
<!DOCTYPE html>
<html>
<head>
<title>barcode</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css"/>
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<!-- custom script here -->
<script type="text/javascript" src="./js/hawk.js"></script>
<script type="text/javascript">
function notifyBarcodeScanSuccess(barcode)
{
document.forms["BarcodeForm"].elements["text"].value = barcode.text;
document.forms["BarcodeForm"].elements["type"].value = barcode.type;
alert("Barcode scanned!");
}
function notifyBarcodeScanFailure()
{
document.forms["BarcodeForm"].elements["text"].value = "";
document.forms["BarcodeForm"].elements["type"].value = "";
alert("Barcode scan failed.");
}
</script>
<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
</head>
<body>
<div data-role="page" data-theme="a">
<div data-role="header" data-position="fixed" data-theme="a">
<h1>barcode</h1>
</div>
<div data-role="content">
<input type="button" value="Scan barcode" onclick="javascript:deviceapis.barcode.scan(notifyBarcodeScanSuccess,notifyBarcodeScanFailure);" data-theme="c"/>
<ul data-role="listview" data-inset="true" data-dividertheme="b" data-theme="c">
<li>
<form name="BarcodeForm">
<div data-role="fieldcontain">
<label for="text">Text:</label>
<input type="text" name="text" id="text" readonly/>
</div>
<div data-role="fieldcontain">
<label for="type">Type:</label>
<input type="text" name="type" id="type" readonly/>
</div>
</form>
</li>
</ul>
</div>
</div>
</body>
</html>
-
save your changes.
Step 3. Configure your application
- Right-click the Barcode project folder and choose Settings,

- in the General tab, set the startpage URL: WebContent/barcode.html

- in the Application Installers tab, expand Master, click the Embedded files folder,
- in the Project files column, expand WebContent,
- click barcode.html and click Add,

Barcode.html appears in the Embedded files column. The embedded files are packaged with the application on the device. You have to embed-at least-the entry point to your application, index.html for instance.
- save your settings with Ctrl+S.
Step 4. Emulate the application
- Right-click the project folder and choose Run as/HAWK Emulation,

- select a device and click Run.

The barcode application emulates:

Step 5. Create an application installer
- Right-click the project folder and choose Create application installers,

- select device(s) and click Next,

- click Next and fill in the list of required properties,

- click Finish,
The deployment view appears.

- right-click the device name and click Open in Explorer,

The .apk or .app folder appears in your explorer.
Step 6. Install the application on a device
Install the application on Android and iOS devices
Install on an Android device
- Activate Bluetooth on the Android device
- activate Bluetooth on your PC,
- right-click the .apk file and choose Send to/Bluetooth device and choose the Android device,
- once the transfer is over, click the .apk file on your Android device in order to launch the application installation.
Install on an iOS device
- Go to http://www.diawi.com/,
- upload the application and its provisioning profile,
- open the link on the iOS device and click install.
Download HAWK Framework
Three downloads are available:
This software contains proprietary and confidential information, copyright notices and certain other intellectual property rights of Streamezzo, Amdocs and third party licensors (together, “Rights”), and its use must be respected under terms for such Rights.
Streamezzo hereby grants the user a personal, limited license to use the software for its own internal purposes. At no time will Amdocs be responsible for any claims or damage that may arise from the use or misuse of this product or content accessed through it.
This product may be changed, improved or updated without notice.
© 2012 Amdocs. All rights reserved.
Visit http://www.amdocs.com
![endif]>![if>![endif]>![if>