Android :: Ajax Cross Domain Requests

Nov 7, 2010

The behavior of XMLHttpRequests in Android is very odd when doing cross domain requests. The browser should either fail with an error and not perform the request, or it should follow CORS (http:// www.w3.org/TR/access-control/) and start with an OPTIONS request to the remote domain. The Android browser (2.1 and 2.2) instead performs the request, which is received by the remote server (and this is the dangerous part both for data leaking and remote attacks), but the response is not set in the javascript (status of 0 and responseText null)

Android :: Ajax cross domain requests


Android :: Possible To Make Cross-domain AJAX Call On Mobile Browsers?

Jul 29, 2010

I have a site which makes SOAP requests to a separate domain using YUI's cross-domain AJAX transport. This is working wonderfully on my site, but unfortunately since mobile browsers don't support flash, I can't get it to work.Does anyone know of a way to make cross-domain AJAX posts on mobile browsers?

View 2 Replies View Related

Android :: How AJAX Requests Work On 2.0 / 2.2 Emulators?

Jul 22, 2010

I'm testing out a web page on the Android 2.0 and 2.2 emulators, and the jQuery.ajax() requests that the app makes have slightly different behaviors regarding HTTP Authentication Headers. The server I'm making requests to requires basic authentication, and the ajax requests in 2.2 send the proper auth header. In 2.0, I am debugging with Fiddler, and it seems that the requests do not include the auth header, and the server rejects the request with a 401.2 error. I don't think it matters, but the server is running IIS 7. One interesting thing I noticed while debugging the web requests is that Android 2.2 makes two requests for each resource, whether or not it's an XHR. One does not contain the Auth header, and the second one does. In 2.0, it seems to make 2 requests for everything but XHR's:

Here is the 2.2 header for the first XHR:
GET http://192.168.1.111/sonar/mobileweb/sonar/views/week/init.ejs HTTP/1.1
Host: 192.168.1.111
Accept-Encoding: gzip
Referer: http://192.168.1.111/sonar/mobileweb/sonar/sonar.html
Accept-Language: en-US
User-Agent: Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
Accept: text/plain, */*
X-Requested-With: XMLHttpRequest
Accept-Charset: utf-8, iso-8859-1, utf-16, *;q=0.7

The 2.2 header for the second XHR:
GET http://192.168.1.111/sonar/mobileweb/sonar/views/week/init.ejs HTTP/1.1
Host: 192.168.1.111
Accept-Encoding: gzip
Referer: http://192.168.1.111/sonar/mobileweb/sonar/sonar.html
Accept-Language: en-US
User-Agent: Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
Authorization: Basic cGFyaXZlZGFcZGF2aWQubW9ycmlzOjIzbkx2ZWxsbGw=
Accept: text/plain, */*
X-Requested-With: XMLHttpRequest
Accept-Charset: utf-8, iso-8859-1, utf-16, *;q=0.7

And the 2.0 header:
GET http://192.168.1.111/app/views/week/init.ejs HTTP/1.1
Host: 192.168.1.111
Accept-Encoding: gzip
Referer: http://192.168.1.111/app/app.html
Accept-Language: en-US
User-Agent: Mozilla/5.0 (Linux; U; Android 2.0; en-us; sdk Build/ECLAIR) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17
Accept: text/plain, */*
X-Requested-With: XMLHttpRequest
Accept-Charset: utf-8, iso-8859-1, utf-16, *;q=0.7

Has anyone experienced this behavior before? It is basically causing my app to not work at all in version 2.0. Version 2.1 seems to act the same as 2.0.

View 2 Replies View Related

Android :: Augmented Ajax / Notifications?

Jun 4, 2009

Can augmented ajax use Notifications? Is this Android 2.0?

View 2 Replies View Related

Android :: Google Api Ajax Webservice

Nov 23, 2010

I have created json parser to parse the data from this http://ajax.googleapis.com/ajax/services/search/local?v=1.0&sll=48.85...

I want to parse this data and wanna show in list view in android.

View 3 Replies View Related

Android :: How To Get Domain Name

Nov 26, 2009

I use webview to address the url link, but I want to know how to get the url's domain name? such as when I link to http://www.yahoo.com, then I can get the "yahoo" domain name, so how to do that?

View 3 Replies View Related

Android :: Using Google's Ajax Local Search API

Oct 6, 2010

i want to use Google's ajax local search API in my android application.

View 5 Replies View Related

Android :: Intercept AJAX Call From WebView

Oct 15, 2010

I want a HTML/javascript application, running in a WebView, to make AJAX calls that are handled by the Java code. Ideal would be to just intercept the call (easy, just use shouldOverrideUrlLoading()) and 'return' some data. However, I don't find a way to 'return' a response to the WebView, other than calling a javascript function using loadUrl(). This will not work for me, as the HTML/js app is a drop-in application which I don't control. As far as the HTML/js app concerns, it just does an AJAX call and receives some data back.

View 1 Replies View Related

Android :: ASP.NET AJAX CalendarExtender Not Working Properly With Browser

Jan 16, 2010

I'm creating a webapp for Android mobile phones with ASP.NET and the Ajax Control Toolkit. I've included a CalendarExtender-Control which popups a calendar when focusing the associated Textbox-Control. If I select this textbox on my mobile phone, the Android webbrowser highlights it with an orange border. The problem is that this border is shown in front of my Calendar popup. Has anybody any idea how to fix this issue?

View 1 Replies View Related

Android :: More Reliable Than AJAX For Phone / Server Communication?

Dec 21, 2009

I have an application that needs to send messages, repeatedly to the server. I'm currently using AJAX from the phone's browser and it works fairly reliably, but, as with all things cell-phone, not 100%. I'm curious if using Android and opening a socket to the server would give me any additional reliability, or if it would suffer from the same communication troubles that hinder the AJAX transmission.

View 2 Replies View Related

Android :: Domain Name Won't Resolve To An IP Address

Sep 27, 2010

I am working on a program that will connect to a time server (time- a.nist.gov), retrieve the timestamp, and place it in a text field.

However, when I create the socket, I get an UnknownHost Exception for time-a.nist.gov

1. put the <uses-permission android:name="android.permission.INTERNET" /> tag right before the </ manifest> tag. I did this, and the change is still there.

2. use the static InetAddress.getByName() function to convert to an IP address (this still throws the same exception)

When I pass the IP address (129.6.15.28) to the socket constructor, the program works fine. It only breaks when I use the actual domain name.

I have written this program in Java and it works perfectly fine.

View 2 Replies View Related

Android :: WebView For Form Based Local AJAX Application

Feb 18, 2009

I'm thinking of using WebView as a container for "Form" based JavaScript+DHTML applications. This is simple fill-out-forms like you have on the web, but now on mobile like for note taking, order taking, and the like.This is to allow web developers to build the bulk of the application - Javascript will perform validation, computations, etc.On the Java side, I only need to implement database CRUD operations, and a ListView to scroll over the forms.To minimize the learning curve on the JavaScript side, I've been thinking on how to emulate AJAX calls so that the web developers don't need to learn new methods to call on the JavaScript-Java bridge. Of course this isn't possible using XMLHttpRequest, so I'm thinking of adapting JQuery or other Javascript libraries for this purpose.

View 3 Replies View Related

Android :: Sharing Domain Objects Between Activities

Jan 11, 2010

I have written my application logic in domain objects (to enable multiple user interfaces and porting to other platforms), and am now lookng at implementing Activities for the user interface.

Considering that each activity needs to serialise its state, what is the best way to ensure my domain objects are only serialised once?

View 1 Replies View Related

Android : Browser Crashes On Ajax Calls - When Viewport Meta Tag Is Defined

Apr 8, 2010

I am building a web app, which is intended to run on the Android browser. When I have a webpage that contains any kind of viewport meta tag, like this:

<meta name="viewport" content="width=400"/>

My webpage crashes on ajax calls. It happens when using the emulator, the actual browser on my nexus one, and on a droid (all running Android 2.1). Without the meta tag, the ajax calls run as they should.

View 2 Replies View Related

Android :: MS Exchange Error - Does Not Work Outside Company Domain?

Jul 9, 2010

I have Nexus One (Froyo). After a lot of struggle I set up the Email App for MS Exchange. It works fine until I am in Company WiFi zone (company domain). Once I switch to another WiFi zone (@ Home), it stops working and throws an error something like 'no server connection'. Can somebody please help me out resolving this problem?

View 1 Replies View Related

Android :: Remove Cookies Using CookieManager For A Specific Domain?

May 14, 2010

I know about the existince of CookieManager, but how do I remove cookies of a domain only?

View 1 Replies View Related

Android :: Copy - Paste Code Snippet Into My Public Domain App?

Sep 8, 2010

I find this code useful and want to copy-paste it into my application which is licensed as public domain.

It is the Android blog, they often show useful code snippets. There is no way to contact the author, and the only license info I can see is "©2008 Google Inc. All rights reserved."

Should I:

Stop worrying and just copy-paste?
Reimplement it myself without looking?
Copy-paste and then make it look different?
Any better solution? ...

Is there a rule like "if shorter than 50 lines then no copyright applies" or something?

View 3 Replies View Related

Ajax To Call External XML File Using XMLHTTPRequest

Mar 19, 2012

I'm using phonegap with Ajax to call external xml file using XMLHttpRequest. I send the request but response not come.The ready.status comes 403 in android device. what is the problem.... below is the my code. this code work in emulator but not work in android 3.1 tablet...

function appReady(){
var ajax = new XMLHttpRequest();
ajax.open("GET"," [URL]...",true);
ajax.send();

[Code]....

View 3 Replies View Related

Android :: Cross Platform IM?

Jul 23, 2010

Is there any decent application for cross platform instant messaging? My wife has an iPhone and I have a Samsung Captivate.I really don't see the point in using SMS to send quick messages back and forth while I'm at work or wherever when we could easily use some IM client.

View 4 Replies View Related

Android :: SDK Over Cross Platform

Nov 4, 2010

I am trying to install Android on Beagleboard (TI's OMAP35x chip). They have provided toolchain to build the OS and port it on the chip. Now the next question is developing Android apps. I am interested in knowing about the Java SDK for android. So can I use the standard SDK provided by google, so far I cannot find any SDK provided by TI for Java.Putting it in simple terms, will an application developed on standard Android SDK work on beagleboard.

View 2 Replies View Related

General :: Domain Server Login

Jan 26, 2012

Using Android 4 is there a native way to log onto a windows domain server. If not can it be done using the Android API?

I have a Transformer Prime running Andriod 4 (ICS). I also have the B4A basic android compiler if I need to write my own code. I really new to Android programming but have been writing Windows based software for many years.

View 2 Replies View Related

General :: Android Emulator - Edit Hosts File Doesn't Resolve Custom Domain Name

Dec 20, 2010

I'm developing a mobile website and I want to see how it looks in Android Simulator.

I manage to edit my android's /etc/hosts file. Here's what I did:

1. Create an Android Virtual Device (AVD)
2. Open the AVD with this command

Code:
./emulator -avd android -partition-size 128

3. Execute the following commands

Code:
./adb remount

4. Get the android hosts file

Code:
./adb pull /etc/hosts

5. Add my mobile website into the android's hosts file. It looks like the following

Code:
127.0.0.1 localhost
172.19.14.46 m.myweb.localhost

6. Push the hosts file to the simulator

Code:
./adb push hosts /etc/hosts

7. Open the web mobile in the simulator and Host do not found. The web mobile should appear.

Btw I use Ubuntu 10.10 and android-sdk_r08-linux_86 API 7 (Android SDK 2.1)

View 3 Replies View Related

Android :: Cross Platform Java?

Oct 8, 2010

We have a desktop/web java application and also getting into Android development.Ideally we would like one app that runs both on desktop and android.From what we can tell, it's not much possible to run normal java apps on android. But wondering if it can do it the other way? That is, run android apps easily on the desktop (without the user install the sdk or android emulator)?In a prefect world we'd like one app for both platforms. Realistically though it seems like we're going to have to have one app with two front ends?

View 4 Replies View Related

Android :: Cross Activity Listeners

Sep 14, 2010

Can I have one Activity listen for a message from another?I have a TabActivity and I need to call a function/send a message to the associated tabs.How do I go about doing that?

View 9 Replies View Related

HTC Desire :: Directing Domain Messages To Hotmail

Jul 9, 2010

I direct my Domain Messages to my hotmail?

View 13 Replies View Related

HTC Magic :: Connecting To Domain Wireless Network

Nov 2, 2009

I recently bought a HTC Magic. At work, we have a secured wireless network. When connecting to this network, we are asked a username/password for the domain. Now, my question is; With my HTC Magic, how can I connect to the domain network? On my previous HTC (S710 or 720, with WinMob) , it was possible.

View 1 Replies View Related

Android :: Simultaneous Http Requests

Jan 13, 2010

Is there a limit on the number of simultaneous http requests of the form:

HttpResponse response = client.execute(request);

I'm interested in any official limit as well as practical ones.

(In a previous life, you had to dig deep to discover that WinMo only allowed three WebRequests to be open at a time.)

Let's say I have a list of 20 files to download on a background thread.

Should I: Download them one at a time, blocking the thread (but not the UI thread) to wait for each one? Start 20 threads each downloading one of the files?

I expect the answer may be somewhere in between, where I create C threads and work on the queue of N files, where C is a number like 3 or 4.

I suspect some of you here have already done some experimentation and know the magic number. In addition, I suspect there may be more efficient ways of doing what I'm doing than creating a new DefaultHttpClient for each request.

View 10 Replies View Related

Android :: Viewing Requests Made By Another App

Sep 16, 2009

Is it possible to view what requests are made to external sites/ servers by an app? Basically I'd kind of like to throw an application (I did not make) into a debugging type thing to see what requests (to where and what data) it makes. This is to kind of ensure a third party app does what it is saying, and isn't sending data elsewhere.

View 2 Replies View Related

Android :: How To Track All Https Requests?

Apr 12, 2010

How to collect URLs of all http/https requests made by the phone as well as well as the return status code and user agent from the headers. This information should be coming for all browser requests and other applications too.Please let me know this information can be retrieved on App level or we have to go to system level for this.

View 5 Replies View Related

Android :: How To Do Async HTTP Requests?

Feb 23, 2010

Im using a web service, so I want to use an async thread for the HTTP authentication request and another thread later to make additional service requests while my main thread runs.Would like to see a good example of how to do this and how to show busy messages somehow in main app. How does the main app know when the thread finished? And what if my thread encounters exceptions, how do I deal with that?HTTP requests are sent later, use the same cookies setup up by the first auth request, so will the later requests pick up the same cookies and just work?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved