title: openOrCreateDatabase() undefined in the fragment class
body: <p>I am writing a code in which I place an fragment within an activity. Now in the OnCreate() function of the fragment class, I am not having error in the following code</p>
  
  <pre><code>public class HomePage_Fragment extends Fragment {
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      SQLiteDatabase db = openOrCreateDatabase("DATABASE",android.content.Context.MODE_PRIVATE ,null);
  
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater,ViewGroup container, Bundle savedInstance){
  
  
      return inflater.inflate(R.layout.fragment_home_page,container,false);
  
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>ERROR:The method openOrCreateDatabase(String, int, null) is undefined for the type HomePage_Fragment</p>
  
  <p>The code is very simple and I have used the same commands many times, so I am sure the syntax is correct.</p>
  
  <p>Thanks in advance</p>