Introduction
This sample demonstrates a simple and clean calculator app, which can be used in Android devices. It supports both generic and scientific calculator functions. You can change the color of the user interface of this calculator as preferred. You can find the source code of the calculator app in <APPM-HOME>/samples/mobileapps/CleanCalc/Source/
directory.
Prerequisites
Download WSO2 EMM, WSO2 MDM or any other MDM, and start the server with a port offset of one.
To set a port offset of 1 in WSO2 EMM or WSO2 MDM, change the value of the
<Offset>
element in<CDM_HOME>/repository/conf/carbon.xml
file as follows:<Offset>1</Offset>
Download WSO2 AppM, and start the server.
Executing the sample
Follow the steps below to execute the sample.
In this guide <PRODUCT_HOME>
refers to the directory of the product, if you built it by downloading the source.
Creating CleanCalc mobile application
You need to create a new mobile app to use the CleanCalc app as an enterprise Android application.
Uploading the application
Follow the steps below to upload the app.
Log in to App Manager publisher console using admin/admin as username and password.
Click Mobile Applications in the top menu.
Click Add New Mobile Application.
Enter
Android
for Platform andEnterprise
for Store Type as shown below.Download the CleanCalc.apk file, and save it in your computer.
If you have the source of the product downloaded, you can use the
<PRODUCT_HOME>/webapps/mobileapps/
CleanCalc/Resources/CleanCalc.apk
file.Click SELECT .APK FILE, and select the
CleanCalc.apk
file, which you downloaded above. When the file is selected you see the screen as shown below.Click Next.
Entering the application details
Follow the steps below to enter the details of the app.
- Enter
CleanCalc
for Title, and a preferred description about the app for Description. Download the banner.png image, and upload it for Banner.
If you have the source of the product downloaded, use the
<PRODUCT_HOME>/webapps/mobileapps/
CleanCalc/Resources/banner.png
image for the banner.Download the screen1.png, screen2.png, and screen3.png images, and upload them for Screen Shots.
If you have the source of the product downloaded, use the following images for the screenshots.
<PRODUCT_HOME>/webapps/mobileapps/CleanCalc/Resources/screen1.png
<PRODUCT_HOME>/webapps/mobileapps/CleanCalc/Resources/screen2.png
<PRODUCT_HOME>/webapps/mobileapps/CleanCalc/Resources/screen3.png
Download the icon.png image, and upload them for Icon file.
If you have the source of the product downloaded, use the
<PRODUCT_HOME>/webapps/mobileapps/
CleanCalc/Resources/icon.png
image for the icon file.Click Submit.
When the CleanCalc app is created in WSO2 App Manager, you see it in the list as shown below.
Click Submit for Review, click Approve, and then click Publish.
Using CleanCalc mobile application
By default, App Manager store is not connected to CDM. Therefore, it acts as a catalog. Follow the steps below to view it.
- Access the App Manager store using the following URL: https://localhost:9443/store/
- Log in to the store with admin/admin as username and password.
- Click on the published app to view it.
Integrating a Mobile Device Manager (MDM)
If you have already integrated WSO2 App Manager with WSO2 EMM, WSO2 MDM or any other MDM you can skip this section.
Follow the steps below to integrate WSO2 App Manager with a MDM.
Integrate a mobile device manager with WSO2 AppM. For instructions, see Integrating a Mobile Device Manager.
- Restart WSO2 App Manager.
Installing the mobile app
Follow the steps below to install the CleanCalc app on your mobile device.
Access the store using the following URL: https://localhost:9443/store/
- Click on the app. You view the app as shown below.
- Click Install.
- Select the device from the displayed list as shown below.
Now, the CleanCalc app will be provisioned to the selected mobile device.