From the File menu select New > Project....

The New Project wizard is displayed. Select iDigi Android Project within the Android folder and click Next to start the wizard.

Enter a name for your project into the Project name field, for example UploadFile. Then, select the Android API Level (version) to use for the project.

|
The name of the project must be unique in the workspace. If there is already a project with the same name inside the workspace, the wizard displays a message and will not continue until a different name is used. |
Optionally you can also change the Package name and Activity name for the project.
Click Finish to create the project.
When the project is created, it is displayed in the Package Explorer view. Expand it to see its contents.

|
You have just learned how to create a new iDigi Android project. |
Open the main activity file of the project to start editing it. The file is located under the src/<package name> folder of the project.

Double-click the file to open it in the main editor.
Replace the following lines:
|
// TODO: write your application code here: |
With this one:
|
iDigiServiceManager.sendTextFile("myFile.txt", "iDigi is easy!"); |
This line of code is sending a text file to iDigi called myFile.txt containing the iDigi is easy! text. This text is sent when the application is started.
The file should now appear as follows:
Save the file and build the project. To do so, select the project from the Package Explorer view, right-click on it and select the Build Project option from the context menu.

|
If you do not see the Build option in the context menu, go to the Project menu and disable the Build Automatically option. Then try again.
|
Before launching the application in the embedded device, you must ensure it is connected with the . To do so, click the Device Manager button from the Workbench's main toolbar:

Select the configuration you created previously. If the Debug Connection Status displays Disconnected, click the Connect button.
Once the device is connected with the , you can close the dialog and continue with the launch process.
The last step in this process is to launch the iDigi project. To do so, select the project from the Package Explorer view, right click on it and select the Run As > Android Application option from the context menu.
|
In the future, you can launch your project by clicking the Run button from the main toolbar.
|
This action will transfer and launch the iDigi Android application in your embedded device.
It is very important that the iDigi Connector for Android is running before you launch the application. You will know that iDigi is running if the iDigi logo is displayed in the status bar.
Once the application is launched, the embedded device will display its main activity:
If iDigi was already running before you launched the application, you can continue with the next step, .
In this case, the service was not running as the logo is not displayed, so it is necessary to start the iDigi Connector for Android and execute the application again. To do so follow these steps:
|
You have just learned how to launch an iDigi Android application project. |
|
Prev. Step |
Home |
Next Step |