cancel
Showing results for 
Search instead for 
Did you mean: 

Packaging a sapui5 app with phonegap

Former Member

Hi,

Is there anyone who knows how to structure of my project has to be in order to package it with phonegap? When you make a sapui5 application with eclipse, the libraries are not stored in the project. When you want to package the application, you need those.

Btw, I package my app using this website: https://build.phonegap.com/

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

AndreasKunz
Advisor
Advisor

Hi Robbe,

basically you need the "sapui5-static.zip" from the SDN evaluation version (SAPUI5 as a file tree) and unzip it to a location in your project close to your HTML file.

This file is (zipped) 28.4 MB large - too large for reasonable mobile apps - but contains A LOT of stuff which is not needed at runtime and also many duplicate files in different versions (like debug plus optimized, single control files plus merged library files plus library preload files,...).

For the new "sap.m" mobile library an optimized package (< 2 MB) might be provided soon, but with some manual deletion you can also quickly get below 5 MB (for the sap.m library - when you are using other libraries, the steps and the resulting size are different:

From sapui5-static.zip, delete:

/test-resources/*

/discovery/*

/resources/sap-ui5-dbg.js

/resources/sap-ui-core-all-dbg.js

/resources/sap/uiext/* 

/resources/sap/service/* 

if you don't need them the /resources/sap/makit and/or /resources/sap/viz chart libraries

and in /resources/sap/ui/ the following library folders (when you wantto use sap.m, otherwise adapt your deletion):

commons

qunit

richtexteditor

table

test

ux3

There is also some PhoneGap-related documentation here:

https://sapui5.netweaver.ondemand.com/sdk/#docs/guide/WebContainer.html

Regards

Andreas

Former Member
0 Kudos

ok, thanks!

Answers (5)

Answers (5)

0 Kudos

Hi,

I have created an SAPUI5 Project with data coming from different SAP Gateway Server.

Now i have integrated it into the Phonegap Project as i have done for different project.

But the data is not coming in the Mobile APP.

Screen is rendered without data.

Could you please help me with the same?..

Thanks & Regards:

Azhar

Former Member
0 Kudos

Hi,

Even I'm getting similar error. The view is not being displayed . I'm getting a blank page

I have copied the resource folder as specified.

Error message is: Failed to preload 'sap.m.library-preload'

Can someone help me with this

Thanks in advance

Former Member
0 Kudos

I think this Thread Might help you Vinuta

http://scn.sap.com/thread/3380807

Former Member
0 Kudos

Hi vinuta

I have the same issue have u resolved this problem?

Regards

Anju

Former Member
0 Kudos

Hey friend,

   As You Mentioned above I have copied my Static folder into my Project Near to my Index.html file ( In the Web Content) After copying What We must do ??

AndreasKunz
Advisor
Advisor
0 Kudos

Hi,

nothing UI5-specific.... follow the Phonegap instructions, write your app.

The above step is the step required to make UI5 available in your Phonegap app, that's it.

Regards

Andreas

Former Member
0 Kudos

How to Run my app in PhoneGap yar ??

AndreasKunz
Advisor
Advisor
0 Kudos

Hi,

sorry, this is Phonegap-specific knowledge and not related to UI5. Please consult their documentation or their forums.

Or maybe someone here wants to answer, but it's not a UI5 question.

Regards

Andreas

Former Member
0 Kudos

Plop Ok Friend, i am trying to build my SAPUI5 App into an Android device using Phonegap and Eclipse , i am Read all blogs and Threads But nothing is Working For me . Do you have any Idea Of that.  My app is a simple table getting Json data from my Localhost...... What should I Do.    Dont reply with any Threads , Since i have read everything related to this....... I have Explained my Simple app Clearly..... Any Suggestion From Ur side how to build that in android Device in eclipse using Phonegap

And my thread is here

Former Member
0 Kudos

Post the error messages or something. Since we cannot see your screen it's pretty difficult to help you this way...

Former Member
0 Kudos

Hey,

Actually Your Thread Heading is what i want,

   Packaging a sapui5 app with phonegap

First of all No one gave me a solution friend How to package my SAPUI5 app into phonegap and to run in a android Device.....I have Tried Various Methods but None Works For me ??? Can anyone kindly Help Me to ???

Former Member
0 Kudos

Hey After reading many Threads and some R&D  i Run my SAPUI5 app in android device .....Basically  in my SAPUI5 app i am getting Table data from Localhost and I have put a alert If no Data comes and ....When i run in android device its Pops up ALERT Error and (That means my code is working ?).  then after that i receive error message 😮 Help me friends

Where i am Going wrong

Former Member
0 Kudos

Hi Shri Vishnu Priyan Krishnamurthy,

We are doing the same and getting error on resource folder after optimizing it and including it in web content folder.Can you please let us know who to solve that error???

Thanks & Regards,

Anjali

AndreasKunz
Advisor
Advisor
0 Kudos

Hi,

I just noticed I have an update for this. For hyprid apps there is now a streamlined zip file contained in the SCN version of SAPUI5: "mobile-static.zip" (or "mobile-static-opt.zip").

It is roughly 4 MB large in version 1.16 but still contains debug plus optimized version of all files, two themes, and some other extra stuff, so it can be stripped down further. On the other hand you may want to add a certain control library. So basically it is an "as good as possible" starting point for manual adaptation.

There is some documentation on these adaptations at http://veui5infra.dhcp.wdf.sap.corp:8080/demokit/#docs/guide/WebContainer.html (this one refers to 1.14, but if you deploy your own SDK demokit from SCN you should find the current version, which is not vastly different).

Andreas

Former Member
0 Kudos

Hello!

See my new blog post for the structure of the project:

http://scn.sap.com/community/developer-center/front-end/blog/2013/04/06/sap-and-mobile-powers-combin...

Regards

Morgan