Software Archive
Read-only legacy content
17061 Discussions

intel.xdk.device.getRemoteData do not fire on tablet

Hamilton_Tenório_da_
Valued Contributor I
679 Views

I don´t know if it is only in tablet Android, but the command intel.xdk.device.getRemoteData do not fire the script on server.

My APP runs OK on emutator (XDK) and in my phone Samsung S4 android 4.4.2, but do not run on AppPreview or installed (APK) on tablet Samsung Tab 10.1 I android 4.0.4 or Motorola Xoom android 4.1.2.

I did a debug process on tablet (Xoom) and the script runs OK until the command intl.xdk.device.getRemoteData, but looking on server, the URL called is not fired. If it is not fired, no return occurs and the APP stops.

Is there any information or action to do for this situation?

Thanks.

 

0 Kudos
5 Replies
Elroy_A_Intel
Employee
679 Views

I have a few questions:

  1. Which build target (Cordova 3.x Crosswalk for Android, Android, or Legacy Android ) are you using?
  2. Are you able to get a response using the Get reponse from your sever?
  3. Did you include the "xhr.js" file

In the HEAD element, include the following files

    <!-- phantom library, needed for XDK "legacy" container api calls -->
    <script src="intelxdk.js"></script>
    <!-- phantom library, needed for Cordova api calls -->
    <script src="cordova.js"></script>
    <!-- phantom library, needed for XDK "legacy" container CORS -->
    <script src="xhr.js"></script>
    

Example (GET Request) 

//GET method example
intel.xdk.device.getRemoteData("https://blockchain.info/tobtc?currency=USD&value=500", "GET","","success_handler","error_handler");


//Example Event Handlers
function success_handler (data) {  alert("success: " + data); }
function error_handler(data) {  alert("error: " + data); }

Example (POST Request)

//POST method example
intel.xdk.device.getRemoteData("<server_URL>","POST","E-MAIL=html5tools@intel.com&TEST=1&MAX=0","success_handler","error_handler");

//Example Event Handlers
function success_handler (data) {  alert("success: " + data); }
function error_handler(data) {  alert("error: " + data); }

For more information, navigate to https://software.intel.com/en-us/node/493006.

You can also find past forum posts that will provide support for some of your present and future issues at https://forums.html5dev-software.intel.com/index.php.

Forum posts related to 

https://forums.html5dev-software.intel.com/viewtopic.php?f=26&t=5089

0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
679 Views

Hi Elroy,

Follow answers:

  1. Which build target (Cordova 3.x Crosswalk for Android, Android, or Legacy Android ) are you using?
    Android
     
  2. Are you able to get a response using the Get reponse from your sever?
    Not using these tablets. No request is received on server.
    Normal response from smartphone (Samsung S4)

     
  3. Did you include the "xhr.js" file
    Yes

In the past, usign the old building, in all devices everithing was OK. But Google is showing the problem about Cordova 3.3. Then, I need to build again using Android option (it is better because the stuff is always present in XDK).

Using debug, no error is showed when this command is passed. But no action is fired after that (success or error).

I do not mark any cordova option in the building. Only Intel.XDK options are selected. 

Thank you.

0 Kudos
PaulF_IntelCorp
Employee
679 Views

Try using the Crosswalk for Android build option.

0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
679 Views

I did this test: build using Crosswalk option.

The size of APK jumped from 3.5 Mb to 19.3 Mb!

The performance on tablet is terrible, very very very slow.

And no fix the problem: the getRemoteData is still not working.

0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
679 Views

I posted new information about this issue on https://software.intel.com/en-us/comment/1804967#comment-1804967

 

0 Kudos
Reply