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
| public void setupNotification(){ | |
| NotificationCompat.Builder mBuilder = | |
| new NotificationCompat.Builder(this) | |
| .setSmallIcon(R.drawable.ic_launcher) | |
| .setContentTitle("Title") | |
| .setContentText("TEXT"); | |
| mBuilder.setOngoing(true); | |
| // Creates an explicit intent for an Activity in your app |
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
| AlertDialog.Builder builder = new AlertDialog.Builder(Activity.this); | |
| builder.setTitle("Delete") | |
| .setIcon(android.R.drawable.ic_dialog_alert) | |
| .setMessage("Do you want to delete?") | |
| .setCancelable(false) | |
| .setPositiveButton("Yes", new DialogInterface.OnClickListener() { | |
| public void onClick(DialogInterface dialog, int id) { | |
| DAO dao = new DAO(Activity.this); | |
| dao.deleteValues(valueSelected); | |
| dao.close(); |