Android :: Intercepting WebKitView Resource Requests / Serving From Classpath

Jun 7, 2010

I'd like to create dynamic HTML in my app that will also include referecences to a few images. The images should not be resolved / requested by the internet, but instead I would like to somehow intercept these calls and then respond will classpath resources to those requests.I think this is similar how phonegap or titanium do this, but this is just an assumption.Does anyone know how webkit's resource loading can be intercepted and resources can be served from a local cache/ classpath intead of contacting the internet?

Android :: Intercepting WebKitView resource requests / serving from classpath


Android :: Add Maven Classpath

Mar 2, 2010

My project requires some external libraries to build in in Eclipse. They live in /trunk/lib whereas my project is in /trunk/projectA.To get Eclipse to find the libraries on all machines we set a variable PROJECT_A_HOME.Now I'm trying to get some builds going with maven and I can not figure out how to add that path (be it environmental variable or relative to $(basedir)) to the build. I really do not want to set up a repository for these dependencies, as I keep them in source control and want builds to continue to work in Eclipse.

View 2 Replies View Related

Android :: Set Classpath Variable In Eclipse?

Oct 18, 2010

Has anyone set the Classpath variable in Eclipse?If so, where is it?

View 4 Replies View Related

Android :: Serving GPS Coordinates Fromlocalhost 10.0.2.2

Oct 19, 2010

Is it possible to set up a localhost server on Android so that a browser window can access the device's GPS coordinates?

I'd like to be able to access the GPS coordinates in Javascript inside a browser window.

Now I could simply send the GPS coords to the server and read from within the browser window by reading off the server, but I was wondering if there was any way to send the GPS coordinates from the device straight into the browser window without having to go through a remote server?

It would be really great to be able to access the GPS coordinates directly from http://10.0.2.2:9999

View 1 Replies View Related

Android :: Webview - Dynamically Serving An Image From Server

Sep 28, 2010

I am dynamically serving an image from my server, and attempting to display it in an img tag on an Android phone. This works perfectly in the normal Android browser, but when I try it in my app's Webview I just get a question mark. Running Android 2.1.1 on a Nexus One

View 1 Replies View Related

Android :: Intercepting Incoming Calls

Jun 29, 2010

You can intercept a call on Android?

View 2 Replies View Related

Android :: API For Intercepting And Blocking A Call?

Oct 6, 2009

Is there a API for intercepting and blocking a call? What I want to do is to create app that autometically detect incoming call and based on the caller it either alert the user or don's alert the user. Like, if the number is stored in the phone book then alert the user other wise just send a message to the caller that the person is busy.

View 3 Replies View Related

Android : Intercepting The Back Button

Sep 1, 2010

I'm writing an application which will have two Activities, when the user presses the back button on the second activity a dialog should pop up asking the user to confirm the action. So how do I intercept this? I seriously doubt about this coz the backstack is a part of the OS itself. Has anyone found a workaround?

View 2 Replies View Related

Android :: How To Use Resource Within A Custom Xml Resource File?

Aug 3, 2010

I have an XML resource file:
<resources> <section>
<category value="1" resourceId="@xml/categoryData1" />
<category value="2" resourceId="@xml/categoryData2" />
<category value="3" resourceId="@xml/categoryData3" />
</section> </resources>
Using XmlPullParser, on the START_TAG, I can use:
int value = parser.getAttributeIntValue(null, "value", 0);
to get values 1, 2, 3...however:
int resourceId = parser.getAttributeIntValue(null, "resourceId", 0);
doesn't work...it just yields the default value 0, or whatever I change the default value (3rd parameter) to be. Does anyone know what I am doing wrong or if this is possible?

View 1 Replies View Related

Android :: Intercepting Screen Touches During Game

Jun 15, 2010

What's the best way of intercepting screen touches and coords during a game loop? At this point, I don't have a View from my main.xml file, so the normal OnTouchEvent doesn't apply, as far as I can tell. What's the usual procedure for this?

View 2 Replies View Related

Android :: Intercepting Incoming / Outgoing Email Messages

Feb 26, 2010

I just went through the API and found nothing to intercept incoming and outgoing email messages.

View 7 Replies View Related

Android :: Intercepting - Blocking All Hardware Buttons From Working

Oct 20, 2010

I'd love to prevent hardware buttons from working while user runs my app. Perfectly all of them, but any number would help :) I am not sure it's doable but maybe I miss something, hence my question. For those wondering - "why?" - we got an app that does full screen colorful animation and users often run it and hand the phone to their babies as they can stare at it for hours :) but the problem is, kids accidentally press hardware buttons (usually camera trigger, but also Home or Search - depending on the device model). I'd love to add the option to block all keys beside one which can hardly be pressed accidentally.

View 2 Replies View Related

General :: App For Intercepting Data Connections?

Oct 30, 2011

I am looking for an app that can:

- make a log of all the other apps, including stock ones, that make attempts or actual connections to the internet, and at what time
- be able to intercept those connections
- preferably I would create a white list of apps that are allowed to connect, but others do not have permission.

Purposes include:
- saving on bandwidth in poorer countries where internet is expensive.
- making sure apps or malware doesn't try to send off my data when it shouldn't be.
- prevent annoying background sync/apps from running when I don't want them

I find it strange that we either give all the permissions the app wants, or it doesn't work. Why can't we restrict their internet access?

Does this sound feasible? Does it already exist?

I'm rooted and using an Asus Transformer.

View 3 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

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 :: Load Https Requests With Webview

Jun 2, 2010

