Android: How can I use methods defined for Activities in my own classes?
<p>My application has multiple activities that use the same database in different ways.  Periodically, data is added to the database from outside my application.  So instead of duplicating the code to check the database in each activity, I'm trying to create a single class that can be used from any of the activities to check the database for new entries.  I am using a fileInputStream, and the openFileInput method to open a file that holds some preferences that go in to determining if the new database entries are of interest to the application.  Using the openFileInput method in each activity works as expected, but using it in my own class gives the error saying that the openFileInput() method is undefined. I've imported java.io.FileInputStream, but the error persists.</p>
