I solved a similar issue by broadcasting that my service is actually active
and running and then if my activity is active it receives that broadcast and
does what it needs to do. This way the Activity always "knows" when the
service is active.
The onBind is not applicable to my situation as my
On Fri, Jul 22, 2011 at 4:35 AM, Animesh Sinha wrote:
> You are right in saying that android requires developers to write an
> event-driven code and that effort needs to be put for designing the
> whole chain of events.
>
> But for the following case as shown below, I don't think one can get
> rid
Thanks Chris for replying.
You are right in saying that android requires developers to write an
event-driven code and that effort needs to be put for designing the
whole chain of events.
But for the following case as shown below, I don't think one can get
rid of the NullPointerException thrown in
Hi,
You can just start the service via an intent and also pass details
about the function(s) you want executed, but you won't get anything
returned from the function(s) invoked in the service being sent back
to the activity directly, you will have to use the usual interfaces
otherwise.
Regards
O
On Thursday, July 21, 2011 1:26:54 AM UTC-4, Animesh Sinha wrote:
> The issue is that I need to call the service methods as soon as it is
> connected.
> So, Is there any way by which I can execute the functions of service
> JUST AFTER binding is complete ?
>
> It takes around 10-20ms for bindi
Executing the function calls in onServiceConnected() method is not
what is wanted as described in following case:
There is a Service Wrapper class where the binding/unbinding is
actually done.
The MyServiceClient is an Activity class used for invoking some
functions on the service using the Servic
Executing the function calls in onServiceConnected() method is not
what is wanted as described in following case:
CODE SNIPPET
class ServiceWrapperClass
{
private ISomeServiceInterface myService
..
private ServiceConnection progressBarServiceCo
On Thu, Jul 21, 2011 at 1:26 AM, animeshsi wrote:
> The issue is that I need to call the service methods as soon as it is
> connected.
> So, Is there any way by which I can execute the functions of service
> JUST AFTER binding is complete ?
Execute those "functions" in onServiceConnected().
--
Thanks Mark for replying.
The issue is that I need to call the service methods as soon as it is
connected.
So, Is there any way by which I can execute the functions of service
JUST AFTER binding is complete ?
It takes around 10-20ms for binding, I tried to make use
Thread.sleep(30); but it delaye
9 matches
Mail list logo