title: How to handle database locking error in Android?
body: <p>So, after having gone through many other such questions, I decided to use one instance of my SqlLiteDataHandler through out the app, in all the activities that I require it. </p>
  
  <p>How I do it is, when the Splash screen loads, I create a public Static instance of the SqlLiteDataHandler. </p>
  
  <p>I then use that handler everywhere, though I never close it or make it null, as I understand that the app will lose its reference once the app is closed. </p>
  
  <p>But the problem still persists. I still get a database locked problem when I try to get out and get into the app multiple times. (Thus, going through the splash screen multiple times.)</p>
  
  <p>Where am I going wrong? </p>
  
  <p>My instance creation is as simple as this:</p>
  
  <pre><code>DbStaticClass.sqlDataHandler = new LinkDataHandler(SplashScreen.this);
  </code></pre>
  
  <p>and I use DbStaticClass.sqlDataHandler throughout the app. </p>