// Path: app/src/main/java/com/djonique/birdays/utils/Constants.java
// public interface Constants {
// 
//     // Preferences
//     String CONTACTS_UPLOADED = "CONTACTS_UPLOADED";
//     String WRONG_CONTACTS_FORMAT = "WRONG_CONTACTS_FORMAT";
// 
//     // Permission requests
//     int READ_CONTACTS_PERMISSION_CODE = 1;
//     int WRITE_EXTERNAL_STORAGE_PERMISSION_CODE = 2;
//     int READ_EXTERNAL_STORAGE_PERMISSION_CODE = 3;
// 
//     // Alarm
//     String NAME = "NAME";
//     String WHEN = "WHEN";
//     String TIME_STAMP = "TIME_STAMP";
// 
//     // Settings keys
//     String NOTIFICATIONS_KEY = "notifications_key";
//     String NOTIFICATION_TIME_KEY = "notification_time_key";
//     String ADDITIONAL_NOTIFICATION_KEY = "additional_notification_key";
//     String RINGTONE_KEY = "ringtone_key";
//     String NIGHT_MODE_KEY = "night_mode_key";
//     String START_PAGE = "start_page_key";
//     String DISPLAYED_AGE_KEY = "displayed_age_key";
// 
//     // Intents
//     String TYPE_EMAIL = "message/rfc822";
//     String MAILTO = "mailto:";
//     String TYPE_SMS = "vnd.android-dir/mms-sms";
//     String ADDRESS = "address";
//     String SMSTO = "smsto:";
//     String TEL = "tel: ";
// }


import android.content.ActivityNotFoundException;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.support.design.widget.Snackbar;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.AppCompatButton;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import com.djonique.birdays.R;
import com.djonique.birdays.utils.Constants;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
            @Override
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            }
        });
        builder.show();
    }

    @OnClick(R.id.button_help_whitelist)
    void openBatteryOptimization() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            try {
                startActivity(Intent.createChooser(new Intent(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS), null));
            } catch (ActivityNotFoundException e) {
                Toast.makeText(this, ACTIVITY_NOT_FOUND_EXCEPTION, Toast.LENGTH_LONG).show();
            }
        } else {
            Toast.makeText(this, R.string.help_whitelist_error, Toast.LENGTH_LONG).show();
        }
    }

    @OnClick(R.id.button_help_settings)
    void openSettings() {
        startActivity(new Intent(android.provider.Settings.ACTION_SETTINGS));
    }

    @OnClick(R.id.button_help_email)
    void sendEmail() {
        String email = getString(R.string.birdays_email);
        Intent intent = new Intent(Intent.ACTION_SENDTO);
// Path: app/src/main/java/com/djonique/birdays/utils/Constants.java
// public interface Constants {
// 
//     // Preferences
//     String CONTACTS_UPLOADED = "CONTACTS_UPLOADED";
//     String WRONG_CONTACTS_FORMAT = "WRONG_CONTACTS_FORMAT";
// 
//     // Permission requests
//     int READ_CONTACTS_PERMISSION_CODE = 1;
//     int WRITE_EXTERNAL_STORAGE_PERMISSION_CODE = 2;
//     int READ_EXTERNAL_STORAGE_PERMISSION_CODE = 3;
// 
//     // Alarm
//     String NAME = "NAME";
//     String WHEN = "WHEN";
//     String TIME_STAMP = "TIME_STAMP";
// 
//     // Settings keys
//     String NOTIFICATIONS_KEY = "notifications_key";
//     String NOTIFICATION_TIME_KEY = "notification_time_key";
//     String ADDITIONAL_NOTIFICATION_KEY = "additional_notification_key";
//     String RINGTONE_KEY = "ringtone_key";
//     String NIGHT_MODE_KEY = "night_mode_key";
//     String START_PAGE = "start_page_key";
//     String DISPLAYED_AGE_KEY = "displayed_age_key";
// 
//     // Intents
//     String TYPE_EMAIL = "message/rfc822";
//     String MAILTO = "mailto:";
//     String TYPE_SMS = "vnd.android-dir/mms-sms";
//     String ADDRESS = "address";
//     String SMSTO = "smsto:";
//     String TEL = "tel: ";
// }


// Path: app/src/main/java/com/djonique/birdays/activities/HelpActivity.java
import android.content.ActivityNotFoundException;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.support.design.widget.Snackbar;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.AppCompatButton;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import com.djonique.birdays.R;
import com.djonique.birdays.utils.Constants;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

            @Override
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            }
        });
        builder.show();
    }

    @OnClick(R.id.button_help_whitelist)
    void openBatteryOptimization() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            try {
                startActivity(Intent.createChooser(new Intent(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS), null));
            } catch (ActivityNotFoundException e) {
                Toast.makeText(this, ACTIVITY_NOT_FOUND_EXCEPTION, Toast.LENGTH_LONG).show();
            }
        } else {
            Toast.makeText(this, R.string.help_whitelist_error, Toast.LENGTH_LONG).show();
        }
    }

    @OnClick(R.id.button_help_settings)
    void openSettings() {
        startActivity(new Intent(android.provider.Settings.ACTION_SETTINGS));
    }

    @OnClick(R.id.button_help_email)
    void sendEmail() {
        String email = getString(R.string.birdays_email);
        Intent intent = new Intent(Intent.ACTION_SENDTO);
        intent.setType(Constants.TYPE_EMAIL);