PREREQUISITE ................................................................................................................................................ 3 http://developer.android.com/sdk/installing/installing-adt.html ................................................................. 3 STEPS TO DEPLOY AN SAPUI5 APP TO ANDROID DEVICE USING PHONEGAP .................................... 3
Deploy a SAPUI5 Mobile App to Android Device 3
PREREQUISITE You should have installed Android SDK and Android tools for Eclipse http://developer.android.com/sdk/installing/installing-adt.html
STEPS TO DEPLOY AN SAPUI5 APP TO ANDROID DEVICE USING PHONEGAP 1. Launch Eclipse and go to Java perspective
2. Click on File -> New -> Android Application Project
3. Enter the application name as refapp-msapandroid-companylist as shown in the below pic, select the minimum required SDK, Target SDK, Compile With, Theme as shown in below pic and click on Next button
Deploy a SAPUI5 Mobile App to Android Device 4
4. Click on Next button with the default selection
Deploy a SAPUI5 Mobile App to Android Device 5 5. Click on Next button with the default selection
6. Click on Next button with the default selection
Deploy a SAPUI5 Mobile App to Android Device 6 7. Use the default names and click on Finish button to complete the project creation
8. The following window will be opened after the project creation
Deploy a SAPUI5 Mobile App to Android Device 7 9. Select the Assets folder in the project explorer and select New -> Folder
10. Enter the folder name as www and click on Finish button
Deploy a SAPUI5 Mobile App to Android Device 8 11. Download PhoneGap libraries (2.9 Version) from the location and extract it to a folder in your system. Extract the zip file and copy paste the cordova.js, cordova-2.9.0.jar and res folder to your project hierarchy as shown in the below picture
12. After this, the libraries should be visible in the project build path libraries section
Deploy a SAPUI5 Mobile App to Android Device 9 13. Add the below two lines in the MainActivity.java file. Also, change the Extends to DroidGap
Deploy a SAPUI5 Mobile App to Android Device 11 15. Copy and paste the content of WebContent directory under your SAPUI5 project to www directory of the Android project
16. Download SAPUI5 resources from http://scn.sap.com/community/developer-center/front-end In the download section, download the available version accepting the license agreement. Extract the zip file to a location and copy the resources folder to folder www in your project.
Deploy a SAPUI5 Mobile App to Android Device 12 17. Open the index.html and add the following lines as shown below
18. Congratulation. You have successfully wrapped your SAPUI5 application in PhoneGap container that can be run on Android Emulator and devices
2013 SAP AG. All rights reserved. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company. Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc. Sybase is an SAP company. Crossgate, m@gic EDDY, B2B 360, and B2B 360 Services are registered trademarks of Crossgate AG in Germany and other countries. Crossgate is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.