Escolar Documentos
Profissional Documentos
Cultura Documentos
TABLE OF CONTENTS
PREREQUISITE ................................................................................................................................................ 3
http://developer.android.com/sdk/installing/installing-adt.html ................................................................. 3
STEPS TO DEPLOY AN SAPUI5 APP TO ANDROID DEVICE USING PHONEGAP .................................... 3
2
Deploy a SAPUI5 Mobile App to Android Device
PREREQUISITE
You should have installed Android SDK and Android tools for Eclipse
http://developer.android.com/sdk/installing/installing-adt.html
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
3
Deploy a SAPUI5 Mobile App to Android Device
4
Deploy a SAPUI5 Mobile App to Android Device
5
Deploy a SAPUI5 Mobile App to Android Device
7. Use the default names and click on Finish button to complete the project creation
6
Deploy a SAPUI5 Mobile App to Android Device
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
7
Deploy a SAPUI5 Mobile App to Android Device
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
8
Deploy a SAPUI5 Mobile App to Android Device
13. Add the below two lines in the MainActivity.java file. Also, change the Extends to DroidGap
super.setIntegerProperty("loadUrlTimeoutValue", 60000);
super.loadUrl("file:///android_asset/www/index.html");
14. Copy and paste the following content into the AndroidManifest.xml. Paste it below the use sdk
section.
supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"
android:anyDensity="true" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
9
Deploy a SAPUI5 Mobile App to Android Device
10
Deploy a SAPUI5 Mobile App to Android Device
15. Copy and paste the content of WebContent directory under your SAPUI5 project to www
directory of the Android project
11
Deploy a SAPUI5 Mobile App to Android Device
17. Open the index.html and add the following lines as shown below
<script src="resources/sap-ui-core-nojQuery.js"
18. Congratulation. You have successfully wrapped your SAPUI5 application in PhoneGap container
that can be run on Android Emulator and devices
12
www.sap.com
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.