1

how to handle context for this specific java class in Android

view story
linux-howto

http://stackoverflow.com – the deleteDatabase method needs a context in order to work. So in my class there is a context declared called ourContext. This class does not extend any other class like Activity so I guess you could call it a helper class. The only place in the class that uses context is the one method shown below that is called deleteData. and this calls the deleteDatabase method that needs a context to work. ourContext.deleteDatabase(DATABASE_NAME); Is it possible to not declare a context for the class in this situation? and can I use "this" for the context? public class PlayGame { private DbHelp (HowTos)