Appspresso Plug-in Development Kit
1. Requirements
2. Install – Refer to Getting Started
3. Create new Appspresso Plugin Project
A. Select [File] > [New] > [Appspresso Plugin]
Enter the project name, ID of Plugin, version, etc.
Select the iOS Module.
Designate the project name of the iOS module of the Plugin and location.
Enter the class name and version of the iOS module.
Confirm the information of the project that will be produced.
B. Create Plugin Meta Information File (axplugin.xml)
C. Create Javascript Code
In the first parameter of ax.plugin method, enter the ID of the Plugin.
D. Create Objective-C Code
4. Run Application
A. Create Appspresso Application project that will use the Plugin (refer to the Getting Started document)
B. Add the Plugin
B.i. Select the Add Plugin Project.
(In case of adding axp files, select the Add Plugin File.)
B.ii. Select the Plug in (EchoPlugin) that you want to add.
C. Create the HTML file.
<!DOCTYPE html> <html> <head> <script type="text/javascript" src="/appspresso/appspresso.js"></script> <meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script> //activate ax.log(), comment out when you release app ax.runMode = ax.MODE_DEBUG; function errback(err) { alert(err.code + " : " + err.message); } function echoAsync() { myplugin.echoAsync( function(message) { alert(message); }, errback, "call myplugin.echoAsync()"); } function echoSync() { var message = myplugin.echoSync("call myplugin.echoSync()"); alert(message); } </script> </head> <body> <h1>Hello World</h1> <h3>com.axexample.echoapp</h3> <button onclick="echoAsync();">EchoAsync</button> <br> <button onclick="echoSync();">EchoSync</button> </body> </html>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="/appspresso/appspresso.js"></script>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
//activate ax.log(), comment out when you release app
ax.runMode = ax.MODE_DEBUG;
function errback(err) {
alert(err.code + " : " + err.message);
}
function echoAsync() {
myplugin.echoAsync(
function(message) {
alert(message);
}, errback, "call myplugin.echoAsync()");
}
function echoSync() {
var message = myplugin.echoSync("call myplugin.echoSync()");
alert(message);
}
</script>
</head>
<body>
<h1>Hello World</h1>
<h3>com.axexample.echoapp</h3>
<button onclick="echoAsync();">EchoAsync</button>
<br>
<button onclick="echoSync();">EchoSync</button>
</body>
</html>
D. Run Application
5. Export
A. Select File] – [Export] – [Appspresso Plugin (axp file)].
B. Designate the path where the exported Appspresso Plugin Project and axp file will be created..
2. Install – Refer to Getting Started
A. Install the ADT Plugin for Eclipse
3. Creating new Appspresso Plugin
A. Select [File] > [New] > [Appspresso Plugin Project]
Enter project name, ID of Plugin, version, etc.
Select the Android Module.
Designate the project name and location of the Android Module of Plugin.
Enter the class name and version of the Android module.
Confirm the information of the project that will be produced.
B. Create the Plugin Meta Information File (axplugin.xml)
C. Create Javascript Code
In the first parameter of ax.plugin method, enter the ID of the Plugin.
D. Create Java code
4. Run Application
A. Create Appspresso Application project that will use the Plugin ( Refer to the Getting Started document).
B. Add Plugin
Select the B.i. Add Plugin Project.
(In case of adding axp files, select the Add Plugin File.)
B.ii. Select the Plugin (EchoPlugin) that you want to add.
C. Create the HTML file.
<!DOCTYPE html> <html> <head> <script type="text/javascript" src="/appspresso/appspresso.js"></script> <meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script> //activate ax.log(), comment out when you release app ax.runMode = ax.MODE_DEBUG; function errback(err) { alert(err.code + " : " + err.message); } function echoAsync() { myplugin.echoAsync( function(message) { alert(message); }, errback, "call myplugin.echoAsync()"); } function echoSync() { var message = myplugin.echoSync("call myplugin.echoSync()"); alert(message); } </script> </head> <body> <h1>Hello World</h1> <h3>com.axexample.echoapp</h3> <button onclick="echoAsync();">EchoAsync</button> <br> <button onclick="echoSync();">EchoSync</button> </body> </html>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="/appspresso/appspresso.js"></script>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
//activate ax.log(), comment out when you release app
ax.runMode = ax.MODE_DEBUG;
function errback(err) {
alert(err.code + " : " + err.message);
}
function echoAsync() {
myplugin.echoAsync(
function(message) {
alert(message);
}, errback, "call myplugin.echoAsync()");
}
function echoSync() {
var message = myplugin.echoSync("call myplugin.echoSync()");
alert(message);
}
</script>
</head>
<body>
<h1>Hello World</h1>
<h3>com.axexample.echoapp</h3>
<button onclick="echoAsync();">EchoAsync</button>
<br>
<button onclick="echoSync();">EchoSync</button>
</body>
</html>
D. Run Application
5. Export
A. Select the [File] – [Export] – [Appspresso Plugin Archive File(.axp)].
B. Designate the path where the exported Appspresso Plugin Project and axp file will be created.





























