I have the following base activity.
public class BaseActivity extends Activity
...
...
... onCreate(...) {
this.bindService(new Intent(BaseActivity.this,
LocalService.class), serviceConn, Context.BIND_AUTO_CREATE);
}
...
private ServiceConnection serviceConn = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder
service)
{
LocalService.LocalBinder binder =
(LocalService.LocalBinder)
service;
service = binder.getService();
}
...
};
A derived activity fails on the call to cast a binder --
LocalService.LocalBinder binder = (LocalService.LocalBinder) service;
fails with this on the call stack --
InvocationTargetException.<init>(Throwable) line: 56
ActivityThread.main(String[]) line: 3948
what am I doing wrong?
tia.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---