I'm trying to load https requests with a Webkit object but It shows only a blank page, with http requests I don't have problems, It shows the page correctly. I have look the source code of the browser, in http://android.git.kernel.org/?p=platform/packages/apps/Browser.git;a... but I don't understand how the browser process the https requests. I think that the class BrowserActivity process the http and https requests but I don't see how to do it. Somebody could explain how the browser process the https request? It uses a Webview object to show the response of the https requests?

View 5 Replies View Related

Android :: Something That Will Log All HTTP Requests Phone Makes?

Aug 29, 2010

I saw an message "page could not be loaded" in an app that I was using which made me realize that it's UI may be HTTP based somehow. Is there a way that I can find out where it is sending its requests?

View 4 Replies View Related

Android :: How To Trace HTTP Requests / Responses?

Jul 22, 2009

How to trace the HTTP requests/responses e.g. by using Wireshark? I am using soap web services i want tocheck wheather the soap request from the web service sis going properly.I neee the Xml response from the server but non xml format i am getting how to check this request and response using Wireahark or any other process.

View 2 Replies View Related

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)

View 4 Replies View Related

Android :: Can Phone Pause WiFi Scan Requests?

Aug 19, 2010

I wrote an android application to request a scan for available WiFi signals around, using the WifiManager, then dump the results to a file. The program works fine, but this weird bug occurs. Initially I was requesting a scan every 30 seconds, and everything worked fine. I then tried to request a scan every two seconds, I get this strange bug. Everything will work fine for a few minutes, then the time between two scan requests jumps from 2 seconds to 50 seconds for no reason.

Then, for four more scans, it will scan at 2-second intervals, then skip to a 50-second interval, and it continues to do this consistently. With larger time intervals this bug does not appear. Has anyone experienced this bug before? Is there a way to prevent it? Or does Android automatically cancel scan requests if they are too frequent?

View 1 Replies View Related

Android :: Java Server To Handle Client Requests

Jul 29, 2010

Im looking for the concept of creating Java Server to handle Client requests and respond to it , i want to use Google App engine which does not allow Socket connections , so is the client & server in this case will communicate using Http requests? i'll be glad if someone could clarify the logic to me and provide a few lines of code.

View 3 Replies View Related

Android :: Multi Threaded Http Requests Cause Exception

Jan 27, 2010

I have an app making an https post on one thread while performing a file download on another thread. For some odd reason, I am getting a ClientProtocolException saying that "The server failed to respond with a valid HTTP response". The error goes away if everything is run on a separate thread. Oddly if I run the two server requests in serial, the error goes away. It seems there's a bug that happens when two requests are made at the same time.

Important note: The post occurs to a different server than the download so the servers themselves should not be causing the problem. The code is simple. Here's the file download code:.............

View 9 Replies View Related

Android :: How To Use Separate Thread To Perform Http Requests?

Aug 2, 2010

I have an application that is performing HTTP Requests (specifically calling the FogBugz API) when the user clicks certain buttons. Right now, I am just creating a service when the application starts, and then calling different methods in that service to complete requests. However, when I do this, there is the usual hang in the UI thread. I have looked at AsyncTask, but am not sure it will do what I want to accomplish. Because I need to instantly parse the XML that the HTTP Request returns, I need to have a process that is able to return this data to the UI thread. Will ASyncTask be able to accomplish this, or is there some other way.

View 1 Replies View Related

Android :: Injecting HTTP Header Into All Requests By Emulator

Mar 17, 2009

Is there an easy way to inject a header into all HTTP request sent from the emulator, including HTTP requests made by my app and also by the built-in web browser? I need this ability to model the behavior of a carrier gateway. I tried running the emulator through Fiddler as a proxy because I know how to manipulate HTTP requests in Fiddler, but that that didn't work. The emulator was successfully able to make the first HTTP request, but choked on subsequent ones. Reading this list, it seems that getting the emulator to use a proxy is not is not that easy. If this is the only way to do what I need, then I'll certainly give it another shot and post details about any problems I encounter. I am just wondering if perhaps there is an easier way to inject a header.

View 3 Replies View Related

Android :: Sending Multiple Http Requests To Django

May 19, 2010

I am developing a microblogging platform in which I need to populate the page with Post (user defined class with fields) obtained from the Django server using HttpGet.In the client side(Android) I am using GSON to parse the responses from server to the type Post. So I require that server should send Post's one by one so as to add each of them to a list of Posts after parsing and then finally notifying the list adapter of changes in the data set after all Post's have been added.But the problem coming when intially loading the application, the page has to be populated with 10 latest Post's from the server. So I thought of a rather dirty way of sending 10 httpget requests to the server one after the other to the server. The code looks like this.I was thinking of executing it 10 times in a loop to get the 10 Post's I require. But in Django as far I know (correct me if I am wrong) there's no way to keep an index of the last sent Post to the client and so no way to send the 'next' Post on the next HttpGet request. So I am out of ideas.I feel there's a better way to do this efficiently.

View 1 Replies View Related

Android : How To Handle Of Server Requests / Device Rotations?

Nov 21, 2010

I read a lot about handling rotation in android applications, but I still have so many questions and need to much to understand. Let me explain my problem or implementation, that I'm using now in my application. If an activity will be opened, a get request will be sent to server. This request will be executed in a Thread (new Thread(...)) and if request was completed, activity's ui will be refreshed. But what should I do, if the user rotate his device?

View 3 Replies View Related

Android :: Intercepting Clicks From Subview In Android

Jan 5, 2010

My application has a custom view which contains other custom views of a different type. The subviews have their own click listeners (which I can't change, as these are in 3rd party libraries). How can I intercept a user's click at the level of my view to do some processing, and then pass the click on to the proper subview?

View 3 Replies View Related







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