mirror of
				https://github.com/bspeice/UNCCGameDay
				synced 2025-11-04 02:10:35 -05:00 
			
		
		
		
	Tap to delete alerts built.
This commit is contained in:
		@ -55,6 +55,10 @@ public class Alert {
 | 
			
		||||
		this.shown = i;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	public String toString() {
 | 
			
		||||
		return this.message;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	public void displayNotification(Context ctx) {
 | 
			
		||||
		NotificationCompat.Builder builder = new NotificationCompat.Builder(ctx)
 | 
			
		||||
			.setSmallIcon(R.drawable.ic_launcher)
 | 
			
		||||
 | 
			
		||||
@ -83,6 +83,16 @@ public class AlertDB extends SQLiteOpenHelper {
 | 
			
		||||
		return null;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	//delete specified alert from DB
 | 
			
		||||
	public void deleteAlert(Alert alert) {
 | 
			
		||||
		SQLiteDatabase db = this.getWritableDatabase();
 | 
			
		||||
		db.delete(TABLE_ALERTS, KEY_MESSAGE + " = ?", 
 | 
			
		||||
				new String[] { String.valueOf(alert.getMessage()) });
 | 
			
		||||
		db.close();
 | 
			
		||||
		
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	//get all alerts from Database
 | 
			
		||||
	//regardless of type, or if it has been shown
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user