Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は現在、EclipseでAndroidアプリを開発しています。パッケージには多くのアクティビティがあります。各アクティビティはデータベースに接続する必要があります。open(); を入れました。そしてclose(); 各クラスのデータベース メソッド。私が聞きたいのは、各クラスでデータベースを開いたり閉じたりするのを避けるために、データベースを一度だけ開いたり閉じたりする実装はありますか?