And the folder structrure of WebContent is as shown in the below image .
- 68 Posts
- 0 Reply Likes
Posted 4 years ago
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
2. You are using an old, deprecated barcode scanner plugin from the pgb repo. Please replace by the latest from npm.
(See the PGB Docs, Plugins section).
Also, you don't have any icons and splashes (recommended for Android, required for iOS).
- 68 Posts
- 0 Reply Likes
But what is the purpose of using whitelist plugin ?
Is because of this reason that I am getting blank screen displayed?
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- pulling code from the web (like css and/or js libraries
- navigating to an external url
- getting/posting data from/to a web service,
then you need those places whitelisted, otherwise you might see a white screen.
As I already wrote: Please read and apply its documentation. You may also want to have a look at the Whitelisting section of the PGB docs, first.
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Depending on whether or not yu are incuding a CSP, you need to whitelist external sources there, too.
- 68 Posts
- 0 Reply Likes
Now when I am trying t run its showing an error whose screenshot is as shown below:-
So can you please help me with it as path to index.html would be mentioned in config.xml . So why is it not getting index.html from config file?
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Replace by
<plugin name="cordova-plugin-whitelist" />
2. It is getting the index.html. The error message indicates that the error takes place in index.html.
3. You may as well remove that content element from the config. That setting is the default.
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Why would you still want to use the gap namespace?
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
(If you don't know, please make your zip file available on the web somewhere and post its url here, so I can have a look if you wish)
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 68 Posts
- 0 Reply Likes
- 68 Posts
- 0 Reply Likes
Inside assets:-
Inside assets --> www:-
Inside res:-
If there is any way other than this please let me know I can provide you the zip.
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 68 Posts
- 0 Reply Likes
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
1. You don't have both index.html and config.xml in the root ("/"), where they should be. They are in in a directory called /WebContent
Easiest solution: just use the CONTENTS of that diectory as input for PGB.
2. You have no icons and splashes, which are highly recommended for Android and required for iOS
3. You don't have a reference to cordova.js in your index. You should add that.
4. You have
getUrl("/sap/opu/odata/sap/Z_PASSWORD_RESET_DEMO_SRV_SRV/"),true);
That relative url starts with a slash, which means it's looking for the path from the device root. The mentioned path is not present in your assets.
5. You have
(window.location.hostname == "localhost")
which will not evaluate to true on your device.
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
This plugin is activated after cordova.js has been executed (it fires the deviceready event). Only then your external URL can be accessed from the webview, if properly whitelisted.
- 68 Posts
- 0 Reply Likes
folder . Then is it ok? Or it would be neccessary to write deviceReady function?
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
This is a Cordova requirement
http://docs.phonegap.com/en/4.0.0/cor...
- 68 Posts
- 0 Reply Likes
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
2. Yes, the references will be evaluated and loaded if you have the whitelist plugin in your config and you have set the allow-navigation rule (which you have now)
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Now, how does this test? Any success?
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 68 Posts
- 0 Reply Likes
Now after testing I will let you know
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Googling for this message in combination with SAP UI5, I am getting the impression that a proxy-http url is attempted. If that is the case, whitelisting will not be sufficient for http:// and https://
Have you tried the SAPUI5 support forum? They might have heard of this situation and perhaps know an immediate solution.
- 68 Posts
- 0 Reply Likes
And if we are using proxy then do we need to do any extra configuration or add some plugin or something?
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
In this case, I would just be googling for the error message and trying to understand given solutions, if any. But first, I would see what kind of URL is generated by that getURL() method in your script. That would give me more information on what to google for.
- 68 Posts
- 0 Reply Likes
- 68 Posts
- 0 Reply Likes
and another problem is that I have added icon to my app but it does not get displayed still the one that is provided by default comes.
The icon gets displayed here
But then when I download they apk and install it I get the default icon . Why is it so?
And the screenshot of my config file is as folows:-
And yes my icons are stored inside www/image folder.
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
For instance:
var app = new sap.m.App({initialPage:"idPassword_reset1" , id:"app"});
var page = sap.ui.view({id:"idPassword_reset1", viewName:"password_reset.Password_reset", type:sap.ui.core.mvc.ViewType.XML});
var page1=sap.ui.view({id:"generate_validate_rcode", viewName : "password_reset.Generate_Validate_R_Code" , type:sap.ui.core.mvc.ViewType.XML});
app.addPage(page).addPage(page1);
app.placeAt("content");
This is probably something you would have to ask at SAPUI5 forums, because it's no Phonegap Build issue. After all, yur app builds, now.
About the icon:
- your height and width values are syntactically incorrect. Should be numeric
- I have not checked the actual dimensions of the graphics. Are they as defined by Google?
http://developer.android.com/guide/pr... (halfway that page)
- would be helpful to specify the icons in config using a qualifier (i.e. 'xxhdpi') as described in the Icons and Splashscreens section of the PGB docs.
- 68 Posts
- 0 Reply Likes
Because when i placed them inside my image folder of Webcontent my icons where not replaced by the default icons in the res folder of the apk,
And yes regarding height and width the height and width is same as the size of icon .
I referred this link:-
http://stackoverflow.com/questions/12...
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
And where should the icons be actually placedWherever you like. It's OK, as long as the paths in config are valid references.
But the values height/width in your config are invalid, and you should set the qualifier for screen size. Also, in your Github repo, I dodn't see any icons for xxhdpi or xxxhdpi
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Once the app is built, there is nothing Phonegap Build will do with the app at execution time. PGB will certainly not call your application server, because PGB is not "active" in your app at execution time.
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
2. Your object oModel is apparently not defined. Since this object has nothing to do with PGB, you will have to find the cause in your code or the UI5 framework. How do you generally debug your alpha test versions?
- 68 Posts
- 0 Reply Likes
This is how we have defined Odata :-
And the error is shown on the following code :-
oModel.read("http://hilsaps02bt.global.enterprise:... eq '"+Username+"' and Systemid eq '"+Systemid+"' and Clientno eq '"+Clientno+"'", null, null,true,fsuccess);
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
This is how we have defined Odata(most likely oModel instead of oData was meant)
Well, yes, you have an instantiation of the oModel object. But if sap.ui.model.odata.ODataModel() doesn't return an object, oModel would still be undefined.
So, you must find out why that is the case. My guess is that the mentioned url in the parameter can't be reached.
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Still, you would have to check what is returned by said instantiation of the object.
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
for accessing that URL you need to login from the client VPNHow is the app logged in through a VPN?
- 68 Posts
- 0 Reply Likes
- 68 Posts
- 0 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 68 Posts
- 0 Reply Likes
Related Categories
-
PhoneGap Build
- 15111 Conversations
- 275 Followers




. 