Service
私は自分のすべてにバインドされているローカルを使用し、activities
開始すると次のActivity
ようになりますcallback
:
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
}
しかし、TabHost を使用し、アクティビティが次の方法で開始されている場合:
TabSpec spec = tabHost.newTabSpec("Spec");
intent = new Intent(this, TestActivity.class);
spec.setContent(intent);
onServiceConnected コールバックを呼び出す必要があります。
なんで?このケースを解決するにはどうすればよいですか?
SUMMARY:
intent = new Intent(this, MyActivity.class);
startActivity(intent); // In this case callback is called
TabSpec spec = tabHost.newTabSpec("Spec");
intent = new Intent(this, MyActivity.class);
spec.setContent(intent); // In this case callback is not called