This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.amadsapp.activity; | |
/** | |
* Created by Manish on 6/26/2016. | |
*/ | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.media.MediaPlayer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
} |