I created an App that has worked on all android devices for 1.5 years.
I just updated my Samsung S4 to OS version 5.01 and now all elements are much smaller. (those Div's which have a height property set in px, as well as all images and background images.
Do you have any suggestions how this can be easily corrected.
連結已複製
Can anyone explain why the layout should change so drastically when going from android OS 4.4.2 to 5.01
I was using the same samsung S4 phone and all elements seem to be 1/3 their normal size (I uploaded 2 screen shots)
The App was developed using the intel.xdk and no other framework. I tried using Crosswalk and it looks bad as well.
John, can I still use the intel.xdk api, namely
intel.xdk.display.useViewport(760,1024);
intel.xdk.device.setRotateOrientation("portrait");
intel.xdk.device.setAutoRotate(false)
intel..xdk.device.hideSplashScreen();
intel.xdk.cache.getCookie
intel.xdk.cache.setCookie
intel.xdk.device.getRemoteDataWithID
intel.xdk.device.launchExternal
If not do all of these have an identical functioning equivalent in cordova.
This code works on an iOS app I just built, but does not work in the XDK.
function getRemoteDataExt()
{
//GET method example
console.log("in here");
var parameters = new intel.xdk.device.RemoteDataParameters();
parameters.url = "http://www.xxxx.net/ssss.xml";
parameters.method = 'POST';
parameters.id = '12345';
parameters.body = "";
parameters.addHeader('Content-type', 'application/json; charset=utf-8');
intel.xdk.device.getRemoteDataExt(parameters);
var getRemoteDataEvent=function(event)
{
if(event.success){ alert(event.response); console.log(event.response); }
else { alert('fail'); }
}
//Example Event Handlers
document.addEventListener("intel.xdk.device.remote.data",getRemoteDataEvent,false);
}
Here is the format I am using. It was working until I updated to the cordova build.
intel.xdk.device.getRemoteDataWithID("http://www.xyz.com/mobile/xyz.asp?Country="+CountryCde,"POST","E-MAIL=ouremail@xyz.com&TEST=1&MAX=0","UMsuccess_handler","UMerror_handler",uniqueID3);
}
function UMsuccess_handler (uniqueID3, data) {
document.getElementById('UMrslts').innerHTML=unescape(data);
}
fnction UMerror_handler(uniqueID3, data) {
document.getElementById('UMspnnr').style.visibility = "hidden";
alert("error: " + data);
}
Still no answer ???
Now when I try building it I get a build error :
I have had nothing but problems since I upgraded to the cordova build from the legacy build.
1) I cannot get the intel.xdk.device.getRemoteDataWithID. function to work on an actual device.
2) The build function now fails (see below)
I am reaching the point where I can no longer justifying spending more time on this. Do you offer a pay for support program.
I am ready to forget about the intel.xdk and move on to something else.
BUILD FAILED /Developer/android-sdk-linux/tools/ant/build.xml:653: The following error occurred while executing this line: /Developer/android-sdk-linux/tools/ant/build.xml:698: null returned: 1 Total time: 4 seconds .../carlogavazandroida41/platforms/android/cordova/node_modules/q/q.js:126 throw e; ^ Error code 1 for command: ant with args: release,-f,.../carlogavazandroida41/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen Command finished with error code 8: .../carlogavazandroida41/platforms/android/cordova/build --release Error: .../carlogavazandroida41/platforms/android/cordova/build: Command failed with exit code 8 at ChildProcess.whenDone (/Developer/cordova/4.1.2/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:743:16) at Process.ChildProcess._handle.onexit (child_process.js:810:5)
Hello Greg, you have to check the device plugin under Featured & Custom Cordova Plugins (on the right side of plugins section).
Are there any other plugins that you are using? All Intel XDK APIs are treated as plugins for Cordova container, so make sure you check appropriate Intel XDK plugins before you build.
Swati
Yes, I had the plugins selected. Still nothing. Now I keep getting a build error.
I guess I have to go with another development system as the app I previously did with the intel xdk no longer works now that I had to upgrade to the cordvova framework.
I believe the build is failing due to a change in Cordova for Android that now requires the package ID to contain at least three fields. Yours appears to only contain two. I'm having trouble finding the issue related to this, but I believe that is the source of the build failure.
