Tuesday, August 16, 2011

Bind service in the tab activity

Hello everybody,

Today I have found a really serious problem :) I was trying to bind the service to the tab activity (activity inside the tab host) and I was constantly getting same error:

ActivityManager::Binding with unknown activity: android.os.BinderProxy@124ef127

I have googled a bit and found the reason of the issue:
http://code.google.com/p/android/issues/detail?id=2483

In few words, to do bind/unbind service inside tab activity we have to use following call:

1) getApplicationContext().bindService(bindIntent, mConnection, Context.BIND_AUTO_CREATE);

2) getApplicationContext().unbindService(mConnection);

By this way, after device's restart, everything is working great! xD

Happy binding! (:

Best regads,
Yahor

2 comments:

  1. Thanks for the info on this

    Now I just need to stay on the same tab when making the purchase

    ReplyDelete
  2. Hello,

    You are always very welcome :)

    Best regards,
    Yahor

    ReplyDelete