public void addAlbumId(final Long albumId,final String albumName,final String artistName,final String songCount,final String albumYear){
  if (albumId == null || albumName == null || artistName == null || songCount == null) {
    return;
  }
  try {
    final SQLiteDatabase database=getWritableDatabase();
    final ContentValues values=new ContentValues(6);
    database.beginTransaction();
    values.put(RecentStoreColumns.ID,albumId);
    values.put(RecentStoreColumns.ALBUMNAME,albumName);
    values.put(RecentStoreColumns.ARTISTNAME,artistName);
    values.put(RecentStoreColumns.ALBUMSONGCOUNT,songCount);
    values.put(RecentStoreColumns.ALBUMYEAR,albumYear);
    values.put(RecentStoreColumns.TIMEPLAYED,System.currentTimeMillis());
    database.delete(RecentStoreColumns.NAME,RecentStoreColumns.ID + " = ?",new String[]{String.valueOf(albumId)});
    database.insert(RecentStoreColumns.NAME,null,values);
    database.setTransactionSuccessful();
    database.endTransaction();
  }
 catch (  Throwable e) {
    e.printStackTrace();
  }
}

public void addAlbumId ( final Long albumId , final String albumName , final String artistName , final String songCount , final String albumYear ) { if ( albumId == null || albumName == null || artistName == null || songCount == null ) { return ; } try { final SQLiteDatabase database = getWritableDatabase ( ) ; final ContentValues values = new ContentValues ( 6 ) ; database . beginTransaction ( ) ; values . put ( RecentStoreColumns . ID , albumId ) ; values . put ( RecentStoreColumns . ALBUMNAME , albumName ) ; values . put ( RecentStoreColumns . ARTISTNAME , artistName ) ; values . put ( RecentStoreColumns . ALBUMSONGCOUNT , songCount ) ; values . put ( RecentStoreColumns . ALBUMYEAR , albumYear ) ; values . put ( RecentStoreColumns . TIMEPLAYED , System . currentTimeMillis ( ) ) ; database . delete ( RecentStoreColumns . NAME , RecentStoreColumns . ID + " = ?" , new String [ ] { String . valueOf ( albumId ) } ) ; database . insert ( RecentStoreColumns . NAME , null , values ) ; database . setTransactionSuccessful ( ) ; database . endTransaction ( ) ; } catch ( Throwable e ) { e . printStackTrace ( ) ; } }
used to store artist ids in the database .
