10 steps to develop SUP101 Android Native application [Part I]
A simple Android Native Application Development
- Under third party jar file, select .jar file from SDK path
- Open sybase mobile SDK. Go to Help Menu>Install New Software
- If you have ADT plugin setup on your machine, then you can do following:
- Click on Add
- Name: ADT
- Location: click on Archive go to the ADT Zip file location.
- Select both Developer tools and NDK plugins
- If you don’t have the setup file, it can be downloaded through internet.
- Just mention the path https://dl-ssl.google.com/android/eclipse/ for location.
- You may need to restart sybase workspace once installation completes.
- browse to the SDK path in SDK location.
- To build user interface, download SUP101 Android object API (2.2 SP02) example project from http://scn.sap.com/docs/DOC-8803
- Select File>New>Project
- then select Android>Android Application Project and then click Next
- give the package name as metioned below. then click next.
- At the last screen, Blank Activity mention below details and click on Finish.
7. Next task is to add compiler and library resources
- go to SUP_HOME\UnwiredPlatform\MobileSDK22\ObjectAPI\Android
- Copy armeabi folder, AfariaSLL.jar, ClientLib.jar, sup-client.jar, UltraLiteJN12.jar
- Paste above all files and folder to the SUP101Android>libs in sybase workspace
- Right click SUP101Android project in workspace, select properties>Jave Build Path>Libraries>Add JARs
- In the JAR Selection window, expand the SUP101Android\libs folder and select AfariaSSL.jar, ClientLib.jar, sup-client.jar, and UltraLiteJNI12.jar.
8. Copying Generated code Object API files:
- From the workspace navigator, under SUP101 project…. copy com folder in \Generated Code\Android\src\
- Paste this folder in the src directory of SUP101Android Project.
9. UI Creation:
- You must have downloaded SUP101 Android project from above mentioned link. Go to that path copy these jave files:
CustomerListAdapter.java, DetailActivity.java, and SUP101SampleActivity.java
- Expand SUP101Android, paste the copied java files, copying over any existing files to src\com\mycorp\sup101\android\app in WorkSpace navigator
- Open SUP101SampleActivity.java file and modify the host ip address (sup server machine address) and verify sup username and password.
- Again go to the Android project path (downloaded one), copy layout XML files: customer.xml, detail.xml, and main.xml
- Expand SUP101Android project in workspace navigator, go to res/layout, paste the copied XML files, copying over any existing files.
10. Launch the emulator by right clicking SUP101Android>Run As>Android Application
The application activation (on boarding) image indicates that the application is registering data from Unwired Server
- When the synchronization is done, this application shows the SUP101Android application with a list of customer data in a ListView control. You can scroll through the customer list to see more data and to make changes. The data loads from the database on demand.
I hope it will help you to understand basic flow of SUP native app on Android.
Your comments and suggestions are most welcome.