cancel
Showing results for 
Search instead for 
Did you mean: 

Converting SAPUI5 to .apk using Phonegap build

former_member197888
Participant
0 Kudos

I have made an SAPUI5 app and now I want to make this app as a native app so for that I used Phonegap build . Using that my application got converted successfully to .apk format . Now I installed that application on my Android device . The app successfully opens but then it displays a balnk screen nothing is displayed and even no error is shown. So can anyone help me with it?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey there

Look at this link to see how to debug your phonegap app:

Remote Debugging Devices | Web Tools - Google Developers

Maybe you can find the error by this. Otherwise if I look at your index.html, you download your resources from the sapui5 website, not from the local www/ folder, maybe you aren't allowed to download them from the sapui5 website.

Mabye you can change your path to the local SAPUI5 Ressources

<script src="resources/sap-ui-core.js"

  id="sap-ui-bootstrap"

  data-sap-ui-libs="sap.m"

  data-sap-ui-theme="sap_bluecrystal">

or allow the domain SAPUI5 SDK - Demo Kit for your android app using this link:

GitHub - apache/cordova-plugin-whitelist: Mirror of Apache Cordova plugin whitelist

Regards

Fabian

former_member197888
Participant
0 Kudos

Can you please explain what is cordova-white-list plugin and do I need to include that in my config.xml?

Former Member
0 Kudos

If you're downloading the SAPUI5 Library from the SAPUI5 Website or accessing any other URL than localhost, you need to set it up. You'd be best if you debug your app so you can look where the error is.

former_member197888
Participant
0 Kudos

After debugging I am getting an error . I am posting the screenshot of the error . Can you please

guide me further ?

And the screenshot of my config.xml file after adding the whitelist plugins is as shown below:-

Former Member
0 Kudos

Hey there

Not sure what the Error is, do you have any sourcecode available? Otherwise you can try to generate your apk file using the WebIDE so you don't have to use PhoneGap Build.

Regards

Fabian

former_member197888
Participant
0 Kudos

which sourcecode you are talking about? It is showing some error from index.html but actually this application runs fine when viewed on browser .

Answers (2)

Answers (2)

Former Member
0 Kudos

You  are  getting  blank screen means there is no ui5 resources in your project. Download resources from openui.org and copy it into webapp folder.Then generate the apk.

former_member197888
Participant
0 Kudos

I did as you said but still the blank screen is displayed  .

Former Member
0 Kudos

could you please send the screenshot of folder structure and index.html.Do one more thing.Enable debugging mode i device by connecting usb cable. Check what is the error in console.

former_member197888
Participant
0 Kudos

The screenshot of the folder structure inside webcontent folder is as follows:-

And please find the attachment of index.html

And do you need logcat?

junwu
Active Contributor
0 Kudos

which document you are following?

did u pack the ui5 lib?

former_member197888
Participant
0 Kudos

I first created an application using eclipse IDE and then it works properly on browser . Now I want to convert it into device specific format i.e .apk as I want to run this app as native app so for converting it into .apk format I followed the steps mentioned in the following link:-

UI5 and PhoneGap Build: First steps (part 1 of 3)

and how to pack UI5 libraries?

And apart from this is there any way with which i can convert the application to .apk?