Is it possible to call methods of a Activity from service.

by Reghu » Mon, 27 Apr 2009 22:08:36 GMT


Sponsored Links
 Hello,

Is it possible to call methods of a Activity from service.

I am running a thread from a service and i listening to some external
event from that thread.
I am not able to call methods  from that thread. Is there any way to
call methods from a thread.

Thank you

--~--~---------~--~----~------------~-------~--~----~



Is it possible to call methods of a Activity from service.

by Justin (Google Employee) » Tue, 28 Apr 2009 00:46:59 GMT


 Look into android.os.Handler.

Cheers,
Justin
Android Team @ Google



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Is it possible to call methods of a Activity from service.

by Reghu » Thu, 30 Apr 2009 12:16:16 GMT


 Thank you

i made it ....



On Apr 27, 9:46pm, "Justin (Google Employee)" <j...@google.com>



--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Overview Of New Intel Core i7(Nehalem) Processor

Before entering on the details about the architectural features
present on the Nehalem CPUs, let make a summary of the base elements
that are common to the many different versions: server, desktop and
notebook. It worth noticing how the new architecture engineering
process used by Intel aims at obtaining CPUs that can be used in all
three sectors, by simply slightly changing architecture and CPU
characteristics to better adapt to each of the sectors.




for more info visit  http://www.intel-intel99.blogspot.com

--~--~---------~--~----~------------~-------~--~----~

2. Timeout using apache DefaultHttpClient not working when port is closed

I have a simple piece of code that allows a user to specify a URL,
port, username, and password to grab a frame from a network camera.
An exception is thrown properly if the url can't be resolved, or if
the authentication fails.  However, I can't seem to throw an exception
in a reasonable amount of time if the server is available but the port
is closed (or the user entered the wrong port number).  It just seems
to sit and wait for a *long* time...

HttpParams params = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(params, netConnectTimeout);
HttpConnectionParams.setSoTimeout(params, netReadTimeout);
DefaultHttpClient httpclient = new DefaultHttpClient(params);
httpclient.setHttpRequestRetryHandler(new
DefaultHttpRequestRetryHandler(0, false));
UsernamePasswordCredentials credentials = new
UsernamePasswordCredentials(username + ":" + password);
httpclient.getCredentialsProvider().setCredentials(new AuthScope
(hostName,port),credentials);
HttpGet method = new HttpGet(cameraUrl);
HttpResponse response = httpclient.execute(method);

(netConnectTimeout & netReadTimeout are both set to 10000)

After doing a substantial amount of reading, I believe I understand
why netConnectTimeout and netReadTimeout have no effect on this
particular problem.  After discovering "HttpRequestRetryHandler" I
believed I had found the solution.  However after applying what I had
found to my code (line 5 above), it had no effect.  The connection
still sits and waits far longer than 10 seconds when the incorrect
port is specified in the prefs.

Can anybody help?

--~--~---------~--~----~------------~-------~--~----~

3. Best way to add 100.000 words to database

4. Outlook Synchronization (Possible?)

5. 1.5 rebuild issue with emulator

6. OpenGL garbage collection (with direct ByteBuffers)

7. The building instruction maybe broken