<commit_before>package com.marlonjones.simplereminder;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.app.NotificationCompat;
import android.support.v7.widget.Toolbar;
import android.text.InputType;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.Toast;

import com.afollestad.materialdialogs.MaterialDialog;

public class MainActivity extends AppCompatActivity {
//TODO - MAKE BACKGROUND CLEAR AND WRITE TUTORIAL ON ANDROID NOTIFICATIONS AND OTHER THINGS
    public static final int NOTIFICATION_ID = 1;
    PackageManager manager = getPackageManager();
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        new MaterialDialog.Builder(this)
                .title(R.string.input)
                .inputType(InputType.TYPE_CLASS_TEXT)
                .input(null, null, new MaterialDialog.InputCallback()
                {
                    @Override
                    public void onInput(MaterialDialog dialog, CharSequence input) {
                        //notification
                            NotificationCompat.Builder builder = new NotificationCompat.Builder(getApplicationContext());
                            Intent notificationIntent = new Intent(manager.getLaunchIntentForPackage("com.marlonjones.simplereminder"));
                            builder.setStyle(new NotificationCompat.BigTextStyle().bigText(input.toString())); //BigText
                            builder.setOngoing(true); //Make persistent
                            builder.setSmallIcon(R.drawable.ic_note);
                            builder.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher));
                            builder.setContentTitle("Remember!");
                            builder.setContentText(input.toString()); //Get text from dialog input
                            NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
                            notificationManager.notify(NOTIFICATION_ID, builder.build());
                        //toast
                        Toast.makeText(MainActivity.this, "Reminder Created and set as Ongoing Notification.",
                                Toast.LENGTH_SHORT).show();
                        //Close Activity
                        finish();
                    }
                }).show();
    }
}<commit_msg>clicknotification<commit_after>package com.marlonjones.simplereminder;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.app.NotificationCompat;
import android.support.v7.widget.Toolbar;
import android.text.InputType;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.Toast;

import com.afollestad.materialdialogs.MaterialDialog;

public class MainActivity extends AppCompatActivity {
//TODO - MAKE BACKGROUND CLEAR AND WRITE TUTORIAL ON ANDROID NOTIFICATIONS AND OTHER THINGS
    public static final int NOTIFICATION_ID = 1;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        new MaterialDialog.Builder(this)
                .title(R.string.input)
                .inputType(InputType.TYPE_CLASS_TEXT)
                .input(null, null, new MaterialDialog.InputCallback()
                {
                    @Override
                    public void onInput(MaterialDialog dialog, CharSequence input) {
                        //notification
                            NotificationCompat.Builder builder = new NotificationCompat.Builder(getApplicationContext());
                        PendingIntent pendingIntent = PendingIntent.getActivity(MainActivity.this, 0,
                                new Intent(getApplicationContext(), MainActivity.class)
                                        .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP),
                                0);
                            builder.setStyle(new NotificationCompat.BigTextStyle().bigText(input.toString())); //BigText
                            builder.setOngoing(true); //Make persistent
                            builder.setContentIntent(pendingIntent); //OnClick for Reopening App
                            builder.setSmallIcon(R.drawable.ic_note);
                            builder.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher));
                            builder.setContentTitle("Remember!");
                            builder.setContentText(input.toString()); //Get text from dialog input
                            NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
                            notificationManager.notify(NOTIFICATION_ID, builder.build());
                        //toast
                        Toast.makeText(MainActivity.this, "Reminder Created and set as Ongoing Notification.",
                                Toast.LENGTH_SHORT).show();
                        //Close Activity
                        finish();
                    }
                }).show();
    }
}
{'fraction_non_alphanumeric': 0.08116614212357132, 'fraction_numerical': 0.001656451880072884, 'mean_word_length': 2.242749731471536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '937824', 'n_tokens_mistral': 1453, 'n_tokens_neox': 1389, 'n_words': 276}