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,676 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
Dragan_T_
Beginner
2,477 Views

Hi Leonidas,

You should first try with * in your Domain List. I guess you don't need the CheckBox (external applications) checked in your case,

Make sure you use the correct tab in Project Build Settings e.g. Android/Android-Crosswalk/IOS/Windows8

Please read this for more explanation about new Cordova Access rules:
http://cordova.apache.org/docs/en/4.0.0/guide_appdev_whitelist_index.md.html#Whitelist%20Guide

Best regards

0 Kudos
Nick_F_2
New Contributor III
2,477 Views

I'm having the same issue and have been for a while and cannot figure out a fix. Both iOS and Android debug fine and are able to access my web service. I can browse to the web service from the devices browser directly, but once the app is compiled neither Android not iOS can access the web service. I have tried * and a FQDN in the project domain entry but this makes no difference. I'm pulling my hair out on this one.

I have 2 other apps both connect to web services without any issues, I have traced my code to see if I have missed anything and as far as I'm concerned there is nothing missing.

0 Kudos
Leonidas_S_
New Contributor I
2,477 Views

for permission in Android settings 

I will insert 

android.permission.INTERNET

or just

INTERNET

???

0 Kudos
Leonidas_S_
New Contributor I
2,477 Views

well inserted

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

INTERNET as permission

but App still Not having connection... why may this???? In xdk-ripple emulator there is Not such, Conn Exist success.

0 Kudos
Swati_S_Intel1
Employee
2,477 Views

Hello Leonidas,

Where are you setting INTERNET permission? When you put * in the Domain list it means your app can access other domains through ajax request. The android permission is set when you build the app and by default Full Network Access is on in the built app, so you don't need to set internet access permission. what code are you using to determine if the app has access or not? Please post your code/project.

Swati

0 Kudos
Leonidas_S_
New Contributor I
2,477 Views

Please note prior having win 7 pro OS after fresh installed win8.1 Pro and reinstalled xdk IDE and generate App - appear the problem...

I think not used code for determine access or Not but I have AJAX GET, AJAX POST and AJAX JSOP requests to my VPS and to Flickr that nothing works like App never connected....

Seems plugins 4.1.2 cordova are OK, or try with eg Cordova 4.0.1 plugins?

0 Kudos
Swati_S_Intel1
Employee
2,477 Views

I didn't quite get your last post. Please try using Cordova CLI 3.5 under the Projects Build settings. If that doesn't work, please send your project zip through Private Message.

 

0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
2,477 Views

Check if in your project use inserted appframework AND jquery. Once I had the same problem and the problem is that.

0 Kudos
Leonidas_S_
New Contributor I
2,477 Views

To Hamilton:

how I check that? is jQmobile project....All function expect Internet connection related...

 

To SWATI S. (Intel)

better 3.5.1 ... check for?

0 Kudos
Leonidas_S_
New Contributor I
2,477 Views

is any xdk library code required on head tag, for Cordova projects (non-legacy proj)...?

0 Kudos
Alan_R_
Beginner
2,477 Views

Hello,

I have the similar issue. Calls work in app preview( also in test, debug, emulate) but when i run complied apk on an android device it does not make any calls. Network traffic from app is zero.

In project build settings access domain list is set to * with launch external checked. I tried to add app permissions but they are already included (INTERNET, NETWORK_STATE, WIFI_STATE) 

I use standard HTML5 Crosswalk. XDK build 1995, App framework 2.1 UI and JS , Jquery.js 

Tried to convert to Cordova app but same results

 

 

 

 

 

0 Kudos
Swati_S_Intel1
Employee
2,477 Views

@Alan, could you please send your project zip to me? Thanks.

0 Kudos
PaulF_IntelCorp
Employee
2,477 Views

Are you using intel.xdk namespace calls? If so, does your index.html file include a reference to intelxdk.js and xhr.js? You will need those two files if you are using any intel.xdk calls.

0 Kudos
Leonidas_S_
New Contributor I
2,477 Views

I will retry some other tricks first... but i do Not think project the problem but the migration from win 7 to win 8.1 and to new xdk... 

may tell some project - may in github - or what you recommend from xdk itself's sample projects that use internet connection - BTW xdk settings exist in sample projects - so try a sample project and Not my project... if eg this sample still not work the connection then and my project sthg with settings is the error...? 

what sample project to try...?

0 Kudos
Leonidas_S_
New Contributor I
2,477 Views

what sample project to try...? I prefer Cordova HTML5 jQuery Mobile Project...

0 Kudos
PaulF_IntelCorp
Employee
2,477 Views

Upgrading from Win7 to Win8 should not impact your project. Upgrading the XDK can change the default version of CLI you build against. Go to the build settings section of the Projects tab and change the CLI version to 3.5. Then build your app and see if that makes a difference.

0 Kudos
Leonidas_S_
New Contributor I
2,477 Views

rather 3.5 to use 3.5.1 is OK ?

0 Kudos
PaulF_IntelCorp
Employee
2,477 Views

Does the same thing. In both cases you'll get 3.5.1

0 Kudos
Leonidas_S_
New Contributor I
2,477 Views

what devices android support Cordova  +4 and up????  I will try 3.5.1 soon...

0 Kudos
PaulF_IntelCorp
Employee
2,276 Views

All Android versions support CLI 4.1.2 and CLI 3.5 (which is what I think you're asking). However, we only support Android 4.0 and higher devices (we do not test on earlier versions). Crosswalk builds only support Android 4.0 and higher devices.

0 Kudos
Reply