Software Archive
Read-only legacy content
17060 Discussions

I checked on Android device and sees App can not access Internet

Leonidas_S_
New Contributor I
3,692 Views

I checked on Android device and sees App can not access Internet   // in xdk-ripple Internet works

Permission is:

INTERNET

Or I must insert also other for Internet permission?

In Domain white list I have (and check box checked)

*

this includes all domains?

Also to restrict for a domain I must use full URL like http://flickr.com or http://www.myDomain.com. and check box?

Or only flickr.com or www.myDomain.com, demo.myOtherDomain.com.... in Domain List....?

0 Kudos
31 Replies
Leonidas_S_
New Contributor I
1,204 Views

i SWITCHED TO 3.5.1 AND CONNECTIONS NOW ALL WORKING OK.

Seems contacts write Not working... well Contacts API 0.2.10 for cordova  3.5.1 is correct?

My code should be written for 0.2.10 Contacts or... ? Where find sample code for this?

0 Kudos
Leonidas_S_
New Contributor I
1,204 Views
<script type="text/javascript" src="cordova.js"></script>

this line should included in ALL html files using Cordova plugins or Only in index.html? If in index.html - matters if other html files have this line?

also in html files in subfolders , same path should be used or the:

<script type="text/javascript" src="../cordova.js"></script>

 

??

 

 

0 Kudos
Leonidas_S_
New Contributor I
1,204 Views
contact.save(onSaveSuccess, onSaveError);

this is correct for  // I mean order of functions...inside parenthesis?  for >>>

3.5.1 Cordova 

 0.2.10 Contacts API plugin

 

???

 

0 Kudos
PaulF_IntelCorp
Employee
1,204 Views

Leonidas S. wrote:

i SWITCHED TO 3.5.1 AND CONNECTIONS NOW ALL WORKING OK.
Seems contacts write Not working... well Contacts API 0.2.10 for cordova  3.5.1 is correct?
My code should be written for 0.2.10 Contacts or... ? Where find sample code for this?

Glad to hear all connections are working. Can you provide a simple example that causes connections to fail in 4.1.2 but work in 3.5.1? It would help us to figure out what it is wrong.

Regarding Contacts: you can use any version of the Contacts plugin that works. When you switched the CLI version the XDK gave you the option to reset the plugin versions. Those "recommended" versions are simply the versions that were tested against by the Cordova project when they released CLI 3.5. Later versions of the plugins will usually work and generally contain useful bug fixes, but you are the one that decides which version is best for your application. Follow the documentation link for that plugin (the small page icon) to see more details about that plugin. See the "tags" in the repo, when you get there, for the list of versions available for that plugin. See the RELEASE NOTES doc in that repo for details regarding the bug fixes to that plugin.

Sample code is sometimes contained in the plugin repo, or can be found in the main Cordova documentation. See the "quick links" page in our documentation for a link to the Cordova documentation.

0 Kudos
PaulF_IntelCorp
Employee
1,204 Views

Leonidas S. wrote:

<script type="text/javascript" src="cordova.js"></script>
this line should included in ALL html files using Cordova plugins or Only in index.html? If in index.html - matters if other html files have this line?

also in html files in subfolders , same path should be used or the:
<script type="text/javascript" src="../cordova.js"></script>
??

It is best to have only one html file (index.html) because switching between HTML files is slow and loses JavaScript context, as well as your Cordova context. Single page apps are the right way to build Cordova apps. See this article: http://cordova.apache.org/docs/en/5.0.0/guide_next_index.md.html#Best%20Practices

0 Kudos
PaulF_IntelCorp
Employee
1,204 Views

Leonidas S. wrote:

contact.save(onSaveSuccess, onSaveError);
this is correct for  // I mean order of functions...inside parenthesis?  for >>>
3.5.1 Cordova 
0.2.10 Contacts API plugin
???

Here is the main repo with documentation and example code: https://github.com/apache/cordova-plugin-contacts, note that 0.2.16 is most recent version of that plugin (see the "Tags" list under "branch" pulldown).

See this tutorial for some help: https://ccoenraets.github.io/cordova-tutorial/contacts-api.html

0 Kudos
Swati_S_Intel1
Employee
1,204 Views

@Alan, I looked at your project that you sent. Please try using Cordova CLI version 3.5 instead of 4.1.2 in the Build Settings on Projects page. There is a known issue that we are in the process of resolving where ajax does not work on android 5.0+ and some 4.4 devices when built with Cordova CLI 4.1.2.

Swati

0 Kudos
Alan_R_
Beginner
1,204 Views

Thank you for helping.

setting CLI to 3.5.1 for Android build works fine.

 

Please tell me about Crosswalk build.

I tried to setup CLI on 3.5.1 in config.crosswalk.xml but still ajax calls don't work. 

 

It would be cool to unify troubleshooting info's about build process on separate topic on forum. For me it was very frustrating to find that issue was with XDK build proces (in this case CLI version) because i was doubting my own app. I was striping app functionalities one by one, making a lot of build version with "trial and error method" to find cause of problem.

 

 

0 Kudos
Swati_S_Intel1
Employee
1,204 Views

Hi Alan,

You always set the CLI version through the Project tab UI. Manually changing in config.xml does not work. XDK overwrites at build time, based on the settings selected in Projects tab Build settings.

It would be cool to unify troubleshooting info's about build process on separate topic on forum. For me it was very frustrating to find that issue was with XDK build proces (in this case CLI version) because i was doubting my own app. I was striping app functionalities one by one, making a lot of build version with "trial and error method" to find cause of problem.

Good suggestion. I will pass this feedback onto product engineers.

Swati

0 Kudos
Aya_S_
Beginner
1,204 Views

Same issue here, can't access network through android phone

XDK 2893

Available cordova CLI versions are 5.1.1 and 4.1.2

does any one have any idea about what is the problem with this version??

0 Kudos
Swati_S_Intel1
Employee
1,204 Views

@Aya, There was network access issue when we introduced CLI 4.1.2. That issue was fixed long time ago. I'm closing this thread as it was resolved. I've opened a new thread on your behalf. Please follow the thread here : https://software.intel.com/en-us/forums/intel-xdk/topic/611452

0 Kudos
Reply