Ok I tried to find out at which point the service is started and when
I can access its database variable. The logs I used showed that the
services onCreate() is called after the onResume() method by my
activity. That is a bit late because I need access to the database
before onResume() to fill the views with data. Is there a way to tell
the activity to wait until the service is started?

On 5 Aug., 22:54, Kostya Vasilyev <[email protected]> wrote:
> Starting / binding to a service is asynchronous. You can't call bindService
> and expect it to be already started and bound by the next line.
>
> Call bindService and return control to Android by returning from onCreate or
> whatever. Your service connection callback will be invoked a little later,
> once the service is started.
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com
>
> 06.08.2010 0:49 пользователь "Bender" <[email protected]> написал:
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

ATTENTION: Android-Beginners will be permanently disabled on August 9 2010. For 
more information about this change, please read [http://goo.gl/xkfl] or visit 
the Group home page.

Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to