Android phonegap connect to WCF service across domains - android

I have a phonegap 3.4 app written for android 4.4.2. My code for communication with WCF service works accross domains, as i have checked with my PC, and it also works in the emulator. However, when I try to open my app on the phone, the data transfer never finishes- I neither get success nor error in my ajax call. Same thing happens if I open the html file in my phone's browser.
I had avast on my phone, but i turned it off, and I cant see what else might be interfering. So any help would be greatly appreciated.
(Please keep in mind that my javascript-wcf communication works across domains, so I doubt that changes to my ajax or wcf are nescessary, at least I hope so.)

Apparently, something went terribly wrong in my eclipse. Downloading pure eclipse and then installing adt plugin to it solved the issue.

Related

I can not access my notebook with my Android using IPv4

I'm having a bad problem and it already gave me a headache. I did an application with Magic Software and to run it on my Android I have to configure Magic Studio the right way (done), run the project on the Magic server (done and working) and install MagicDev.apk on android (available in the Magic XPA folder and already done), and when finished installing, the application must be run and when it is executed it asks to enter the URL of the Magic application, which is the following: http://[IPv4_of_notebook]/MagicScripts/DevProps.txt, but when you try to access this, it is not possible, it says that the application was not found or the connection failed.
It is worth mentioning, I had this same access problem when using XAMPP or Wamp, because when trying to access the localhost with the cell phone, the link would not respond, it would load until I gave the message (I put Wamp online for this, of course, and changed the settings in the [files].conf). Another important thing is that I made an Android application in Android Studio where one of its functions was to access the internet and although the application installed on Android really could not connect to the link, the emulator accessed quietly (the emulator runs inside the pc, would there be anything?) and I could do what I had to do, this link was on a page I made using Wamp, that is, the emulator accessed my IP, and the cell phone can not.
My question: Is this some configuration of the notebook, Android, Internet router or am I doing something wrong? My friend created a page using Wamp, configured it correctly and placed it online and from my home, with his IP, I accessed the page (with my notebook) in a quiet way. One more note, my notebook connects to the internet with Wifi and my Android too, meaning they are not connected to the source directly as my room PC is, and I do not know if that also matters.
I will later try to run the application on my PC from the room and see if it gives him access to his IPv4, but I do not think it will work either. Anyway, does anyone have any idea what it can be? I do not like messing with my notebook's Internet and other settings without knowing what I'm actually doing, I'm afraid to make my notebook vulnerable. Here in this video https://www.youtube.com/watch?v=1njzFq07t2U you can see the process I'm describing here, but it's not working for me.
I already figured out the villain, it was the firewall. When I turned it off everything worked as expected. I can not keep it turned off for security reasons, but from what I've seen I can configure it to accept only my phone.

Android client is not connecting to local server ActionScript 3.0 AIR

Everything works just fine on the same machine, no errors, nothing. But if I start the client app from Android, it is not connecting anymore. It was working fine yesterday. I do not know what happened. If it is an issue with policy file, I am not getting any warnings. I can't even connect to debugger.
If this is related to security policy file can anyone tell me where should I store the file on my computer to access it with Security.loadPolicyFile("http:/ / 127.0. 0. 1: 81/crossdomain.xml");?
Please, help. I have no idea what the problem is.

Android UnresolvedHostException on real device using servername

Hi I am developing an application which is connected to a cooperate network via a VPN-connection.
Now I have the following problem:
If I try to send a HTTP-Request from a real device to a server located in the network using the server-name the logcat shows an UnresolvedHostException.
If I am using the IP of the server instead everything works fine as expected.
On the emulator the problem does not appear at all and everything works.
So I tested this on the browser of my device and the browser seems to have the same problem, using the IP, the browser can access the server, but if I use the server-name the browser returns a 404 error.
Does anyone have a clue why this problem is appearing or can give me a hint how to solve this issue, I have searched the web but cannot find a proper solution anywhere.
If anyone is having the same problem, shutdown your device wait a moment so it totally powers of and then restart it, this solves the problem and saves you a lot of time, stress and rage, it seems like their is a bug in the system (at least on some API versions)

PhoneGap app start ends with timeout on a Android 4.0.3/4 device

I am facing a strange issue. I create a simple PhoenGap app, that loads a HTML website no JavaScript so far. I am able to start the app using a
2.3.3 emulator
4.0.3 emulator
4.1 emulator
or
2.3.3 device
but the app crashes with a "CardovaWebView: TIMEOUT ERROR" in the console and a "Application Error: The connection to the server was unsuccessful. (File://android_asset/www/index.html)" on the screen. This error occurs randomely on all devices.
I am just finding infos about heavy JavaScript things taking too long to trigger the timeout but that's not the case here. Anyone with a hint? Thanks in advance
I just found out: The error occurs only when using GPRS and not using WLAN. So phonegap (or something else) is trying to achieve a connection somewhere... Setting a higher timeout value does not work... Any ideas?
I just found the solution:
Its the weinre debugger. Despite being a useful tool, it's using a hardcoded IP for the importing of the javascript-script like this:
<script src="http://x.x.x.x:8081/target/target-script-min.js"></script>
When using starting the app on a real device using WLAN this poses no problem. But using GPRS it results in the timeout error mentioned above. Hopefully this will save others the time and nerves I lost here.

Android Emulator - No internet connectivity

I know that there are several threads posted about this issue, however I believe my problem to be a bit different:
I had my Android emulator working without any problems (using Eclipse plugin). I could start the emulator, run applications, and those apps would be able to connect to my computers internet. I then updated the Android SDK's (as I wanted to try out my application on 2.2). Since the update, the emulator will not connect to the internet. If I go to the browser, the page will not be displayed. I have tried everything - reverting back to the 2.1 SDK, even completely reinstalling Eclipse + Android, and the issue still remains.
I know that I have no firewall/proxy type issues. What could be causing this? Does anyone have any ideas? I'd greatly appreciate it...
Thanks!
The answer to my question:
Upgraded to SDK 2.3 - now no emulators have connectivity
should help
In particular "It doesn't seem to like systems that have 'obtain DNS automatically' set. I changed it to manual set to Norton's Public DNS and the emulator browser works straight off "

Categories

Resources