このコードを使用して、dbhelperインスタンスをあるアクティビティから別のアクティビティに渡そうとしています
private void onCategoriesClick() {
private DbAdapter db;
db = new DbAdapter(this);
Intent i = new Intent(this, CategoriesActivity.class);
Bundle b = i.getExtras();
b.putSerializable("db", db); //geting NullPointerException here
startActivityForResult(i, 0);
DbAdapterクラスは実装しますSerializable
私は混乱しています、誰かが私の間違いを指摘できますか?