Home

SFANDROID

image

Contents

1. aaa 2013 08 22 08 26 12 e Time plication ag ext OR ET org appd base 7 US ZZ 00 29 43 149 785 785 org appa base aatVikvm neap Grow nec See ener D 08 22 00 29 43 220 785 787 org d base dalvik GC_CONCL TR spay 7 dii 2013 08 22 08 26 40 20 2013 08 22 08 27 53 D 08 22 00 29 43 220 785 797 org appd base dalvikvm WAIT_FOF So daa ail Waal gene ee The screen shows the break line stopping the 5554 Samsung E execution of the code As a Java developer fa z a Eey r SF Android CANCEL NEXT M AAA miliar with Eclipse you should know how to CONNECTION LOGIN ROLE proceed by using the step into step over but tons at the top of the Eclipse panel At this juncture we have proven that everything we Password wanted is working well From this point on Save Pass wards the battle is nearly over We have automatic visit Closing reached a complete proof of concept of the 209s SF Android project that everything associated with it does work server side ERP setup and model web services and now this mobile app The final leg now will be the full cycle of this mobile app transmitting a request to the web services to get into the ERP server and trans mitting back a response to operate the ERP on the mobile phone This is what we will expect onwards in this exercise Right you can see the first 7a gmenc tab CONNECTION in action This emulation debugging allows you t
2. Tap on the lower line to get inside that location You will then see the tables already existing inside SFAndroid database You can then tap into any of them to view their records Note the SQL button on the top left of the tables You can run SQL scripts such as clear the tables or search for any records according to a certain filter criteria Fa SQLite Manager C_BPartner 1003240 213463 213463 BIANCA 1000973 PE1155 PE1155 DIS BIAO 11395 1002047 199408 199408 VENTAS AGRICOLAS PENAS 0 6615 1002051 477293 477293 DIS MERCADO DE ABASTOS 0 0 1001370 287261 287261 MINIMARKET XTRA 450000 306794 1002192 N18388 N18388 DIS LOS AMIGOS 0 0 1001903 200976 200976 CONCEPCION HIDALGO 3000 9323 5 1002674 412213 412213 DIS FELIX 0 0 1000980 108787 108787 VENTAS GRAN AEROPUERTO 3500 2390 4 1002673 E89212 E89212 DEP SITO EL GATO 0 0 1002050 830419 830419 SANDRA 3000 2094 1001897 N20411 N20411 MAX LA CASA 0 0 1001977 308152 308152 MR CARNES 25000 48254 1001898 883315 883315 MINIMARKET LA GENEROSA 0 0 Copyleft 2015 Redhuan D Oon SYSNOVA Page 59 of 62 Sales Force Android 1 8 Senth Parada SFAndroid Meta Menu You probably know by the now the concept of Application Dictionary or Peers nificaci n de Visita AD and the story of using meta data to pe te Planificacion del Dis define an application structure As I Clientes Muestra una lista de los Clientes asignados a la Ruta asserted early on this SFAndroid is a Cobranza Actual m
3. Frequency of Visit Customer Inventory Planning Visit gt Reports Vendor Management Planning Visit Sales Rep If you open up some of the items in the Sales Planning menu you will see basic data is al ready present The ERP side is for central management to derive reports and thus the Re ports menu of Vendor Management and Planning Visit Sales Rep is aimed at We will not be explaining this vertical use in exhaustive detail as this document is more of a technical guide Contribution of further document in the form of a user manual to show how this vertical fully operates is appreciated Later section will just give enough treatment how to get your mobile app running and pointing to your server side Copyleft 2015 Redhuan D Oon SYSNOVA Page 25 of 62 Sales Force Android 1 8 Senth Parada SETTING UP Direct Hot Setup The SFAndroid server is now converted into a full OSGi plugin for installing into the iDempiere stack Note that the jar timestamp may differ as found in https sourceforge net projects red1 files p2 SFAndroid You can install it directly from inside your running iDempiere ss console install http downloads sourceforge net project redi p2 SFAndroid org idempiere SFAndroid Server_1 0 0 lt timestamp gt jar You can then apply this 2Pack from the same repository MobileData zip This 2Pack is to be applied when you login as GardenAdmin client The server plugin jar s 2Pack Mo
4. 19 ReadSequences Read Sequence XX_RV_MB_Sequence_View of Mobile Sequen 30 Readinitialload Read Data Update XX_MB_InitialLoad_Initial Load Mobile System 46 ReadTables Read Tables XX_RV_MB_AD_Table_View Of Tables for Mo 47 ReadColumns Read Columns XX_RV_MB_Column_XX_RV_MB_Column 24 CreateOrder Create Sales Order C_Order_Order 44 ReadADForm Read Form XX_RV_MB_AD_Form_View Of Mobile Form 55 ReadMenuList Read Menu System and Sy XX_RV_MB_MenuList_View of Menu List Copyleft 2015 Redhuan D Oon SYSNOVA Page 22 of 62 Sales Force Android 1 8 Senth Parada Generate Sequence Mobile This sequence generating happens during operations where documents are created such as those in use by the Sales Representative Examples are Sales Orders and Customers Inven tories 8090 Generate Sequence Mobile Do you want to start the Process Sales Representative SuperUser June 2 Canoa Quebrada BRAZIL After a wild dune ride during the day we settled down for an Italian dinner among friends Left most is Ricardo Santana of Sao Paulo from KENOS the main contributor company for Local ization Brazil Next to him is Edilson Neto of Fortaleza Copyleft 2015 Redhuan D Oon SYSNOVA Page 23 of 62 Sales Force Android 1 8 Senth Parada SALES FORCE MODULE Before we look at how to set the above all up we look at the Sales Force module itself but from technical systems point of view The concept here is that SalesForce is a vertical appli cat
5. Edit Manager Launch from snapshot Delete Save to snapshot Repair xe AVD launch belov Details f Start pi Y Reve First at the launch configuration for Run or Debug select the Target tab Then scroll down right section of the panel to see a Manager button and click it Choose your Android Virtual Device and look for the Start button and click on it for a Launch Options box pop up Check the Wipe user data check box and then press Launch Copyleft 2015 Redhuan D Oon SYSNOVA Page 54 of 62 Sales Force Android 1 8 Senih Parada EMBEDDED DEMO The Android mobile app has a ready made demo done by the Venezuelan team and we shall see how it is done so that usual developers can also do the same The demo also allows to test the SF Android further as sample data interacts with the activity xmls and mobile code It is invaluable resource to learn from and for many developers referring to live examples is the best way to learn The synchronising that you see on the previous section happens when you try it out in a simulator s internal memory and not on SD card in your ADK Somehow the code does not manage to load the embedded database when it detects an empty internal memory where Env IsLoad ctx is false This allows an nicalLoad connection to the WS By right there should be an option to initialize even with a loaded Env in case we need to reset We shall leave this feature inquiry for the futur
6. L_sqlL substringCl_end 1 l_sql lengthQ InitialLoadResponse rp ds addNewInitialLoadResponse rp setSqLCl_sqL rp setNameCrs getStringC name These INSERT content is then passed via the InitialloadResponse in the SOAP array to the mobile side for execution into the SQLite database there Let s try it On the next screen we drag some Synchronizing records into the InitialLoad Sequence for transport You can also do this right after the Tables transport earlier They synching action can be successive but those earlier successful items must be removed from the Sequence tab first In the following screen it is not Copyleft 2015 Redhuan D Oon SYSNOVA Page 50 of 62 Sales Force Android 1 8 Senih Parada Initial Load Sequence Available Choices Sequence Table M_InOut a Eaa ARE AE Table M_InOutLine gt Table WS_WebServiceType a Table WS_WebService Table M_Warehouse Table XX_MB_MenuList Synchronize Org Synchronize UserRole Synchronize AD Form Table M_PriceList Table M_PriceList_Version Ki Table M_Product Table M_ProductPrice Table M_Product_Category Table M_RMA Table M_RMALine Synchronize AD_Process Table M_RMAType Synchronize AD_Role Table WS_WebServiceFieldl E Synchronize Table Synchronize WebServTyp Synchronize WebService Synchronize AD_User_OrgAccess Synchronize Users Synchronize Rules Synchronization WH Synchronize MenuList Table WS_WebServiceFieldO Table WS_WebServic
7. lt soapenv Header gt lt soapenv Body gt v amp InitialLoad E lt 0 InitialLoad gt so El lt erp I nitialLoad gt Request 1 lt erp user gt lt erp user gt 7 CompositeiDempiere lt erp pass gt lt erp pass gt p _ lt erp InitialLoad gt v I compositelnterfaceSoapBinding lt OsInitialLoad gt compositeOperation lt soapenv Body gt lt soapenv Envelope gt i Request 1 gt ModelADService wsdl i Copyleft 2015 Redhuan D Oon SYSNOVA Page 56 of 62 Sales Force Android 1 8 Senih Parada Later the development team may refactor away this WS plugin and reuse the present and more efficient iDempiere webservice However S Android WS in essence is doing replica tion of synching between the server and the client and not realtime processing of docu ments which the powerful Compsosite WS is all about POWrapper What is significant to relate to developers wishing to work on iDempiere source code is about the way to extend or over ride a core model class The following is an example taught personally to me by Low Heng Sin The non recommended way to extend is this where you have a new generated X_class and L_ class public class MClientInfo extends X_AD_ClientInfo The recommended way to do so is this where you do not depend on the X and I classes 7 public class MClientInfo extends org compiere model MClientInfo The implementation of the extension call will
8. string app_name gt lt intent filter gt lt action android name android intent action MAIN gt lt category android name android intent category LAUNCHER gt lt intent filter gt lt activity gt lt activity android name org appd login V_Connection android label string app_name gt lt activity gt lt appLlication gt What is important is the lt application gt tag stack shown above The first part of the appli cation stack defines the display icon for the welcome screen with its label and theme Such artifacts are noted with lt folder name gt stored under the res values folder In res values strings xml you will find the definition for the string lt string name app_name gt SF Android lt string gt The lt activity gt tag defines the code to be launched in the above mentions two classes org appd login Login and org appd login V_Connection The first has an lt intent filter gt which matches that activity to the code that calls it via its intent method It is a default intent and will run first Next we see what happens in the Zogin class that it calls We will also test it fully in a real Android device and step through the code Launching via Emulator You can also choose to launch the code via 2 a ee the in built emulator instead of areal device wy Or Qe ff Gr Sse P S 1 SFANdroid From the Debug icon in the ADK choose l 2 SFAndroid Debug Configurati
9. AD_Client Sequence i a Table AD_Column Trigger C_OrderLine Table AD_Form Trigger XX_MB_Customerlinventory Table AD_Form_Access Table AD_Org Table AD_Role Table AD_Role_OrgAccess Table AD_Table Table AD_User Table AD_User_Roles Table AD_Process Table AD_Process_Access Table AD_SysConfig Table AD_User_OrgAccess Table AD_Document_Action_Acce Table C_Activity Table C_BPartner The next tab in the nzal Load window is for Sequence setting each script to execute in the order displayed Again this is already done for users in the window System Sequence O O System Sequence SuperUser GardenWorld HQ MyAppsServer localhost idempiere adempiere File Edit View Go Tools Window Help System Re hasan Client Organization O O Name Sequence Table DocumentType User Conat OOO o o O Startno O l re O Prefix Value Suffix Value l Navigate or Update record 1 0 Here you have the option to set the Document Type sequence numbering control There are none set at the moment Copyleft 2015 Redhuan D Oon SYSNOVA Page 18 of 62 Sales Force Android 1 8 Senih Parada Menu Mobile System D SPSxBRt CAST Been Fats FEBS ARE Menu Name Description Action Special Form Table Mobil System Outstanding Balances Displays Outstanding Balances by Customer Report XX_RV_MB_Openitem_XX_RV_MB_ Visit Planning Sample Day Planning Form MB Menu Planning Visit XX_MB_PlanningVisit_Planning
10. LoadInitData java gt 64 drawable hdpi gt 64 drawable Idpi gt ey drawable madpi gt ey drawable xhdpi AEn 79 p ey drawable xxhdpi gt ey layout InputStream is gt Eh menu ctx getResources openRawResource R raw sfandroid Y Ga raw The above R raw sfandroid snip says that the database is located at res raw folder of the project Once you get to the above screen on your phone that means the SQLite da tabase is created and exists under the path E Sfaandroid E sfandroid P ey values P ey values es String dbpath Environment getExternalStorageDirectory DB getDB_Path whose value is storage emulated o ERP data SFAndroid This means the data is stored at that location as an SQLite database format This is a good idea for adaptation to any new distro where sample or setup data is already pre loaded for easier use Such utilities from Android environment is a sure killer for to day s exploding mobile market Copyleft 2015 Redhuan D Oon SYSNOVA Page 58 of 62 Sales Force Android 1 8 Senth Parada SQLite Data Admin Well why not we really find that out inside the phone itself It will use another tool that you can download from the Google Play Store Look for et g r l i SQLi i i an SQLite database manager or editor In my ee case l got it here in my Android Once you downloaded it for install you can open the SQLit r and note the path stated earlier
11. Vis Sales Volume by Brand Shows the number of Units Sold by Make A Report XX_RV_MB_MarksSold_Marks Sold Sales Volume by Product Shows the number of Units Sold by Product Report XX_RV_MB_ProductsSold_Product Clients Displays a list of clients assigned to Route S Form MB Clientes C_BPartner_Business Partner Current collection Shows and Collections Management Upgrad Form MB Collection C_Cash_Cash Journal Made Orders Displays Made in the Day Orders Form MB Order C_Order_Order Outstanding Balances Shows Customers Outstanding Balances Form C_Invoice_Invoice Inventories Made Inventories Displays Made in the Day Form MB Inventory XX_MB_CustomerInventory_Custc Order By Complete Displays Complete Pending Requests for the Form MB Order C_Order_Order Bank Deposit Create or update Bank Deposits Form MB Deposit C_Payment_Payment RMA Day Day Return Authorization Form MB RMA M_RMA_RMA Visits of the Day Made in the Day Visits View Form MB Visit XX_MB_Visit_Visit to Customer Collection of the Day Displays a list of the Collections Made Form MB Collection C_Cash_Cash Journal Day Bank Deposits Displays a list of Bank Deposits Made Form MB Deposit C_Payment_Payment Questions Questions of the day Sales Effectiveness etc Report Synchronization Establishes communication with ADempiere Form MB Synchronization About Software Manufacturer Information Form MB About This window defines the arrangement of the menu its Action types and settings to operate on th
12. appd base SQLiteLog 1 no such table AD_Process_Access The above error in red is seen in the LogCat view panel When you see this then check your Questoid browser or remember back if you miss this in your InitialLoad Sequence tab during previous synch Remedy is of course to CREATE the table first before the INSERT The following error stack shows a parsing exception at this line in the code convertSoap ToArraylist Tag Text AndroidRuntime FATAL EXCEPTION AsyncTask 1 AndroidRuntime java lang RuntimeException An error occured while executing doInBa amp ckground AndroidRuntime at android os AsyncTask 3 done AsyncTask java 299 AndroidRuntime at java util concurrent FutureTask finishCompletion FuturetTask jav a 352 AndroidRuntime at java util concurrent FutureTask setException FutureTask java 21 9 AndroidRuntime at java util concurrent FutureTask run FutureTask java 239 AndroidRuntime at android os AsyncTask SerialExecutor 1 run CAsyncTask java 230 AndroidRuntime at java util concurrent ThreadPoolExecutor runWorker ThreadPoolExe cutor java 1080 AndroidRuntime at java util concurrent ThreadPoolExecutor Worker run ThreadPoolEx ecutor java 573 AndroidRuntime at java lang Thread run Thread java 856 AndroidRuntime Caused by java lang ClassCastException org ksoap2 serialization S lt oapPrimitive cannot be cast to org ksoap2 serialization SoapObject AndroidRuntime at org appd sync read InitialLoad con
13. double confirmation that everything is good thus far Now if for any reason you do not wish to pack in the system model via plugin you can do so manually from MobileSynch zip also found in my SourceForge net repository Click on the New record icon so that you can select a new 2Pack zip file for pack in Give it a Name such as MobileData and save it Then click on Attachment paper clip icon to select the MobileData zip downloaded from my repository here http sourceforge net projects redi files p2 SFAndroid MobileData zip download Note that the number of objects processed may differ when I upload the latest artifacts Copyleft 2015 Redhuan D Oon SYSNOVA Page 29 of 62 Sales Force Android 1 8 Senth Parada Packin x a lt A x z amp he B ta MobileData zip 44 52 KB GardenWorid MobileData 07 28 2013 10 18 44 AM Packin Search inside your server for zip file and begin the Import Package process Import Package GardenWorld MobileData Import a package 07 28 2013 10 18 44 AM Nessssssssssst Packin You should finally see the results as shown here With r212 records processed and zero Un Resolved errors If there are any errors take note of the logs and the last line should show Packin Processed 1212 Un Resolved 0 Client GardenWorid Name MobileData Created 07 28 2013 10 18 44 AM Date Processed 07 28 2013 10 33 09 AM Processed 1212 Un Resolved 0 Process Message Pac
14. foot on before this Another reason was due to my next mission to convert the SF Android application contributed by a Venezuelan team but its code was undergoing revision and not well documented Thus been in Venezuela will allow me to seek out that team For tunately the Venezuelan ADempiere iDempiere contributor company DCS under Orlando Curieless established communication with the SFAndroid group and have them visited us in Barquisemeto when I was there In a full day of interacting from morning coffee with lunch in between with con stant translation as I do not know Spanish and the lead developers do not know English we began to build a starting point of understanding on how to collaborate on the project Needless to say there were a lot of oofs and aahs Also uh uhs After leaving Venezuela before end of June and now here in Japan attending the ADempiere Japan leader s wedding and meeting with the giant Nomura Research Institute continue the constant and consistent remote Google 7ranslator assisted online communication with the lead developer Yamel Senih to fully convey the concept and documentation needs in order that I can fully complete the upgrade of the plugin for iDempiere usage with the usual complete tutorial guide This guide is the first version with a later version describing the Android mobile side application Redhuan D Oon July 8th 2013 Tokyo JAPAN N Album As usual so as not to kill the sheer b
15. is the head of ADempiere community in Japan 3 persons by my right are also contributors to our project there 2nd right is Daisuke Kubotta who helps translated ADempiere into Nippon Go the local Japanese language 3rd right is Yuichi Terada head of Open Source division of the large Nomura Research Institute that is presently the most serious Open Source Software corporate effort in Japan We are proposing for a Japan iDempiere Conference next Sakura Spring Festival 2014 in Japan inviting our top contributors Carlos Ruiz and Low Heng Sin July 9 10 I was invited to Hiroshima to speak at a local college visit the Mazda Museum and its assembly production line the Peace Memorial the old palace and stayed in the countryside All with the compliments of Kensuke Ishibashi member of the Japanese ADempiere Users Group Copyleft 2013 Redhuan D Oon SYSNOVA Page 35 of 62 Sales Force Android 1 8 Senih Parada SFAndroid Web Services The web services WS used by the SFAndroid team is done on the old ADempiere web service module which in iDempiere has to be upgraded With the help of Deepak Pansheriya who created Composite Web Services into the iDempiere core WS plugin managed to migrate the SFAndrois 3ews into org idempiere SFAndroidWS jar This plugin is made on latest iDempiere t o c and dependent on org idempiere webservices plugin which has to export out some packages sent to iDempiere for merging It can be downloaded from my
16. 8 Binary WS solved How to synchronize data Debugging Kuang September 12 issues during InitialLoad Embedded Demo on phone SQLite admin Examine Meta Menu future complete mobile side functionality document aaron S Veriora O Ree Source code http bitbucket org red1 Some private write to author for access Forum http red1 org adempiere viewtopic php f 29 amp t 176 this version 1 8 Repository http sourceforge net projects redr files p2 SFAndroid this version 1 8 Note on Version 1 6 Latest code changes require that I update with the new FillUUID during UVUID Generation and the all new TableIndex genera _ 00 Database transfer Synchronize Terminoloay UUID Generator UUID Generator Do you want to start the Process tion before redoing the 2Packs This change potentially breaks oe Tabie name all previous 2Packs thus my up grading this was vital v Fill UUID 81 The Ail UUID checkbox allows all legacy records to be filled up with the newly introduced UUID as backup to the PK regime that sur vived since Compiere days UUID introduced by Heng Sin is critical Tabte to the multi tenant nature of the ERP to avoid conflict when more instances of the ERP are merged together particularly via 2Packs Another process done is the new Ta bleIndex generation You can read more of this new technical enhancement in the IDEMPIERE 1132 ticket Y
17. ABLE AD_User_Roles AD_Role_ID CREATE TABLE android_metadata locale TE CREATE TABLE XX_MB_MenuList XX_MB_Me You can see from the view panel that all the SQLs we selected are committed into the data base perfectly Copyleft 2015 Redhuan D Oon SYSNOVA Page 49 of 62 Sales Force Android 1 8 Senth Parada Synchronizing Data The next type of action in the nazalLoad window is the Synchronizing type You can know this from the SQL script that is stored in the nzialLoad window as shown below Initial Load Sequence Client GardenWorld Organization Name Synchronize Rules Sequence 100 Description Synchronize Rules SQL INSERT INTO AD_Rule AD_Rule_ID Script VALUES AD_Rule_ID Script Table Sql WHERE EntityType APPD AND IsActive Y AD_Rule_Rule v Synchronizing Type Initial v Active tial Load Mobil System 1000219 It has an INSERT statement to get data from the server side into the Android side The smart way to do it is the use of parsing markings which will extract the values from the ResultSet Code on the server side that does that is in the MAppDroidServicesImpI class LoadFromTable method whilLeCrsquery next L_sql rs getStringC sgl while Cl_sql index0fC gt 1L_init L_sql index0fC L_end L_sql index0fC L_init 1 L_campo L_sgl substringCl_init 1 L_end L_VaLlue transformVaLlueCrsquery getObjectCl_campo L_sql l_sgql substring lL_init L_Value
18. Column model differentiated by its Menu column checkbox Generate Web Service populate the Web Service Security window that manages the synching process with the Mobile app Generate Sequence Mobile generates the document sequence numbering during operations from the mobile app There is also the heavily use Web Services Security window which is added upon by SFAn droid Now we will look at each of these items in detail Copyleft 2015 Redhuan D Oon SYSNOVA Page 16 of 62 Sales Force Android 1 8 Initial Load Window Senih Parada We now look at how the Initial Load window is used for the first synchronising action from Organization the mobile app Initial Pr Client GardenWorld Sequence Name Table AD_Client Description Create Table AD_Client SQL CREATE TABLE AD_Client Sequence AD_Client_ID NUMERIC 10 NOT NULL Name VARCHAR 60 NOT NULL Table Synchronizing Type Initial Active Initial Load Movil System 1000024 Sql WHERE When you open the Initial Load window you will find that it is already populated with re cords These are standard setup meta data to populate the Mobile App In the window you will find a Synchronizing Type that is Initial Eile Edit View Go Tools Window Help 6 0 0S ER CQ Been Fete GE Initial Load Sequence Name Table AD_User Table AD_User_Roles Table AD_Process Table AD_Process_ Access Table AD_SysCo
19. MindexColumn 1000003 60355 Process table a_asset_class i PANNAN tabase version But such a contribution following my steps here is welcomed 10 Note on Version 1 7 Deepak Panshertya helped solve the WS calls from Mobile to the Server where Style DOCUMENT is preferred Tracking of the SOAP communication and app handling to and fro with final creation of SQLite database on the mobile phone to prove the concept works Only InitialLoad is tested Note on Version 1 8 Deepak Pansheriya helped solve the WS binary deployment Below is the proof of it A section on Embedded Demo is added illustrating for the developer how it is handled in code and examined on the real phone Troubleshooting tips and SQLite admin included Tracing how the meta menu is created via the MenuList linking to Forms Note on future versions Future versions will trace the mobile app functions and how it is actually used in real busi ness scenario 11 Sales Force Android 1 8 Senih Parada OVERVIEW Introduction This is a ground breaking first time concept application killer app written for the Free ERP envi ronment based on iDempiere OSGi framework The server side is an independent plugin that setup automatically the mobile content meta data without any compilation from the core iDempiere ERP application The Android application for the mobile phone can pick up the meta data when communicating with the remote iDempiere s web servic
20. ROSILOS of PANAMA Thus this is like the GardenWorld example in Compiere where it acts as a ready made sample for users with similar requirements How ever it will not be an exact fit for many companies and thus a training stint or an outright outsource contract to the contributors above is recommended They be the best as they know their own code Also for their sharing spirit they deserve to be referred to first be Copyleft 2015 Redhuan D Oon SYSNOVA Page 24 of 62 Sales Force Android 1 8 Senth Parada fore your own local IT provider They are also open to work with your local vendor and this is where minimally a training stint is a good option In case you need my assistance on that or to assist in an English version training I can help arrange for your needs As it is this GardenWorld sample is a great way to learn how to extend the app Originally much of the menu items in Mobile System Admin were in Spanish and I con verted them to English using GoogleTranstator and a bit of help from the team in Vene zuela Nevertheless some of the items may not be accurately conveyed Please drop me a note if you got a better translation from some of the obscure terms or functions The graphical display and code on the mobile side can be of assistance and eventually via open source we can solve all mysteries of life Mobile System Mobile System Admin Sales Planning Order Process Mobile Event Type Days of Visit
21. SF link above When successfully started will give the follow ing prompt at the console start 158 Aug 8 2013 6 51 49 AM org apache catalina core ApplicationContext log INFO Initializing Spring root WebApplicationContext Aug 8 2013 6 51 53 AM org compiere util Language getLanguage INFO Adding Language pl Country PL Locale p1_PL Aug 8 2013 6 51 53 AM org apache cxf service factory ReflectionServiceFactoryBean buildServiceFromClass INFO Creating Service http idempiere org ADInterface 1_9 AppDroidServices from class org mb appdroid AppDroidServices Aug 8 2013 6 51 53 AM org apache cxf endpoint ServerImpl initDestination INFO Setting the server s publish address to be AppDroidServices osgi gt You can then test it out by calling the URLs in the screen shots below localhost 8080 AppDroidServices SFservices wsdl S 7 ti Available SOAP services AppDroidServices Endpoint address http localhost 8080 AppDroidServices SFservices AppDroidServices e InitialLoad WSDL http idempiere org ADInterface 1_ 0 AppDroidServices e getVersion Target namespace http idempiere org ADInterface 1_0 Available RESTful services http localhost 8080 AppDroidServices SFservices AppDroidServices wsdl S AeA 52 Request 1 ln Projects Ee OOE Ei Proj PER HOD 2 http localhost 8080 AppDroid 7 AppDroidServices wsdl ne v I AppDroidServicesSoapBinding E lt soapenv Envelope xmlns soapenv http schemas x gt 2 i
22. SFANDROID Developed by YAMEL SENIH CARLOS PARADA Migrated by REDHUAN D OON Version 1 8b p l C A F T C LA LW K j l LW Concept Mobile App for iDempiere A ground breaking killer ERP solution replicated to a full Android application Upgraded to latest iDempiere 1 0c reviewed and documented for community technical improvements June 2 2013 Canoa Quebrada BRAZIL I was next to go flying down into this desert dune lake created from millions of years of evolution on the north east beach front facing the Atlantic Ocean aS 3 TABLE OF CONTENTS Disclaimer and Credits On The Go Album Progress Worksheet Nofe on Version 1 6 Nofe on Version 1 7 Nofe on Version 1 8 Note on future versions Overview Introduction Application Architecture Glossary Menu Items Mobile System Menu Initial Load Window Initial Load Sequence System Sequence Menu Mobile System Mobile Other Action Menu Mobile Synchronization Generate Web Service Web Service Security Window Generate Sequence Mobile Sales Force Module Concept of Verticals SalesForce Menu Setting Up Direct Hot Setup Downloading the SFAndroidServer Plugin At the OSGi Console Sequence Check O oOo N O 11 1 12 12 13 14 15 15 17 18 18 19 21 21 22 22 23 24 24 24 26 26 26 27 28 KY Mobile Data Pack In Role Access Update Developer s Note BitBucket Source SourceForge net Repo
23. Senth Parada Wipe out User Data As always in testing you can hit some error in data handling or code that you need to scratch the database back to the beginning In the case of Android s DB it starts from noth ing or not having any user data of the folder structure as you see in the last screen You can wipe out any created data by specifying in the launch configuration at the check box doing so Then during launch a pop up dialog will ask you if you wish to do so or leave the data alone That is convenient as you can decide at every launch In case you want to wipe out on a blank launch and not during the SFAndroid launch you can follow the series of screens described below r Name SamsungSFAndroid FO Android E Target E Common ph Application pmpatible devices AVD s iamsungSFAndroid roid JUnit Test Ices and AVD s roid Native Application ick compatible device Aw Launch Options on compatible device AVD otherwise Application erred Android Virtual Attach to Applicatior Skin 720x1280 Postmortem Debugg Target Name a CPU ABI Details Remote Application Android 4 2 Density 320 ARM armeabi v7a Applet C Scale display to real size Start Applical Androig t Screen Size in 4 7 nch Grou rote Java List of existing Android Virtual Devices I Monitor dpi L AVD Name Target Name Scale default l New Refresh of Samsung Android 4 2 2 _ TA Wipe user data
24. arada Po Manage Total 13 MAME Menulist ID AD Form JD IsActive Action ImagName AD Table 10 1000009 100004 1000100 1000063 100007 20 XX MB _PlanningVic There are 13 such records Then we go to the AD_Form table and view the corresponding records We can see that their ClassName column contains values that correspond to actual Java classes in the SFAndroid project es SQLite Manager AD_Form T Z3 WS Clemtes org 2ppd vew _MT_BPartner WE Smcromzaoon org appd vew MV_Synchromaing WE RAL org 2ppd vew MT_CustomerRMA WE Wew Pianmng Vist org apd vew M_MenuPiannngVisit WE VST org appd vew MT_VisatAndline WE edocs WE Loot VE inventory WE Denost ORES WE Collection all atl teat eat teat taal So this is how it works The MV_Menu class traverse through the MenuList table and where there are Forms fetches its respective class strings for ClassLoading when that item is se lected You can compare these classnames with the SFAndroid menu in the previous page You can examine the org appd menu view MV_Menu java in the source to see how it is done particularly at Load and LoadActivity DisplayMenuItem item Copyleft 2015 Redhuan D Oon SYSNOVA Page 61 of 62 Sales Force Android 1 8 Senth Parada to be cont d Future versions will focus on actual end user use or more deeper into the SF Android Venezuelan application for SalesForce mobile management Your chance to contribute At this juncture it is a
25. arvel that indeed reuses such a con Muestra y Actualiza le Gestion de Cobranza de Dia cept in its application a o Actualize Dep sitos Bancarios Consultas Since we can now get the demo sample Consultas de dia Ventas Efectividad entre Otros application running on the phone we Sincronizaci n Establece Comunicaci n con el Servidor de shall examine under the hood how its De menu appears ready to execute its un informaci n del Fabricante de Software derlying menu item s code class It is quite simple in essence It is the XX_MB_MenuList data calling Pa panne Manager AD_ Form data Data upon data it Run Hide SQL History is the metadata idea We can BEELER AE OE EEEIEI clearly see inside these screen fema TT Aa T SST shots First we go into the SQLite3 Manager to view the first table and note the Ad_Form_ID Since not all menu items are program calls we use an SOL statement to filter Q AD_Formf AD Form Access AD_Org AD_Process for those We can tap on the SOL AD_Process_Access AD_Rolef AD_Role_OrgAccess AL al a editor and tap on the ready made snips to form SELECT FROM XX_MB_MenuList WHERE AD_Forum_ID gt O This is to fetch MenuList records that have AD_Form_ID integer values i e pointing to the IDs in the AD _ Form table After tapping on RUN scroll to the bottom of the phone to see the results Copyleft 2015 Redhuan D Oon SYSNOVA Page 60 of 62 Sales Force Android 1 8 Senth P
26. bileSynch zip will automatically deploy to define the above meta data and content for the operations described here Though the above is sufficient for an experienced implementor the following pages guide you through some setup process in more elaborate detail Downloading the SFAndroidServer Plugin You can download from the link above the latest SFAndroid Server lt version gt jar and in stall it from your server This is also useful for the elix Console method of installation 168 amp plugins gt 22 Bfimy e S j B Q AVORITES Q idempi serverx DS_Store DS_Store 23 Dropbox a Image Capture C plugins gt org idempiere SFAndroid Server_1 0 0 201307181048 jar iTunes org idempiere SFAndroid Server_1 0 0 201307220813 jar All My Files C iWork 09 i org idempiere SFAndroid Server_1 0 0 201307272240 jar AirDrop y Jaspers esigner ATEA Launchpad amp Mail lea Desktop s E Mission Control M Documents C openbravoPOS Downloads J OSGI A enance I OSGi i server Hi pci I OSGI LIVE Pictures Ga OSGi mobile OldMac 33 OSGi POS n nn ek C OSGi SFAndroid gt Copyleft 2015 Redhuan D Oon SYSNOVA Page 26 of 62 Sales Force Android 1 8 Senih Parada The screen shot here shows the plugin downloaded into Applications OSGi SFAndroid plugins Note that from time to time the plugin version will be updated by me when there are changes to it in the bitbuck
27. bove at the Package Explorer view tab Ifyou scroll the Manifest panel down lower you can see an important part Application Nodes 5 P R M Az Attributes for org appd login Login Activity vO d login Login Activity at org login n vi 7 EP og ty Add tag declares an link android app Activity class that J ntent Filter package s application components implementing a pa A android intent action MAIN Action Remove interface android intent category LAUNCHER Category 7 Name org appd login Login z Y a org appd login V_Connection Activity P Down Theme Manifest A Application P Permissions 1 Instrumentation AndroidManifest xml This part contains nodes that describe the activity that the application will launch Select ing the first activity you will find on the right panel the code associated with it Clicking on the Vame link will pull out the code which in this case is o7g appd login Login If you go to the rightmost tab you will see the manifest in the alternative native xml format shown below We can inspect again the same settings Copyleft 2015 Redhuan D Oon SYSNOVA Page 39 of 62 Sales Force Android 1 8 Senth Parada lt application android allowBackup true android icon drawable salesman_h android Label string app_name android theme style AppTheme Dark gt lt activity android name org appd login Login android Label
28. ckage 20 Entity Type Android Package 30 Entity Type Lubo Sistemas LS Details 40 Entity Type Sistemas Globales SG 42 Data SELECT FROMAD_ Element WHERE EntityType APPD 45 Data SELECT FROM AD_Column WHERE EntityType APPD 50 Data SELECT FROM AD_ Table WHERE EntityType APPD 53 Data SELECT FROM AD_Tablelndex WHERE Name Like xx 60 Data SELECT FROM AD_Val_Rule WHERE EntityType APPD 62 Data SELECT FROM AD_Form WHERE EntityType APPD 64 Data SELECT FROM AD _ Process WHERE EntityType APPD 66 Data SELECT FROMAD Process WHERE EntityType LS 68 Table 70 Application Web Service Security 80 Application Mobile System The dependencies are exported first They are the new EntityTypes APPD LS and SG Then certain records for Element Column Tables Validation Rules Forms and Processes created for the new models Finally the Menu tree of Web Service Security and Mobile Sys tem are exported out This whole package is tested to pack back well in the present iDempiere 1 0 c Note that if you restore this database at later dates you may need to apply the latest migration scripts in between the time stamp and present date You may even have to go back few more days from the time stamp possibly when I do not update that sud den when I am working on this Copyleft 2015 Redhuan D Oon SYSNOVA Page 33 of 62 Sales Force Android 1 8 GardenWorld Sample Senih Parada The GardenWorld client Pac
29. class public void onActivityCreated Bundle savedIinstanceState super onActivityCreated savedInstanceState et_User EditText getActivity findViewByld R id et_User et_Pass EditText getActivity findViewByld R id et_ Pass ch_SavePass CheckBox getActivity findViewByld R id ch_SavePass ch_AutomaticVisitClosing CheckBox getActivity findViewByld R id ch_AutomaticVisitClosing sp_Language Cust_Spinner getActivity findViewByld R id sp_ Language Here it is handling 5 items which the first two is important as the acceptAction will vali dUser by findUser user pass from the AD_ User table J V_Connection java J V_Login java J LoadinitData java J Env javi H SFAndroid gt S base gt f org appd login gt Q V_Connection gt onCreal SuppressLint NewApi 0verride a public void onCreate Bundle savedInstanceState super onCreate savedInstanceState 3 super setContentView R Layout v_connection ActionBar actionBar getActionBar actionBar setDisplayHomeAsUpEnabled true et_UrlSoap CEditText findViewById R id et_UrlSoap et_Method EditText findViewById R id et_Method After entering the credentials we caught it at the next break in V_Connection class Copyleft 2015 Redhuan D Oon SYSNOVA Page 44 of 62 Sales Force Android 1 8 Senth Parada The above is great news for the developer as s he can easily work on the project with all the tools in perfect working con
30. d have the Android Development Kit ADK which is an Eclipse IDE for Android development setup on your own Then you can check out the SFAndroid source from my bitbucket repository or from the Venezuelan team which I cloned and played around from My source is at http bitbucket org redr sfandroid For newbies on Android program ming you can refer to many resources online such as the official http developer android com training index html and another that is my favorite as it has good videos done in very comprehensive detail is at The New Boston site http thenewboston org list php cat 6 H Package Exp 33 4 Project Explo After understanding how to setup the ADK FENE i l a gt Android Development Kit which is based ig sFandroid on Eclipse IDE you can checkout via its gt i base i gt wi Android 4 2 2 Mercurial add on for the source code gt mA Android Private Libraries which is displayed here on the right kap gt iz gen Generated Java Files gt soap The first thing we look at is the gt y settings i Cia faz AndroidManifest xml which is a standard in gt Nay Din gt y libs Android development This is a big contri gt gres X classpath bution from Google by the way It is very A mara popular well supported and an amazing Ch AndroidManifest xml C codetemplates xm framework to learn We can open up that F ic_launcher web png H proguard project txt manifest file and
31. data is setup on Server side Initial Loaded to Mobile device then two way synchronised Firstly the mobile side is also cleverly using the same meta data concept used on the ERP side For those who are familiar with Compiere s Application Dictionary or AD will know that the menus and its windows tabs and fields are defined by meta data and not hard coded Similarly this Android application uses the same philosophy in defining its menu and windows However the creators of this app goes one step further by defining such meta data on the server side It is then loaded onto the mobile client during running of the InitialLoad rou tine when the Android tries to synch with the web service remotely This concept is quite a novelty in itself Let me explain further After the InitialLoad process further synchronisation by the mobile phone will detect new data and replicate between the mobile device and the server This is rather transparent to Copyleft 2015 Redhuan D Oon SYSNOVA Page 13 of 62 Sales Force Android 1 8 Senih Parada the user This idea also mean that there is centralised control of the mobile clients by the server side The Android app is thus reduced to just the functional code but selectively used if allowed and described by the meta data Yes even the code classes are defined by the meta data on the server side This means that the modification or updating of the code on the mobile side is minimised Therefore
32. dition I could use the above ADK and Eclipse side by side both handling the server side code of iDempiere and the WS in debug mode while the An droid side running a phone emulator also in debug mode The following screenshots will show the InitialLoad testing in action in such a manner At the end I also made a movie out of it SOAP Request r SF Android First the Android has to make a SOAP URL SOAP request via WS to the server side On http 192 168 1 9 AppDroidServices SFs the right shows the next screen after Name Space tapping on the NEXT button top http www erpconsultoresasociados com Init Synchronization Method right of the phone screen It will dis play the URL SOAP field with a pre ntttatboad Limit Quer set value I have decode the field to o 0 allow edit on it So now you can re EEA place the 192 168 1 2 IP value with 0 your own server IP Note that you cannot use localhost if you are also fa Epp Apk Sur Da a Slay A ee running the server side WS on your same computer Find out what is your KOMEA Si pe fee ee Pe ee ee D exact IP with a IPCONFIG command and use that Remember also to put in ie the port of your WS In my case its 8080 as shown on the next screen Note that the emulator works like a real phone but it consumes alot of resources and so this can be slow on a lesser machine Do not change the Name Space You cannot do that anyway because the code does not allo
33. e As of now we already conveniently arrived at the intended purpose The embedded demo sample is loaded without synching via WS yet In a way it is an embed ded database seed during installation It also serves as a good strategy during development and debugging to reuse the idea and formulate new samples or starter packs for standard end users August 29 Templer s Park Waterfalls Ai Ono with Hadeesa from Birmingham and Farida from Paris both volunteers at a local orphanage near my farm home Together with my wife in pink it is a rare chance for myself to appreciate my own country Copyleft 2015 Redhuan D Oon SYSNOVA Page 55 of 62 Sales Force Android 1 8 Senth Parada Debug ADK on real Phone One real life reason why you will prefer to test on a real phone is the speed it works is many times faster than on an emulator Firstly we need to connect to our actual phone device via USB cable to your computer with the ADK running You have to enable the Developer Op tions from the Settings as shown in the following screen shots Developer options Take bug report Desktop backup password Desktop full backups aren t currently protected Stay awake Screen will never sleep while charging Protect USB storage Apps must request permission to read USB storage DEBUGGING USB debugging e Debug mode when USB is connected TF Revoke USB debugging authorisations Power menu bug reports Include option in power menu f
34. e Android App or the mobile phone side There are 18 items setup The three Action types are Form Process and Report GardenWorld Menu Client Organization Mobil System Name Description Action Table Image Sql WHERE Group By Clause Sql ORDER BY Activity Type Menu Type Rule After Web Service Name of Image Error Web Service Type Rule Before Web Service Visit Planning Sample Day Planning Form v XX_MB_PlanningVisit_Planning Visi Special Form MB Menu Planning Visit klipper_h XX_MB_PlanningVisit SeqNo Menu _ Summary Level Menu v Active xi Sequence Read Write Insert Record zi Looking at an example above Vise Planning you can see that its Action is for a Form in which the Special Form is set to MB Menu Planning Visit That is using the AD standard where in the Form window if you open as SystemAdmin to take a look below describes the Copyleft 2015 Redhuan D Oon SYSNOVA Page 19 of 62 Sales Force Android 1 8 Senih Parada Java class it is calling This is going to happen not on the ERP side but the mobile app side The use of AD meta data approach allows for more reusability of the AD and better future maintenance and extensibility as well as a best standard practice File Edit View Go Tools Window Help Form a 5 Client S
35. e plugin It can then pull data organised into the phone and op erate as a standalone Later it can replicate new data both ways with the ERP back end upon syn chronising This application is written by Yamel Senih and Carlos Parada under a project managed by Angel Munoz of ERP Consultores y Asociados and Jose Botero of Lubo Sistemas from Venezuela The mobile side was concept proven in person to the author by its creators but still under refactor ing with the latest web services from iDempiere and thus detailed illustration will be presented in the second version or section of this document due in some weeks time Any mobile side description done here is only described conceptually The focus of this earlier section is about the successful conversion of the server side into an OSGi plugin within the iDempiere stack June 21 Barquisemeto Team Venezuela Angel Munoz Jose Botero Orlando Curieless me Yamel Senih Carlos Parada Miguel Hernandez Copyleft 2015 Redhuan D Oon SYSNOVA Page 12 of 62 Sales Force Android 1 8 Senih Parada Application Architecture We will examine in more graphic detail the layout of the application The application is di vided into two parts the server side and the mobile client side The illustration below acts as a Starting and simple reference on the key relationship between the two sides SFAndroid Architecture Server side Mobile side iDempiere Android App Plugins Meta
36. eMethod Table WS_WebService_Para Table XX_BM_CustomerInventory Table XX_MB_Customerlnventory When the Mobile side Initial Synchronization button is clicked again we can then examine the results in the internal database on the virtual emulator as seen in the ADK s DDMS Questoid SQLite Browser at the Browser Data tab 2 LogCat Questoid SQLite Browser 2 El Console Database Structure Browse Data Data Table AD_Role AD Role_ID Name AD _Client_ID S AD Role_ID IsUseUserOrgAcce 103 GardenWorld User ll N 50004 Web Service Execution 11 N 0 System Administrator 0 N 102 GardenWorld Admin ll N You can see that the AD_Role table data from the server side has been successfully loaded into the mobile emulator Copyleft 2015 Redhuan D Oon SYSNOVA Page 51 of 62 Sales Force Android 1 8 Senih Parada Trouble shooting Synch Scripts Since the scripts are hand typed string content typo mistakes can happen and here I show you how to solve the common mistakes The first type happens when when we are synchro nising a table that has not been CREAT Ed yet A J mow mmewe 3 z 3 org appd base SQL Insert Into AD_Org AD_Org_ID Name Description AD_ 12 Store Central GardenWorld Store 11 org appd base SQL Insert Into AD_Org AD_Org_ID Name Description AD_ 50007 Stores null 11 org appd base SQL Insert Into AD_Process_Access AD_Role_ID AD_Proce Values 200008 Y org
37. ebug the SOAP request response exchange you can place breaks at the Android side in InitialLoad line 152 try m_soap cal1Q return CSoapObject m_soap getM_Envelope getResponse And to break at the server side MAppDroidServicesImp1 line 6r InitiaLLoadResponse rp dataset addNewInitialLoadResponse C Of course you can use the TCPMON tool that Deepak taught me that can trouble shoot packets for its exact payload But the above code debugging is important for further im provement and extending of the project It is also a good entry point for newbie developers who has no idea where to begin At the ERP side I have selected only a certain number of records to send over as a test case as shown in the following screen As you can see the Initial Load window has a second tab to control easily the selection of records All you have to do is just drag the items on the right panel towards the left and leave them there You can also sort the items to instruct the Android synchronizing action on which item to load first into its SQLite database Copyleft 2015 Redhuan D Oon SYSNOVA Page 46 of 62 Sales Force Android 1 8 Senih Parada gt ON DRx ERS Tarm Ofer Fe Initial l Load Available Choices Sequence Table AD_Document_Action_Acc a a Table AD_SysConfig A Table AD_Client Table AD_Form Table AD_Org K Table AD_Role Table AD_Form_Access Table AD_Process Table AD_Role_OrgAccess Table AD_User Table AD_Process_Acc
38. es It is the web based middle ware or interface by which other systems such as mobile apps can communicate with another system in this case the ERP server Copyleft 2013 Redhuan D Oon SYSNOVA Page 14 of 62 Sales Force Android 1 8 Senth Parada MENU ITEMS Mobile System Menu We take a first look at the new menu structure called Mobile System Go to the Systems Setup section at the bottom to install the plugin with 2Pack first Open up the iDempiere main menu screen and you can see the menu tree as shown below Mobile System Mobile System Admin Sales Planning Reports The Mobile System menu contains 3 sub menus I Mobile System Admin used to setup define and configure the synchronising be haviour with the mobile application The mobile menu and structure is also defined from here and at the server side II Sales Planning operates the Sales Force functionality for this mobile application Ill Reports some reports used in Sales Force functionality What is important here is to regard item I as the main horizontal of the Android app integra tion and items II and II as the vertical SF SalesForce module The use of the items in Mo bile System Admin is to manage the integration and communication between the ERP and the Mobile app and thus can be re used for any other vertical Copyleft 2015 Redhuan D Oon SYSNOVA Page 15 of 62 Sales Force Android 1 8 Senih Parada We g
39. ess Table AD_User_Roles Table AD_Rule Table AD_Table Table AD_User_OrgAccess Table AD_Column Table C_Activity able XX_MB_MenuList Sequence Table C_BPartner Table C_BPartner_Location Table C_Bank In this case I made only to tables ready for action The rest I drag them to the left panel Those on the left are rendered isActive N and will not be used during synching on the server s MAppDroidServicesImp1 class due to line 51 sql appendC select XXIL TAB TableName from XX_MB_InitialLoad XXIL Left Join AD_Table TAB on XXIL AD_TabLe_ID TAB AD_Table_ID Where XXIL AD_CLient_ID 4m_AD_Client_ID And XXIL isActive Y order by XXIL SeqNo In the snippet above there is a check for isActive value The first tab as a refresher from our earlier pages describing the server meta data setup below shows the content of SQL script that is meant to be executed into the Android side s SOLite database Initial _ load Client GardenWorld Sequence Name Table AD_SysConfig Description Create Table AD_SysConfig SQL CREATE TABLE AD_SysConfig AD_SysConfig_ID NUMERIC 10 NOT NULL Name VARCHAR 60 NOT NULL Table Synchronizing Type Initial we Active Initial Load Mobil System 1000198 Copyleft 2015 Redhuan D Oon SYSNOVA Page 47 of 62 Sales Force Android 1 8 Senih Parada SOAP Response Now we turn our attention to the Android side which within a few milliseconds via t
40. et source You then have to uninstall your present plugin and install again the new plugin At the OSGi Console Now you startup your iDempiere Server Once it has fully launched you type in ss into the terminal box to see the stack of plugins and you will note that the last one does not show your plugin Enter the install statement will change that timestamp of jar may differ The console returned in this example Bundle id is 376 You then start 376 to let the embedded 2Pack deploy It will take some minutes depending on the speed of your server eoo idempiere server java 133x43 At the end of Pack In you Can S org idempiere SFAndroid Server 1 0 0 installed The Pack In log lines may only appear if your Preferences is set to Fine in your iDempiere System So please understand if you see nothing and the server is processing a lot Copyleft 2015 Redhuan D Oon SYSNOVA Page 27 of 62 Sales Force Android 1 8 Senih Parada Sequence Check At your browser you then go to your login screen with http localhost 8080 webui e Q iDempiere Open Source E ERP System User SuperUser Password essseseeeeooeesesoeeosocooooeooooeeesoceososooooeosoo Language English ov Select Role ov Remember Me You tick Select Role so that you can select System to carry out the Sequence Check of ta bles primary sequence numbering to avoid conflict in ID during record processing Usually
41. found Copyleft 2015 Redhuan D Oon SYSNOVA l Console Gestures Builder Dev Tools Downloads al People Phone Search Settings SF Android Speech Recorder Page 42 of 62 Sales Force Android 1 8 Senth Parada Login Code J7 VF wT wuy SE EN wy pp ewe rare p wan sy et ay ery aa a IDETE a we Ore Qe Q Quick Access vw s Debug 3 m Variables Breakpoints v A SFANdroid Android Application v 2 Login line 44 onCreate Bundle Y amp DalvikVM localhost 8633 T V_Connection line 69 onCreate Bur w Thread lt 1 gt main Suspended breakpoint at line 44 in Login E lt VM does not provide monitor information gt SS Ianin anCrastalRiindlal lina AA i SFAndroid Manifest fp Login java V_Connection java 6 gt ia SFAndroid gt 4 base gt org appd login gt Q Login gt onCreate Bundle void a yee om This demonstrates how you can implement switching between the tabs of a TabHost through fragments using FragmentTabHost public class Login extends VT_CancelOk 0verride a public void onCreate Bundle savedInstanceState super onCreate savedInstanceState addFagment V_Login class Conn R string tt_Conn 39 addFagment V_Role class LoginRole R string tt_LoginRole tm F g LogCat 5 El Console X Tasks Saved Filters dj Search for messages Accepts Java regexes Prefix with pic verbose H 5 4 Android All messages nc
42. go to its first tab that is an aif l E project properties UI for it as shown below Copyleft 2015 Redhuan D Oon SYSNOVA Page 38 of 62 Sales Force Android 1 8 Senth Parada ackage Exp 58 Project Explo O i SFAndroid Manifest 32 vw on gt i D S Android Manifest Application gt Gy libs d ey res a gt Gyanim i The application tag describes application level c gt Gyd bi attributes rawable b r drawable hdpi TA Define an lt application gt tag in the AndroidManif oo i v Application Attributes p og PRR Defines the attributes specific to the application rawable xhdpi gt 64 drawable xxhdpi Name gt ey layout pae gt S Theme style AppTheme Dark menu gt ey raw Label string app_name Y Gp values Es a credit_card_type xml Icon drawable salesman_h Ic 4 doc_status xml Logo Ch login xml fa msg xml Description cb payment_rule xml eee ee Cy Strings xml an styles xml Process c tender_type xml _ gt 64 values es Task affinity gt Ge values v1l 4 l gt rane 4 FS Manifest A Application P Permissions 1 Ins You can see the details and also other tabs at the bottom of the screen Now at the Applica tion tab we can see how it first choose to launch anything There is a Theme value which goes to style AppTheme Dark and Label value which is string app_name There is also an Icon value that is drawable salesman_h These values are found in the folders within the res folder a
43. he Internet will have received the SOAP response The following two code snippets extract and execute the SOL content highlighted in blue font public void tnitiaLLoad ArrayList lt SORespInitialLoad gt m_list new ArrayList lt SORespInitialLoad gt SoapObject m_soap LoadFromService 1fCm_soap nuLL m_List convertSoapToArraylistCm_soap if ClLoadInBDCm_List public ArrayList lt SORespInititalLoad gt convertSoapToArraylistCSoapObject m_soap if ArrayList lt SORespInitialLoad gt m_list new ArrayList lt SORespInitiaLLoad gt Q int m_tam m_soap getPropertyCount for int 1 1 lt m_tam 1 SoapObject m_resp CSoapObject m_soap getProperty 1 m_List add new SORespInitiaLLoad m_resp getPropertyAsStringC name m_resp getPropertyAsStringC sgl return m_list August 31 Teluk Bahang Penang When not traveling not necessarily I end up nondescript Here Ai Ono whom I met 2 months before in Tokyo became really intrigued to come visit me for a few days and experience the vil lage life with its jovial and humid atmosphere Copyleft 2015 Redhuan D Oon SYSNOVA Page 48 of 62 Sales korce Android 1 8 Using SQLite Browser Senih Parada Now we can examine the final contents from the in built database From the ADK we can use the DDMS plugin to examine You can search for Questoid or read about the plugin from this forum To get to the SQLite Browser selec
44. huge step into the future of this project for iDempiere and the com munity behind it Nothing can stop any developer or user to think about all the things that can be done With the source code readily freedom ready for improvement we can stand on the shoulders of giants and more faster ahead The development team in Venezuela is still ongoing with its new version where we can watch their repository for ongoing changes Also you can watch mine as well Further ver sions of this project will be updated accordingly in those locations and this document too So step onto it and be part of a global team and interesting things await all of us May 27 Stuttgart With Heinrette Baumann co author of UML In Action She and her husband invited me to stopover during my trip back from Slo vakia to Dusseldorf to discuss about the war It was a delight to know that they are writers themselves having produced that UML book 10 years ago in the German language before it got translated by Packt Books UK into the English medium I requested them for an autographed copy Copyleft 2015 Redhuan D Oon SYSNOVA Page 62 of 62
45. ion and the SFAndroid is meant to be a horizontal framework to build other verticals on top of it Concept of Verticals As explained earlier ERP is a horizontal application and Compiere right through iDempiere play this concept very well with the Application Dictionary framework which allows changes to be made without change to code and a high reusability of its ready models and APIs SFAndroid similarly is an extension of that idea into the mobile world of enter prise business SFAndroid application comes already coupled with a vertical which is SalesForce of which the SF characters in the project name stands for SalesForce if some of you may know is the name of a popular SAP SaaS Software as a Service project that tries to automate sales force activity and provide that service from a Cloud system to avoid the users to do any setup Needless to say SalesForce com face a huge challenge as business is very complex and the infrastructure is not exactly there yet Thus such a stand alone application to do SalesForce is welcome in this form Been a diffi cult vertical the idea of vertical reusing a good horizontal framework is what this project is showing in a big way Readers can appreciate how this is achieved here and reflect about their own vertical SalesForce Menu The Sales Force module designed by the contributor company ERP CONSULTORES Y ASOCIADOS and LUBO SISTEMAS of VENEZUELA is for the particular use of their client AG
46. k n only works when you are in the GardenWorld menu due to role access security control Similarly it is also packed out from inside the client So login as GardenAdmin to view the Pack Out contents below OU DS lt xERR 7a 0 ok Export 2NoType Package 4 Data Package 6 Data Details 7 Data 8 Data 9 Data 10 Data 11 Data 15 Data 20 Data 30 Data 40 Data SQLStatement SELECT FROM AD_Rule WHERE EntityType APPD SELECT FROM XX_MB_Frequency SELECT FROM WS_WebServiceType SELECT FROM WS_WebService_Para SELECT FROM WS_WebServiceFieldinput SELECT FROM WS_WebServiceFieldOutput SELECT FROM WS_WebServiceTypeAccess SELECT FROM XX_MB_InitialLoad SELECT FROM XX_MB_MenuList SELECT FROM XX_MB_PlanningVisit SELECT FROM XX_MB_Day The many rules that are used to create table content is in the AD_ Ave table But it was cre ated manually by the developer and not within the AD I have to change the role access of AD_hkule to System amp Client to allow PackOut access rights to its records The WS_Web service data is for the new settings for the web service in use by SFAndroid The XX MB Menulist table content is for menu item Menu Mobile System when menu field is checked and Menu Mobile Synchronization menu field unchecked Copyleft 2015 Redhuan D Oon SYSNOVA Page 34 of 62 Sales Force Android 1 8 Senih Parada July 14 2013 Attending the wedding of Shunjiro Yatsuzuka and Mari Sato Shunjiro
47. kin you which record and its details and which field is unresolved Copyleft 2015 Redhuan D Oon SYSNOVA Page 30 of 62 Sales korce Android 1 8 Role Access Update Senth Parada What is left now is the Role Access Update This is a common practice explained in many documents before so no further explanation given here The screen below shows a success ful update SuperUser GardenWorkd GardenWorid Admin iDempiere Home 13 Role Access Update x Update the access rights of a role or roles of a client iere RoleAccess Update Feedback Preference Change Role Log Out lt R Update the access rights of a role or all roles of a client to windows forms processes and workflows If run for System all roles of all clients are updated Note that a role is only updated if it is not marked as manual ardenWorld Admin AD_Window_ID 0 AD Process ID 9 AD Form_ID 14 AD_ Workflow_ID 0 DocAction 0 AD_InfoWindow_ID 0 J Parameter J Cancel Total of g Processes and 14 Forms are updated for the GardenAdmin role to access Next you do a Logout and Login and you can see the full model of the SFAndroid server side setup and configura tion windows as shown on the right You can click on the Menu Mobile System or Menu Mobile Synchronization to see the contents Copyleft 2015 Redhuan D Oon SYSNOVA 4 Mobile System 4 Mobile System Admin Initial Load I System Seque
48. latform API Level CPU ABI Details Samsung Android 4 2 2 4 2 2 17 ARM armeabi pear do not ask me Ask Goo Start gle It helps me in times like these In fact all the time In a Manager my case the detection and se lection of the device works _ Use same device for future launches Cancel r remarkably trouble free Once the app started running your phone should be on ready mode Unlock the padlock to make it ready The SFAndroid screen shall appear The login pass should be Demo Demo Pressing on the Next button will lead to the Login Role screen The Login Role screen has the values populated from the embedded database seed These samples are from the Vene zuelan team and thus they are in Spanish Next we take a look at how this embedded database is obtained during the Initial Load process 89 10 19 12 13 14 38 15 16 17 18 19 20 21 39 22 23 24 25 26 27 28 4097 aN 1724 5 E2 i Copyleft 2015 Redhuan D Oon SYSNOVA Page 57 of 62 Sales Force Android 1 8 Senih Parada Source of Embedded Sample The embedded sample can be found under the folder res gt libs raw sfandroid It is just an SQLite database that was in use Y Eyres and copied over into the resource folder to be picked up gt Ganim gt 64 drawable during the initial loading process Now this only happens if the SD card is in use either at the emulator or in the phone The code that picks up this seed is in the
49. m Image payment_mixed_h Sql WHERE Group By Clause Sal ORDER BY XX_RV_MB_Openltem Customer Sequence 1 Summary Level Menu Type Menu v Read Write v Active Insert Record Likewise this follows the Compere convention of defining a Report and Process item which in this case is Open tem_inf mb_Openltem You also specify the table it will be accessing in the SQL Lite database on the mobile phone You can also determine the icon image it be displaying for this item on the menu Again all this is happening at the mobile side of the code which will handle its actual rendi tion or output the Android way Menu Mobile Synchronization This menu has the same records as Menu Mobile System just that it is flagged by the column Menu N which indicates it is for table data synchronization between the mobile and the server Copyleft 2015 Redhuan D Oon SYSNOVA Page 21 of 62 Sales Force Android 1 8 Senih Parada Generate Web Service Web services window is used to store settings which manage the mobile app synching proc ess This process handles any new setting needed Most of the web services required by the mobile app are already generated e800 Generate Web Service Do you want to start the Process Search Key Name Web Service Model Oriented Web Services Web Service Method Model Oriented Web Services Create Data v Table xx_MB_Day_Visiting Day Table of Movil S
50. nce Menu Mobile System Menu Mobile Synchronization Generate Web Service 6 Generate Sequence Mobile Sales Planning 6 Order Process Mobile Event Type Days of Visit Frequency of Visit Customer Inventory Planning Visit Visit to Customer Reports Vendor Management Planning Visit Sales Rep Page 31 of 62 Sales Force Android 1 8 Senth Parada DEVELOPER S NOTE BitBucket Source The source code with latest 2Packs for server side are committed to httos 7 bitbucket org redl org ridempiere standroid server Further notes later will cater for the WS and mobile side and assist the developer to work on the code and contribute back to minimize mutual cost of maintenance and sustenance SourceForge net Repository This repository contains all the files referred to including this manual guide It is for easy reference and downloading for use testing and implementation The URL to get this is https sourceforge net projects redl files p2 SFAndroid screen below is from v1 6 Parent folder ExpDat20130812_ 190754 jar MobileData zip MobileSynch zip org idempiere SFAndroid Server_1 0 0 201308122100 jar org idempiere SFAndroidWS_1 0 0 201308102245 jar SFAndroid pdf ExpDat_ES jar MobileData_ES zip Totals 8 Items The server side plugin is org idempiere SFAndroid Server lt time stamp gt jar and the Web Services plugin is org idempiere SFA
51. ndroidWS lt time stamp gt jar The MobileSynch zip is the system model 2Pack that is already embedded into the plugin jar There is the original Latin American Spanish version of the sample data and it is MobileData_ES zip The MobileData zip is translated by me and I appreciate review on that The database dump that contains the MobileSynch and MobileData_ES Pack Out in formation is ExpDat_ES jar Copyleft 2015 Redhuan D Oon SYSNOVA Page 32 of 62 Sales Force Android 1 8 Senth Parada Thus the ExpDat lt timestamp gt jar is a fully English translated version am using that to maintain or modify the 2Packs You can also do the same after DBRestore from this DB dump inside the ExpDat jar Remember to DBExport back a new jar and you can send it back to me if there is any extensions or improvements you did I would appreciate some README txt to explain what you did for my review I will not maintain the original ExpDat_ES jar and it may break if the system model in Mo bileSynch changes I will interact with the Venezuelan team if they are following the original Compiere approach of handling translation through Language packs They told me some what they do but I have yet to go into that 2Pack Exporting From the ExpDat lt time stamp gt jar you can restore to your present 1Dempiere and examine the Pack Out contents Below is for the System side screen below is from v1 6 Export I No Type Entity Type Menu SQLStatement Pa
52. nfig Table AD_User_OrgAccess Table AD_Document_Action_Access Table C_Activity Table C_BPartner Table C_City Table C_Region Table C_Location Table C_BPartner_Location Table C_Bank Table C_BankAccount Sequence Description 90 Create Table AD_User 100 Create Table AD_User_Roles 110 CREATE TABLE AD Process 120 CREATE TABLE AD _Process_Access 130 Create Table AD_SysConfig 140 CREATE TABLE AD_User_OrgAccess 150 CREATE TABLE AD_Document_Action_Access 160 Create Table C_Activity 170 Create Table C_BPartner 180 Create Table C_City 190 Create Table C_Region 200 Create Table C_Location 210 Create Table C_BPartner_Location 220 Create Table C_Bank 230 Create Table C_BankAccount Synchronizing Type Initial a Initial Initial Initial Initial Initial Initial Initial Initial Initial Initial Initial Initial Initial Initial They list the tables that are to be created from scratch at the Mobile App side during Initial Load synchronizing There is a SQL field that stores the exact SQL script to do that The Mobile App will pick up from here and run those scripts into an SQL Lite database and store them inside the mobile phone This happens during synchronising from the phone Copyleft 2015 Redhuan D Oon SYSNOVA Page 17 of 62 Sales Force Android 1 8 Senih Parada Initial Load Sequence File Edit View Go Tools Window Help BDSxEGaG SCA0f7 m Otten Fad Initial Available Choices Sequence Load i E Table
53. o examine each piece of code intact and in play Copyleft 2015 Redhuan D Oon SYSNOVA Page 43 of 62 Sales Force Android 1 8 Senih Parada At the Connection tab above in the Android phone you are to give a User and Password This must be present in the phone but it cannot be on initial launch So entering anything will not mean anything but it is important to use the right credentials as during Initial Load this will be checked So login with the usual SuperUser System In Android programming language this is done by a Avagment code called V_ Login as seen in the above screenshot of the vagment Activity Login class and shown here below when highlighted addFagment V_ Login class Conn J R string tt_ Conn 4196 void aad view VT ConcelOk addFagmenttClass lt gt clazz rien on int title Add Fragment Tab in FragmentActivity It is adding a Tab which in Android programming language is referred to as a vagment Zab Its arguments requested are the class which is V_Login java the sring cag which is Conn and the zzz e integer is passed from the res values login xml entry for tt_ Conn lt string name tt_Conn gt Connection lt string gt Which gives the value displayed on the mobile screen tab title You can try changing this value and see the result to understand how this works out At this point you are beginning to get some grasp of the Android programming framework Returning to the code at the V_Login
54. o into the Mobile System Admin menu L II II IV Initial Load Defines the me g5 tadata for uploading into the Mobile System Admin mobile application AD type Initial Load meta data is the concept used System Sequence to first define the structure of Menu Mobile System data models its tables and Menu Mobile Synchronization S Generate Web Service 88 Generate Sequence Mobile Sales Planning Reports fields Later at menu item IV actual data can be trafficked between the ERP and the mo bile app System Sequence deter mines the Document Sequence numbering format for the data in use by the mobile application Later in VI it is generated based on this Menu Mobile System The menu structure and type of menu item that appears on the mobile phone application This is the classic reuse of Compiere s Application Dic tionary that allows flexibility in changing structure and behaviour without coding It is defined on the server side and sent to the mobile application during Initial Load above Menu Mobile Synchronization This controls the actual data content of the system Includes the traffic and direction of operational data when the synchronization icon is pressed on the mobile phone application It also defines other properties of each item such as type of web service used image icon file reference and Ales before and after the event Both II and IV are of the same Table
55. oject is uploaded to it The last line Install ing SFAndroid apk is Senth Parada _ r eee 5554 Samsung 12 29 THU AUGUST 22 tae ogin java 3 4 7 ow you can implement switching be ar gments using FragmentTabHost Goo ap omeen anjina ends VT_CancelOk te Bundle savedInstanceState ro savedInstanceState Charging 50 ogin class Conn R string tt_ ole class LoginRole R string t GenerarPDF this ed false e SD PATY Search Console X droid Android Launch droid adb is running normally droid Performing org appd login droid Automatic Target Mode Pr droid Launching a new emulator droid New emulator found emule droid Waiting for HOME androi droid HOME is up on device emu droid Uploading SFAndroid apk oa droid Installing SFAndroid apk O ANDROID what you have to watch out for to confirm your set is working as expected You then operate the mobile phone as a normal Android phone and look for your apps SFAndroid should be there as shown below Double tap on it and it should be running the code and hit the debug break ilse Search d Android Launch d adb is running normally d Performing org appd login d Automatic Target Mode Pr d Launching a new emulator emula d Waiting for HOME androt d HOME is up on device emu d Uploading SFAndroid apk c d Installing SFAndroid apk d New emulator
56. ons Also put a debug gin j break in the Login class somewhere so that Debug As L P Debug Configurations we can confirm that everything works 1 e n Organize Favorites gues the Debug the emulator the Manifest and the code You can see that I have done so in the second screen below Copyleft 2015 Redhuan D Oon SYSNOVA Page 40 of 62 Sales Force Android 1 8 Senih Parada a SFAndroid Manifest 3 Login java 8 J V_Connection java J LoadinitData java Product SFAndroid Sales Force Mobile package org appd login Gy import org appd base DB fee This demonstrates how you can implement switching between the tabs of a TabHost through fragments using FragmentTabHost public class Login extends VT_CancelOk 0verride a public void onCreate Bundle savedInstanceState super onCreate savedInstanceState addFagment V_Login class Conn R string tt_Conn o addFagment V_Role class LoginRole R string tt_LoginRole CreatePDFTest GenerarPDF this setPagingEnabled false You can see that the first method that will run is the onCveate Bundle method because the extending of V7_CancelOK is in turn extending ragmentAcavity which does onCre ate Bundle So this overwrites that Note also that addFragment is adding in two more tabs which will come out in the Android mobile screen when this code is running well Back to the Aun Configurations below we add a Sam
57. or taking a E bug report gt cD We are deploying the SFAndroid to the phone in hacker style Later versions we shall learn to deploy it as a Google Play Store app Ensure that in your ADK s Debug Configurations is set to pick up the target device Create manage and run configurations Android Application gt b f LS vs Cl g Name SamsungSFAndroid Y Gj Android Application i l T SamsungSFAndroid Deployment Target Selection Mode q F 5 Ju Android JUnit Test Always prompt to pick device E Android Native Application Launch on all compatible devices AVD s e C C Application fc C C Attach to Application Active devices and AVD s C C Postmort Deb E pee eee i _ Automatically pick compatible device Always uses fc C C Remote Application Java Applet Select a preferred Android Virtual Device for dep PJ Java Application AVD Name Target Name Ju junit Samsung Android 4 2 2 Oe Bese wels Famm Copyleft 2015 Redhuan D Oon SYSNOVA Page 56 of 62 Sales Force Android 1 8 Senih Parada After clicking on the Debug or 4 44 Run AS button in your ADK Select a device with min API level 4 Choose a running Android device Android Device Chooser Debug State you can see the device appear E Ige nexus_4 008747cfd7 ing on the panel fit does not appear reconnect the USB _ Launch a new Android Virtual Device cable If it still does not ap AVD Name Target Name P
58. oredom that goes with writing a highly technical docu ment have interjected it with some photo log at strategic locations I am sure it helps with the sheer boredom that goes with reading a highly technical document May 23rd towards Czech border The famous no speed limit autobahn has to be experienced in Germany s own signature brand by Carlos Ruiz Juan David Arbodela and me in the back seat This was after the iDempiere Conference in Kre feld Juan then took over and managed to floor past 235 kph before I stopped filming and jumped for cover Yes I know He is nuts They then dropped me in Prague where I continued to Bratislava and Budapest with Norbert Bede our Slovakian project member who introduced me to Pavol Kustar who became my personal video maker The photos are taken on the trail of my lifestyle of part project part travel to meet commu nity members and part taking pleasure in the leisure that one often associate with wayfar ing I do keep a more luxurious supply of candid shots in my online albums at Facebook which has the potential of derailing this technical document Thus I have made the appro priate selection to amuse in the minimalist way possible Progress Worksheet 1 0 Main document SFAndroid Server plugin Tokyo July 8 T5 Web service plugin Langkawi August 9 1 6 Update with TableIndex 2Pack changes Kuang August 11 ley Soap Request Response illustration Kuang August 28 1
59. ou need not do these two as I have done it as ExpDat lt timestamp gt jar Ex tract this with jar xvf command to get the AxpDatdmp tor RUN_DBRestore execution into your PostgreSQL data base Note that I do not use Oracle da B amp Application Dictionary Search Definition Entity Type Element Table and Column A 8 Create Foreign Key 88 Create Table Index Create Table Index Do you want to start the Process 8 0 0 Create Table Index iDempiere processing Please wait pes Source E ERP System Home Create Table Index x Do you want to start the Process Processed table 796 Processed index 1 005 Error 0 Process table a_asset MTable 539 A Asset Create table index a_asset_uu_idx MTablelndex 1000000 a asset uu idx AD Table ID 539 MindexColumn 1000000 60352 Process table a_asset_acct MTabie 53123 A Asset Acct Create table index a_asset_acct_uu_idx MTableindex 1000001 a asset acct uu idx AD Table 1D 53123 MincgexColumn 1000001 60353 MindexColumn 1000007 60353 O O OSOS Process table a_asset_addition MTable 53137 A Asset Addition Create table index a_asset_addition_uu_idx MTablelndex 1000002 a asset addition uu idx AD Table 1D 53137 MincexColumn 1000002 60354 Process table a_asset_change MTable 53133 A Asset Change Create table index a_asset_change_uu_idx MTableindex 1000003 a asset change uu idx AD Table ID 53133
60. sitory 2Pack Exporting GardenWorld Sample SFAndroid Web Services POWrapper Android Development Using the ADK Launching via Emulator Login Code SOAP Request SOAP Response Synchronizing Data Trouble shooting Synch Scripts Using ADB command line tools Wipe out User Data Embedded Demo Debug ADK on real Phone Source of Embedded Sample SQLite Data Admin SFAndroid Meta Menu Your chance to contribute 29 31 32 32 32 33 34 36 37 38 38 40 43 45 48 50 52 53 54 59 56 58 59 60 62 v DISCLAIMER AND CREDITS THIS IS AN OPEN SOURCE AND LIBRE SOFTWARE PROJECT WITH NO WARRANTIES WHATSOEVER THIS IS A COPYLEFT DOCUMENT INTENDED FOR FREE DISTRIBUTION AT NO COST http sourceforge net projects redi files ADempiere 20PDF s SFAndroid pdf download NO PART OF THIS DOCUMENT CAN BE REFERRED OR TRANSLATED WITHOUT THIS ENTIRE PAGE INTACT WITHIN THE NEW DOCUMENT ANY DERIVATIVE WORK THAT CONTAINS THIS DOCU MENT MAY BE SOLD AT A PRICE WITHOUT ANY ROYALTY TO THE AUTHOR S HOWEVER A SOFT COPY MUST BE MADE AVAILABLE WITHOUT COST THE LINK SHOULD BE SENT TO THE AUTHOR FOR REFERENCE TRANSLATIONS ARE ENCOURAGED AND APPRECIATED BY THE GLOBAL FREE ERP COMMUNITY DOCUMENT SALES FORCE ANDROID THIS VERSION IS 1 8 DATED September 12 2013 ongoing APPLICATION DEVELOPERS YAMEL SENIH CARLOS PARADA senih erpconsultoresyasociados com cparada erpconsultoresyasociados com PROJECT MANAGER ANGEL MUNOZ angelfmr erpconsultoresya
61. sociados com ERP CONSULTORES Y ASOCIADOS VENEZUELA PROJECT PARTNER JOSE BOTERO LUBO SISTEMAS VENEZUELA jose botero lubosistemas com ve CLIENT USER MANAGER MIGUEL RONDON AGROSILOS PANAMA glapmigue ail com SPECIAL THANKS TO MY GENEROUS HOSTS FOR MY PASSAGE AND WELL BEING THROUGHOUT ANTHONY SOOSAH ELECTRIC COMPANY LTD GHANA PASSAGE TO GERMANY THOMAS AND MICHAELA BAYEN WITHIN GERMANY WERYSSON DANTAS AND EDILSON NETO WITHIN BRAZIL AND PASSAGE TO VENEZUELA ORLANDO CURIELESS MARIANA and MIGUEL HERNANDEZ WITHIN VENEZUELA PLUGIN UPGRADE amp AUTHOR OF THIS DOCUMENTATION REDHUAN D OON redi redt org SPONSOR ZEESHAN SYSNOVA BANGLADESH zeeshan gmail com LATER CREDITS DEEPAK PANSHERIYA for assisting in web services trouble shooting and solving it in new plugin deployment MIGUEL HERNANDEZ for translating to Spanish language 6 ON THE GO When I finished the last mission which is the iUI Mobile conversion into an OSGi plugin for iDempiere I was on the way back from Siberia to Germany to partici pate in the first iDempiere training and also the first iDempiere world conference in Krefeld At the same time one of the attendees Edilson Neto pronounced Air zeal sen from Brazil negotiated a further travel arrangement for me to be in Latin America to coach and assist his team in Fortaleza Brazil I offered to do that provided I am given combined passage to Venezuela a country I have not set
62. sung emulator via the Manager at the bottom 9 Create manage and run configurations Android Application CB x E Sr Name SFANdroid type filter text E Android gt E common v Gj Android Application E SFANdroid Active devices and AVD s Ju Android JUnit Test E Android Native Application fe C C Application utomatically pick compatible device Always uses preferred AVD if set below launches on compatible device AVD otherwise Select a preferred Android Virtual Device for deployment fe C C Attach to Application AVD Name Target Name Platform API Level CPU ABI Details fe C C Postmortem Debugger Samsung Android 4 2 2 4 2 2 17 ARM arm fe C C Remote Application isana Ej Java Applet B Java Application Ju JUnit Launch Group ral Remote Java Application Refresh Manager Apply Revert Filter matched 13 of 45 items C cose oeu Once an emulator is added and checked we can press the Debug button and see what hap pens Copyleft 2015 Redhuan D Oon SYSNOVA Page 41 of 62 Sales Force Android 1 8 You will see a pop up Samsung emulated phone device on your desktop If it is hidden just look up for it in the background Switch it on by flicking the padlock icon to the side Note also the Con sole showing prompts in its logs depicting the suc cessful launch of Android and other processes per formed before the SFAn droid pr
63. t the DDMS perspective go to the folder of data data org appd base databases and select SFAndroid then click on the DB icon on the top right corner to select the view The following screen is a guide FY g Java SVN Repository Exploring F Debug amp DDMS Devices gt H 2 Thre Heap Alloc Netw igi FileE X Emu O Syste 7 O 0 02 ola Ra 7 v7 Name Size Date Time Per a Foa So ee are carrera Name Y 2 org appd base 2013 08 28 06 41 drv COM androla GEsKCIOCK O24 gt amp cache 2013 08 28 02 57 drm com android exchange 648 Y databases 2013 08 28 03 16 dru C com android calendar 703 T LogCat Questoid SQLite Browser 3 E Console Database Structure Browse Data SFAndroid journal Name Object Type gt AD_Client table AD_Column table P AD_Org table P AD_ Role table P AD_Role_OrgAccess table AD_SysConfig table AD_User table AD_User_OrgAccess table P AD_User_ Roles table gt android_metadata table XX_MB_MenuList table sqlite_autoindex_AD_Client_1 index sqlite_autoindex_AD Column_1 index salite autoindex AD Ora 1 index 8720 2013 08 28 03 16 m Schema CREATE TIABLE AD Client AD_Client_ID NUI CREATE TABLE AD_Column AD_Column_ID CREATE TABLE AD_Org AD_Org_ID NUMERI CREATE TABLE AD_Role AD_Role_ID NUMEI CREATE TABLE AD_Role_OrgAccess AD_Rol CREATE TABLE AD _SysConfig AD_SysConfic CREATE TABLE AD_User AD_User_ID NUME CREATE TABLE AD_User_OrgAccess AD_Us CREATE T
64. the AD approach allows the same flexibility to modify the menu format of mo bile clients without updating the Android app I took the liberty to express my personal and pleasant surprise to the development team in Venezuela that this is truly marvelous ingenuity of the best a copycat can be I also give them advanced praise that this may be a killer app that the world of ERP has been looking for They even demonstrated to us how the Android can now do WorkFlow approval as re quired Glossary AD Application Dictionary is Compiere s architecture that was copied by its forks such as OpenBravo ADempiere and iDempiere where data defines its application structure of menus windows tabs fields data types and references with other abstract but common behaviour in a Financials ERP system Mobile App the application software that you can install on your mobile phone that runs Android operating system or compatible with it There are other interchangeable terms such as mobile phone app Android app mobile application and they all effectively means the same thing Sometimes we can also call it by the project name SFAndroid or refer to it as the client side Server side ERP the iDempiere ERP system which oftens runs on a host server with ac cess to its main database and connected to the Web in order for it to function fully The term server side 1s often emphasised to differentiate it from the client side WS Web Servic
65. thus be Dixon Martinez Menu Mobile System ff setAD_Tree_SF_SyncMenu_ID SF_SyncMenu_ID TODO example of hengsin using POWrapper extends core M lt Class gt I_AD_ClientInfo iinfo POWrapper create this I_AD_ClientInfo class iinfo setAD_Tree_SF_SyncMenu_IDCSF_SyncMenu_ID End Dixon Martinez Here you wrap only the extended I_class without generating the X counterpart You then packaged your new M class as a distinct package for your plugin own usage package org compiere mb model You are thus not taking over the core MInfoClient and overriding it Heng Sin explained that this minimizes or eliminates the future impact to the core breaking your module and vice versa Copyleft 2015 Redhuan D Oon SYSNOVA Page 37 of 62 Sales Force Android 1 8 Senih Parada ANDROID DEVELOPMENT The Android mobile app been a new introduction into the community and project deserves a starter tutorial for our developers on how to review and debug such code Though the code can now run off the shelf as it is decoupled from the server side which is now working in iDempiere OSGi framework I dedicate some practical insight that will bring our devel opers to speed Those attempting this should already be experienced project developers I also do the minimal freedom code to unlock the hard coded backend URL to WS commu nication so that users can implement this freely on iDempiere or own server side ERP Using the ADK You shoul
66. vertSoapToArraylist CInitialLo ad java 261 AndroidRuntime at org appd sync read InitialLoad initialLoad InitialLoad java 184 yx This is due to a missing tag in the SQL script The remedy is Client aaa to put back the tag and run the Name Synchronization synch action again from the mo Description Sincronizacikifn XX_MB_MenuList bile app SQL XX_MB_MenuList_ID AD_Form_ID OrderByClause XX_MB_ParentMen MenuType Name Description XX_MB_MenuList_Menu of Mobile Syst Table Copyleft 2015 Redhuan D Oon SYSNOVA Page 52 of 62 Sales Force Android 1 8 Senih Parada Using ADB command line tools There was once i could not get to see the contents of the data in the DDMS Questoid viewer I tried another tool that can It is the ADB tool under AndroidSDK sdk platform tools Below is the screen shot of it in action First you CD to the platform tools directory in your development space via a terminal win dow Then execute the ADB shell with the command adb s emuLlator 5554 shell The port number 5554 is known with the command adb devices Then call SQLite3 editor pointing to the location of your database sqlite3 data data org appd base databases SFAndroid At the sqlite3 prompt you can begin issuing SQL scripts and commands ending with semi colons as shown in the screen capture above Copyleft 2015 Redhuan D Oon SYSNOVA Page 53 of 62 Sales Force Android 1 8
67. w it If you want to allow a field to be editable you can look at how I did it for the URL SOAP field by peeking into this java class V_Connection look at line 86 and 87 red1 allow user setting et_UrlLSoap setTextC http 192 168 1 2 8080 AppDroidServices SFservices AppDroidServices wsdL et_UrLSoap getText toStringQ trimd Put this after line 89 and you can make that field from read only to editable et_NameSpace getText C toStringC trimd Copyleft 2015 Redhuan D Oon SYSNOVA Page 45 of 62 Sales Force Android 1 8 Senth Parada Next you reduce the keypad to see the Ini tial Synchronization button for you totap PSSI on The IntialLoad class will activate and make a SOAP call via HTTPTransport API to the WS port At first I have a hard time making this work due to a fault in the WS URL SOAP http 192 168 1 9 8080 AppDroidServices Name Space http www erpconsultoresasociados com setting and Deepak Pansheriya helped me Init Synchronization Method debug using the TG PMON tool which hacks InitialLoad the packets going to and fro between the Limit Quer ports In the end he told me that the setting 0 for WS in the interface class of AppDroid Timeout Service is wrong The right setting for its 0 SOAPBinding is not Style RPC but shown v Save data SD Slow below Initial Synchronization SOAPBindingCstylLe StyLe DOCUMENT uwse Use LITERAL parameterStyle ParameterStyLle WRAPPED To d
68. you need not Select Role if your client is default to System At the System Menu you carry out a Sequence Check tt should return you some lines of processed sequences SuperUser System System Administrator Sequence Check v Menu Feedback Preference Change Role Home Sequence Check x Check System and Document Sequences Check that System and Document sequences are correct Run this process if you get Duplicate Key error messages Sequence Check BankAccount_Processor AD_InfoWindow_Access IAD _SessionInfo_v ID 1000000 gt 1000002 J Parameter 9 Cancel Copyleft 2015 Redhuan D Oon SYSNOVA Page 28 of 62 Sales Force Android 1 8 Senth Parada Mobile Data Pack In Now you are ready to pack in the mobile server side setup data into the new models that were packed in during plugin install Change the Role you are in to GardenAdmin Go to the Pack In menu SuperUser amp GardenWorkd GardenWorid Admin iDempiere i Pack In hi Feedback Preference Change Role L Home 13 Packin x BA x Salo 38 R EL 33 e Packin 1 1 A A Client System Organization Name org idempiere SFAndroid Server Created 07 28 2013 9 54 52 AM Update System Maintained Application Dictionary Date Processed 07 28 2013 9 56 00 AM Processed 2015 Un Resolved 0 Process Message Packin You will notice that the earlier system pack in record is logged with objects processed and non Un Resolved This is
69. ystem Organization Access Name MB Menu Planning Visit Description Menus Displayed by clicking on the icon Planning to Visit Comment Help Active L Entity Type Android Data Access Level Client Organization Classname org appd view M_MenuPlanningVisit Context Help Here in the Classname field it is calling SFAndroid Meta data Setting org appd view M_MenuPlanning Visit CET Mobile side This class is an Android Java class and it jja Android App ystem exists at the mobile side When the app is downloaded into your mobile phone it must contain this class in its jar or it will hit a Class VottFound Exception Menu Mobile System on ERP side controls the Classname to be run on Android side This also allow better security where unauthorised code cannot run on your mobile app without been defined here on the ERP server side Copyleft 2015 Redhuan D Oon SYSNOVA Page 20 of 62 Sales Force Android 1 8 Senih Parada Mobile Other Action Besides the Form action the Mobile Menu can also contain other actions such as Process and Report The screenshot below is for a Process example File Edit View Go Tools Window Help enS BRE ZQA200HR Ae Fed BRAA Menu Mobil System Client GardenWorld Organization Name Outstanding Balances Description Displays Outstanding Balances by Customer and Delivery Address Action Report z Special Form Table XX_RV_MB_Openltem_XX_RV_MB_Openlter v Process Open Item_inf_mb_Openlite
70. ystem T_XX_MB_PlanningVisit E Synchronize Type jnitial Sll s The nature of the mobile app is a standalone ERP system that handles its own process and merely replicate back key information back to the server Thus what is more needed is just Read or CreateUpdate WS routines Web Service Security Window This window is accessed via the GardenAdmin client where you can examine the defined settings for mobile server synchronization management There are some new fields intro duced not shown in screen that helps the synch activity Web Web Service Type Search Key Name Table Service Type 1 ReadDays Read Business Days XX_RV_MB_Day_View Of Mobile Days Web 27 CreateVisitLine Create Online Business XX_MB_VisitLine_Line of Visit Service Parameters 28 CreateCustomerinventory Customer create inventory XX_MB_Customerinventory_Customer Inven rau Field Input 2 CreateDay Insert In Days XX_MB_Day_Visiting Day Web 31 UpdateSequence Update Sequence XX_MB_Sequence_XX_MB_Sequence Sequen Service Field Output 34 ReadC_City Read City XX_RV_MB_C_City_XX_RV_MB_C_ City Web 33 ReadC_Region Read Region XX_RV_MB_C_Region_XX_RV_MB_C_Region Service Access 36 ReadRMAType Read RMA Type XX_RV_MB_M_RMAType_XX_RV_MB_M_RMA 37 ReadinOut Read Delivery XX_RV_MB_M_InOut_XX_RV_MB_M_InOut 38 ReadinOutLine Read Delivery Line XX_RV_MB_M_InOutLine_XX_RV_MB_M_InQu 41 CreateRMA Read RMA M_RMA_RMA 42 CreateRMALine Create RMA Line M_RMALine_RMA Line

Download Pdf Manuals

image

Related Search

SFANDROID android studio android 21 android service tool sandroyd school sfa android standroid github sandroidteam sfw android ssf android sfw android games ssf android apk

Related Contents

個人ばく露濃度測定 - sibata.co.jp    CT2000 User manual - ANBTEK GPS Tracking Platform  OFF ON Installation Manual  eBOX670-883-FL User`s Manual VA1  Paxar Freshmarx 9415 User's Manual  組付・取扱説明書  Pitney Bowes W660 User's Manual  DEMULTIPLEXOR DIGITAL MANUAL DE USUARIO  https://www.paramo.jp/contact/ http://www.paramo.jp/ Paramoの主な  

Copyright © All rights reserved.
Failed to retrieve file