LOGO OBJECT SERVICE ANDROID APPLICATION SAMPLE Summary Logo Object Service can be easily used in mobile applications owing to its technology. The purpose of this document is to explain how to put a mobile application developed by using Logo Object Service into practice. LOGO Vertical Products and Solution Partners Team
INTRODUCTION Upon starting to use Logo Object Service application in 2.27.00.00 version and removing Internet Information Service, Web and Mobile applications can now be developed much more easier and faster. As you know, Logo Object Service provides crucial gains in terms of performance thanks to its multi-thread structure. We will discuss a sample Android application called Sipariş Cepte (Smart Order) which provides Logo Object Service and Logo ERP connection. We strongly think that it might give you new ideas and even inspire your solutions. Sipariş Cepte is only an example to integrated mobile applications to be developed. Graphic on the left summarizes how Logo Object Service of Logo ERP products works. As shown, Logo Object Service, acting as a bridge, creates a Logo Objects pool between Windows, Web and Mobile applications integrated with Logo ERP products. It is configured upon WCF technology of Logo Objects.NET. This ensures web service without performing any installation on IIS. In the following pages we will view Sipariş Cepte application which is developed by one of our associates, Uğur Ersoy in a very short time; and then we will cover how to apply this sample application within our own development environment under Preparing Work Environment. Finally we will highlight crucial points of this project under About Project.
SIPARIŞ CEPTE (A SAMPLE ANDROID APPLICATION) Sipariş Cepte is an Android application. It lists orders in Proposal status and displays selected order slip's content and updates the status of this order into Deliverable or Undeliverable. When started, it will connect to the service if you defined one previously. Then if you have orders in Proposal status, these orders will be displayed on your screen (phone or tablet) in a few seconds. If there isn't any service defined, no content is shown. In this case, you can make necessary settings required for Logo ERP connection by clicking Settings button located at the upper right corner of the screen.
Main screen shows information of orders in Proposal status. Order summary info such as slip number, slip date, AR/AP title, order amount, order status, salesperson code and total discount amount are displayed on main screen. In order to access slip details, you just need to click on order in the list. Order details screen shows stock items, discounts and promotions applied to and expenses incurred by the relevant stocks, and discounts applied to the slip in general. It displays slip amount exclusive of discount, total discount amount and amount after discount and VAT Inclusive net amount. When clicked / tapped on Approve, order changed in Deliverable status. If clicked / tapped on Cancel, order returns to Undeliverable status in ERP product.
In order to run Sipariş Cepte application, you need to make the following settings. Access Address: You need to enter only IP and port info of http service starting with http in Logo Object Service settings. (If default port will be used, Port info is not required.) Company No: You need to enter Company number defined by Logo Object Service. Security Code: You need to enter Security Code information defined in Logo Object Service. In order to run the application, your phone should be able to access to the relevant Logo Object Service. In our example above, mobile phone should be able to display http://172.16.51.72:8092/logoobjectservice?wsdl in internet browser application. If it cannot, it indicates that there is a problem in port routing or Firewall rights.
PREPARING WORK ENVIRONMENT 1 Logo Object Service Installation You can check service document for Logo Object Service installation. You can access to this document from the link provided in the third step. 2 JDK Installation In order to install or run the sample project, you first need to install the appropriate (x86 or x64) Java Development Kit from the following link. Then you need to restart your computer. http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 3 After downloading adt-bundle-windows-x86_64-20140702.rar file in the following link you can open it under any folder. ftp://cozumort:cozumort@download.logo.com.tr This zipped file contains adt-bundle-windows-x86_64-20140702 folder and sub folders under it. Eclipse folder contains Eclipse Juno on which development will be performed, and ws folder contains the sample project (OrdersInPackets). When eclipse.exe is run in Eclipse folder, a warning appears informing you that workspace setting is incorrect, as shown below. Click Browse button, and select ws folder. Then click OK.
After that project will attempt to open. However you will encounter an error message informing you that Android SDK cannot be found. Click Preferences button in this window. Click Browse button in Preferences window and select sdk folder in your work folder.
After selecting SDK, 2 projects named appcompat_v7 and OrdersInPackets must appear. After that project should be ready to use. Attention : Make sure that Developer Options > USB Debugging option is checked in your Android device. Now you can connect your Android phone. After connecting your phone and your phone is recognized by operating system, all you need to do is to select OrdersInPackets project and click Run button as shown in the picture. After that information about your phone will appear on screen. Select your phone and click OK. Screen lock must be open during this operation.
ABOUT PROJECT
WebServicesClientForTiger.java It is the java file containing all interactions performed with Logo Object Service. It contains the following methods: calllist : It indicates the method by which Order List is taken with ExecQuery. setlistfromxml : It is the method which handles XML file holding the query results returned by ExecQuery. getreadreportxml : This method is used for routing according to the information returned by query. readxmlfromtiger : This method removes tags of Logicalref data and returns as a string. updateorder : It performs approval phase; namely it handles the order with Logo Object Service - AppendDataObject method. The definitions of methods which will be used by Logo Object Service are also kept in this class.