Skip to content

Instantly share code, notes, and snippets.

View manishpatelgt's full-sized avatar
🏠
Working from home

Manish Patel manishpatelgt

🏠
Working from home
View GitHub Profile
package com.amadsapp.activity;
/**
* Created by Manish on 6/26/2016.
*/
import android.content.Context;
import android.graphics.Bitmap;
import android.media.MediaPlayer;
// This method will return if your table exist a field or not
public boolean isFieldExist(SQLiteDatabase db,String tableName, String fieldName)
{
Cursor res= db.rawQuery("SELECT * FROM " + tableName + " LIMIT 0", null);
if (res.getColumnIndex(fieldName) != -1)
return true;
else
return false;
}