title: Android getBaseContext() for database constructor
body: <p>I have 2 separate classes for my android application to insert data to sqllite database</p>
  
  <ol>
  <li><p>DataBaseAdapterClass with this constructor</p>
  
  <pre><code>public DatabaseAdapter(Context context) {
      super(context, DATABASE_NAME, null, DATABASE_VERSION);
  
  }
  </code></pre></li>
  <li><p>I'm using another class called webservise  to get data from web service and insert in sqllite databse, there for i use this Asyntask Class..</p>
  
  <pre><code>public class FoodCityWebService {
  
      String myValue = "";
      private final String NAMESPACE="http://tempuri.org/";
      private final String URL = "xxxxxx:xxxx/Service1.asmx?WSDL";
  
      public FoodCityWebService(){
  
      }
  
      public FoodCityWebService(String param1){
  
      }
  
      public String getValueFromService()
      {
          myValue =  new web().execute("df").toString();
          return myValue;
      }
  
  
  
      public class web extends AsyncTask&lt;String,Integer, String&gt;
      { 
            String result = "";
            final String SOAP_ACTION="http://tempuri.org/GetUserName";
          @Override
          protected String doInBackground(String... params) {
  
              final String METHOD_NAME="GetUserName";
  
              SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME);
              request.addProperty("name","Bread");
              SoapSerializationEnvelope envelop=new SoapSerializationEnvelope(SoapEnvelope.VER11);//ver11 version
              envelop.dotNet=true;//only for dotnet       
              envelop.setOutputSoapObject(request);
  
               HttpTransportSE httptransportse=new HttpTransportSE(URL);
               String x ="";
              try{
              httptransportse.call(SOAP_ACTION, envelop);
  
              SoapPrimitive response=(SoapPrimitive)envelop.getResponse();
  
  
  
                  x = response.toString();
  
                  DatabaseAdapter da = new DatabaseAdapter(); // *ERROR!!!*           
                  da.addItem(new Item("CityItem1","Bread",Double.parseDouble(x),"222"));
  
  
  
              }catch (Exception e) {
  
                  e.printStackTrace();
  
              }
  
              return x;
  
  
          }
  
  
          } 
  
  
   }
  </code></pre></li>
  </ol>
  
  <p>How do I create the object from databseAdapter Class?</p>