Code example for SQLiteStatement

Methods: simpleQueryForString, bindObjectToProgram

  public String getDataMimeType(long dataId) {
      // Make sure compiled statements are ready by opening database 
      try { 
          // Try database query to find mimetype 
          DatabaseUtils.bindObjectToProgram(mDataMimetypeQuery, 1, dataId);
          String mimetype = mDataMimetypeQuery.simpleQueryForString();
          return mimetype;
      } catch (SQLiteDoneException e) {
          // No valid mapping found, so return null 
          return null; 
  public String getDataView() {
  	return Views.DATA_ALL;
  public String getPlaceView() {
    return Views.PLACES_ALL;
Connect your IDE to all the code out there  Get Codota for Java