im creating a medicine reminder application and im tring to insert the value of my textview into my database
this is the error
java.lang.NullPointerException: Attempt to invoke virtual method ‘void com.gautam.medicinetime.data.source.local.MedicineDBHelper.viewUsername(android.widget.TextView)’ on a null object reference
this is my code
package com.gautam.medicinetime.addmedicine;
@BindView(R.id.tv_username)
TextView tvUsername;
private List<String> doseUnitList;
private boolean[] dayOfWeekList = new boolean[7];
private int hour, minute;
Unbinder unbinder;
private AddMedicineContract.Presenter mPresenter;
private View rootView;
private String doseUnit;
MedicineDBHelper dbHelper;
SQLiteDatabase db;
String username;
static AddMedicineFragment newInstance() {
Bundle args = new Bundle();
AddMedicineFragment fragment = new AddMedicineFragment();
fragment.setArguments(args);
return fragment;
}
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
FloatingActionButton fab = Objects.requireNonNull(getActivity()).findViewById(R.id.fab_edit_task_done);
fab.setImageResource(R.drawable.ic_done);
fab.setOnClickListener(setClickListener);
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.fragment_add_medicine, container, false);
unbinder = ButterKnife.bind(this, rootView);
// Retrieve the username from SharedPreferences
SharedPreferences sharedPreferences = Objects.requireNonNull(getActivity()).getSharedPreferences("MyPrefs", Context.MODE_PRIVATE);
username = sharedPreferences.getString("username", "Default User");
// Set the username to the TextView
tvUsername.setText(username);
setCurrentTime();
setSpinnerDoseUnits();
return rootView;
}
@Override
public void setPresenter(AddMedicineContract.Presenter presenter) {
this.mPresenter = presenter;
}
@Override
public void showEmptyMedicineError() {
// Snackbar.make(mTitle, getString(R.string.empty_task_message), Snackbar.LENGTH_LONG).show();
}
@Override
public void showMedicineList() {
Objects.requireNonNull(getActivity()).setResult(Activity.RESULT_OK);
getActivity().finish();
}
@Override
public boolean isActive() {
return isAdded();
}
@Override
public void onDestroyView() {
super.onDestroyView();
unbinder.unbind();
}
@OnClick({R.id.every_day, R.id.dv_monday, R.id.dv_tuesday, R.id.dv_wednesday,
R.id.dv_thursday, R.id.dv_friday, R.id.dv_saturday, R.id.dv_sunday})
public void onCheckboxClicked(View view) {
boolean checked = ((CheckBox) view).isChecked();
/** Checking which checkbox was clicked */
switch (view.getId()) {
case R.id.dv_monday:
if (checked) {
dayOfWeekList[1] = true;
} else {
dayOfWeekList[1] = false;
everyDay.setChecked(false);
}
break;
case R.id.dv_tuesday:
if (checked) {
dayOfWeekList[2] = true;
} else {
dayOfWeekList[2] = false;
everyDay.setChecked(false);
}
break;
case R.id.dv_wednesday:
if (checked) {
dayOfWeekList[3] = true;
} else {
dayOfWeekList[3] = false;
everyDay.setChecked(false);
}
break;
case R.id.dv_thursday:
if (checked) {
dayOfWeekList[4] = true;
} else {
dayOfWeekList[4] = false;
everyDay.setChecked(false);
}
break;
case R.id.dv_friday:
if (checked) {
dayOfWeekList[5] = true;
} else {
dayOfWeekList[5] = false;
everyDay.setChecked(false);
}
break;
case R.id.dv_saturday:
if (checked) {
dayOfWeekList[6] = true;
} else {
dayOfWeekList[6] = false;
everyDay.setChecked(false);
}
break;
case R.id.dv_sunday:
if (checked) {
dayOfWeekList[0] = true;
} else {
dayOfWeekList[0] = false;
everyDay.setChecked(false);
}
break;
case R.id.every_day:
LinearLayout ll = (LinearLayout) rootView.findViewById(R.id.checkbox_layout);
for (int i = 0; i < ll.getChildCount(); i++) {
View v = ll.getChildAt(i);
((DayViewCheckBox) v).setChecked(checked);
onCheckboxClicked(v);
}
break;
}
}
@OnClick(R.id.tv_medicine_time)
void onMedicineTimeClick() {
showTimePicker();
}
private void showTimePicker() {
Calendar mCurrentTime = Calendar.getInstance();
hour = mCurrentTime.get(Calendar.HOUR_OF_DAY);
minute = mCurrentTime.get(Calendar.MINUTE);
TimePickerDialog mTimePicker;
mTimePicker = new TimePickerDialog(getContext(), new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker timePicker, int selectedHour, int selectedMinute) {
hour = selectedHour;
minute = selectedMinute;
tvMedicineTime.setText(String.format(Locale.getDefault(), "%d:%d", selectedHour, selectedMinute));
}
}, hour, minute, false);//No 24 hour time
mTimePicker.setTitle("Select Time");
mTimePicker.show();
}
private void setCurrentTime() {
Calendar mCurrentTime = Calendar.getInstance();
hour = mCurrentTime.get(Calendar.HOUR_OF_DAY);
minute = mCurrentTime.get(Calendar.MINUTE);
tvMedicineTime.setText(String.format(Locale.getDefault(), "%d:%d", hour, minute));
}
private void setSpinnerDoseUnits() {
doseUnitList = Arrays.asList(getResources().getStringArray(R.array.medications_shape_array));
ArrayAdapter<String> adapter = new ArrayAdapter<>(Objects.requireNonNull(getContext()), android.R.layout.simple_dropdown_item_1line, doseUnitList);
spinnerDoseUnits.setAdapter(adapter);
}
@OnItemSelected(R.id.spinner_dose_units)
void onSpinnerItemSelected(int position) {
if (doseUnitList == null || doseUnitList.isEmpty()) {
return;
}
doseUnit = doseUnitList.get(position);
Log.d("TAG", doseUnit);
}
private View.OnClickListener setClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
int checkBoxCounter = 0;
String pill_name = editMedName.getText().toString();
String doseQuantity = tvDoseQuantity.getText().toString();
Calendar takeTime = Calendar.getInstance();
Date date = takeTime.getTime();
String dateString = new SimpleDateFormat("MMM d, yyyy", Locale.getDefault()).format(date);
/** Updating model */
MedicineAlarm alarm = new MedicineAlarm();
int alarmId = new Random().nextInt(100);
/** If Pill does not already exist */
if (!mPresenter.isMedicineExits(pill_name)) {
Pills pill = new Pills();
pill.setPillName(pill_name);
alarm.setDateString(dateString);
alarm.setHour(hour);
alarm.setMinute(minute);
alarm.setPillName(pill_name);
alarm.setDayOfWeek(dayOfWeekList);
alarm.setDoseUnit(doseUnit);
alarm.setDoseQuantity(doseQuantity);
alarm.setAlarmId(alarmId);
pill.addAlarm(alarm);
long pillId = mPresenter.addPills(pill);
pill.setPillId(pillId);
mPresenter.saveMedicine(alarm, pill);
} else { // If Pill already exists
Pills pill = mPresenter.getPillsByName(pill_name);
alarm.setDateString(dateString);
alarm.setHour(hour);
alarm.setMinute(minute);
alarm.setPillName(pill_name);
alarm.setDayOfWeek(dayOfWeekList);
alarm.setDoseUnit(doseUnit);
alarm.setDoseQuantity(doseQuantity);
alarm.setAlarmId(alarmId);
pill.addAlarm(alarm);
mPresenter.saveMedicine(alarm, pill);
}
List<Long> ids = new LinkedList<>();
try {
List<MedicineAlarm> alarms = mPresenter.getMedicineByPillName(pill_name);
for (MedicineAlarm tempAlarm : alarms) {
if (tempAlarm.getHour() == hour && tempAlarm.getMinute() == minute) {
ids = tempAlarm.getIds();
break;
}
}
} catch (Exception e) {
e.printStackTrace();
}
for (int i = 0; i < 7; i++) {
if (dayOfWeekList[i] && pill_name.length() != 0) {
int dayOfWeek = i + 1;
long _id = ids.get(checkBoxCounter);
int id = (int) _id;
checkBoxCounter++;
/** This intent invokes the activity ReminderActivity, which in turn opens the AlertAlarm window */
Intent intent = new Intent(getActivity(), ReminderActivity.class);
intent.putExtra(ReminderFragment.EXTRA_ID, _id);
PendingIntent operation = PendingIntent.getActivity(getActivity(), id, intent, PendingIntent.FLAG_UPDATE_CURRENT);
/** Getting a reference to the System Service ALARM_SERVICE */
AlarmManager alarmManager = (AlarmManager) Objects.requireNonNull(getActivity()).getSystemService(ALARM_SERVICE);
/** Creating a calendar object corresponding to the date and time set by the user */
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY, hour);
calendar.set(Calendar.MINUTE, minute);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
calendar.set(Calendar.DAY_OF_WEEK, dayOfWeek);
/** Converting the date and time in to milliseconds elapsed since epoch */
long alarm_time = calendar.getTimeInMillis();
if (calendar.before(Calendar.getInstance()))
alarm_time += AlarmManager.INTERVAL_DAY * 7;
assert alarmManager != null;
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, alarm_time,
AlarmManager.INTERVAL_DAY * 7, operation);
}
}
Toast.makeText(getContext(), "Alarm for " + pill_name + " is set successfully", Toast.LENGTH_SHORT).show();
tvUsername.setText(username);
showMedicineList();
dbHelper.viewUsername(String.valueOf(tvUsername));
}
};
}
this is my database
@Override
/** Creating tables */
public void onCreate(SQLiteDatabase db) {
db.execSQL(CREATE_PILL_TABLE);
db.execSQL(CREATE_ALARM_TABLE);
db.execSQL(CREATE_PILL_ALARM_LINKS_TABLE);
db.execSQL(CREATE_HISTORIES_TABLE);
db.execSQL(CREATE_USER_TABLE);
}
@Override
// TODO: change this so that updating doesn't delete old data
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
// db.execSQL(“CREATE TABLE users(id integer primary key not null, username text, password text)”);
db.execSQL(“ALTER TABLE pill_alarm ADD COLUMN frag text NOT NULL DEFAULT ” “);
}
public Boolean insertData(String username, String password){
SQLiteDatabase MyDB = this.getWritableDatabase();
ContentValues contentValues=new ContentValues();
contentValues.put("username", username);
contentValues.put("password", password);
long result = MyDB.insert("users", null, contentValues);
if(result==-1) return false;
else
return true;
}
public Boolean checkusername(String username) {
SQLiteDatabase MyDB = this.getWritableDatabase();
Cursor cursor = MyDB.rawQuery("Select * from users where username = ?", new String[] {username});
if(cursor.getCount()>0)
return true;
else
return false;
}
public Boolean checkusernamepassword(String username, String password) {
SQLiteDatabase MyDB = this.getWritableDatabase();
Cursor cursor = MyDB.rawQuery("select * from users where username = ? and password = ?", new String[] {username,password});
if(cursor.getCount()>0)
return true;
else
return false;
}
public void viewUsername(String frag) {
SQLiteDatabase dbHelper = this.getReadableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("frag", frag);
dbHelper.insert("pill_alarm", null, contentValues);
}
// ############################# get methods ####################################### //
/**
* allows pillBox to retrieve a row from pill table in Db
*
* @param pillName takes in a string of the pill Name
* @return returns a pill model object
*/
public Pills getPillByName(String pillName) {
SQLiteDatabase db = this.getReadableDatabase();
String dbPill = "select * from "
+ PILL_TABLE + " where "
+ KEY_PILLNAME + " = "
+ "'" + pillName + "'";
Cursor c = db.rawQuery(dbPill, null);
Pills pill = new Pills();
if (c.moveToFirst() && c.getCount() >= 1) {
pill.setPillName(c.getString(c.getColumnIndex(KEY_PILLNAME)));
pill.setPillId(c.getLong(c.getColumnIndex(KEY_ROWID)));
c.close();
}
return pill;
}
/**
* allows the pillBox to retrieve all the pill rows from database
*
* @return a list of pill model objects
*/
public List<Pills> getAllPills() {
List<Pills> pills = new ArrayList<>();
String dbPills = "SELECT * FROM " + PILL_TABLE;
SQLiteDatabase db = getReadableDatabase();
Cursor c = db.rawQuery(dbPills, null);
/** Loops through all rows, adds to list */
if (c.moveToFirst()) {
do {
Pills p = new Pills();
p.setPillName(c.getString(c.getColumnIndex(KEY_PILLNAME)));
p.setPillId(c.getLong(c.getColumnIndex(KEY_ROWID)));
pills.add(p);
} while (c.moveToNext());
}
c.close();
return pills;
}
/**
* Allows pillBox to retrieve all Alarms linked to a Pill
* uses combineAlarms helper method
*
* @param pillName string
* @return list of alarm objects
* @throws URISyntaxException honestly do not know why, something about alarm.getDayOfWeek()
*/
public List<MedicineAlarm> getAllAlarmsByPill(String pillName) throws URISyntaxException {
List<MedicineAlarm> alarmsByPill = new ArrayList<>();
/** HINT: When reading string: '.' are not periods ex) pill.rowIdNumber */
String selectQuery = "SELECT * FROM " +
ALARM_TABLE + " alarm, " +
PILL_TABLE + " pill, " +
PILL_ALARM_LINKS + " pillAlarm WHERE " +
"pill." + KEY_PILLNAME + " = '" + pillName + "'" +
" AND pill." + KEY_ROWID + " = " +
"pillAlarm." + KEY_PILLTABLE_ID +
" AND alarm." + KEY_ROWID + " = " +
"pillAlarm." + KEY_ALARMTABLE_ID;
SQLiteDatabase db = this.getReadableDatabase();
Cursor c = db.rawQuery(selectQuery, null);
if (c.moveToFirst()) {
do {
MedicineAlarm al = new MedicineAlarm();
al.setId(c.getInt(c.getColumnIndex(KEY_ROWID)));
al.setHour(c.getInt(c.getColumnIndex(KEY_HOUR)));
al.setMinute(c.getInt(c.getColumnIndex(KEY_MINUTE)));
al.setPillName(c.getString(c.getColumnIndex(KEY_ALARMS_PILL_NAME)));
al.setDoseQuantity(c.getString(c.getColumnIndex(KEY_DOSE_QUANTITY)));
al.setDoseUnit(c.getString(c.getColumnIndex(KEY_DOSE_UNITS)));
al.setDateString(c.getString(c.getColumnIndex(KEY_DATE_STRING)));
al.setAlarmId(c.getInt(c.getColumnIndex(KEY_ALARM_ID)));
alarmsByPill.add(al);
} while (c.moveToNext());
}
c.close();
return combineAlarms(alarmsByPill);
}
public List<MedicineAlarm> getAllAlarms(String pillName) throws URISyntaxException {
List<MedicineAlarm> alarmsByPill = new ArrayList<>();
/** HINT: When reading string: '.' are not periods ex) pill.rowIdNumber */
String selectQuery = "SELECT * FROM " +
ALARM_TABLE + " alarm, " +
PILL_TABLE + " pill, " +
PILL_ALARM_LINKS + " pillAlarm WHERE " +
"pill." + KEY_PILLNAME + " = '" + pillName + "'" +
" AND pill." + KEY_ROWID + " = " +
"pillAlarm." + KEY_PILLTABLE_ID +
" AND alarm." + KEY_ROWID + " = " +
"pillAlarm." + KEY_ALARMTABLE_ID;
SQLiteDatabase db = this.getReadableDatabase();
Cursor c = db.rawQuery(selectQuery, null);
if (c.moveToFirst()) {
do {
MedicineAlarm al = new MedicineAlarm();
al.setId(c.getInt(c.getColumnIndex(KEY_ROWID)));
al.setHour(c.getInt(c.getColumnIndex(KEY_HOUR)));
al.setMinute(c.getInt(c.getColumnIndex(KEY_MINUTE)));
al.setPillName(c.getString(c.getColumnIndex(KEY_ALARMS_PILL_NAME)));
al.setDoseQuantity(c.getString(c.getColumnIndex(KEY_DOSE_QUANTITY)));
al.setDoseUnit(c.getString(c.getColumnIndex(KEY_DOSE_UNITS)));
al.setDateString(c.getString(c.getColumnIndex(KEY_DATE_STRING)));
al.setAlarmId(c.getInt(c.getColumnIndex(KEY_ALARM_ID)));
alarmsByPill.add(al);
} while (c.moveToNext());
}
c.close();
return alarmsByPill;
}
/**
* returns all individual alarms that occur on a certain day of the week,
* alarms returned do not know of their counterparts that occur on different days
*
* @param day an integer that represents the day of week
* @return a list of Alarms (not combined into full-model-alarms)
*/
public List<MedicineAlarm> getAlarmsByDay(int day) {
List<MedicineAlarm> daysAlarms = new ArrayList<>();
String selectQuery = "SELECT * FROM " +
ALARM_TABLE + " alarm WHERE " +
"alarm." + KEY_DAY_WEEK +
" = '" + day + "'";
SQLiteDatabase db = getReadableDatabase();
Cursor c = db.rawQuery(selectQuery, null);
if (c.moveToFirst()) {
do {
MedicineAlarm al = new MedicineAlarm();
al.setId(c.getInt(c.getColumnIndex(KEY_ROWID)));
al.setHour(c.getInt(c.getColumnIndex(KEY_HOUR)));
al.setMinute(c.getInt(c.getColumnIndex(KEY_MINUTE)));
al.setPillName(c.getString(c.getColumnIndex(KEY_ALARMS_PILL_NAME)));
al.setDoseQuantity(c.getString(c.getColumnIndex(KEY_DOSE_QUANTITY)));
al.setDoseUnit(c.getString(c.getColumnIndex(KEY_DOSE_UNITS)));
al.setDateString(c.getString(c.getColumnIndex(KEY_DATE_STRING)));
al.setAlarmId(c.getInt(c.getColumnIndex(KEY_ALARM_ID)));
daysAlarms.add(al);
} while (c.moveToNext());
}
c.close();
return daysAlarms;
}
/**
* @param alarm_id
* @return
* @throws URISyntaxException
*/
public MedicineAlarm getAlarmById(long alarm_id) throws URISyntaxException {
String dbAlarm = "SELECT * FROM " +
ALARM_TABLE + " WHERE " +
KEY_ROWID + " = " + alarm_id;
SQLiteDatabase db = getReadableDatabase();
Cursor c = db.rawQuery(dbAlarm, null);
if (c != null)
c.moveToFirst();
MedicineAlarm al = new MedicineAlarm();
al.setId(c.getInt(c.getColumnIndex(KEY_ROWID)));
al.setHour(c.getInt(c.getColumnIndex(KEY_HOUR)));
al.setMinute(c.getInt(c.getColumnIndex(KEY_MINUTE)));
al.setPillName(c.getString(c.getColumnIndex(KEY_ALARMS_PILL_NAME)));
al.setDoseQuantity(c.getString(c.getColumnIndex(KEY_DOSE_QUANTITY)));
al.setDoseUnit(c.getString(c.getColumnIndex(KEY_DOSE_UNITS)));
al.setDateString(c.getString(c.getColumnIndex(KEY_DATE_STRING)));
al.setAlarmId(c.getInt(c.getColumnIndex(KEY_ALARM_ID)));
c.close();
return al;
}
/**
* Private helper function that combines rows in the databse back into a
* full model-alarm with a dayOfWeek array.
*
* @param dbAlarms a list of dbAlarms (not-full-alarms w/out day of week info)
* @return a list of model-alarms
* @throws URISyntaxException
*/
private List<MedicineAlarm> combineAlarms(List<MedicineAlarm> dbAlarms) throws URISyntaxException {
List<String> timesOfDay = new ArrayList<>();
List<MedicineAlarm> combinedAlarms = new ArrayList<>();
for (MedicineAlarm al : dbAlarms) {
if (timesOfDay.contains(al.getStringTime())) {
/** Add this db row to alarm object */
for (MedicineAlarm ala : combinedAlarms) {
if (ala.getStringTime().equals(al.getStringTime())) {
int day = getDayOfWeek(al.getId());
boolean[] days = ala.getDayOfWeek();
days[day - 1] = true;
ala.setDayOfWeek(days);
ala.addId(al.getId());
}
}
} else {
/** Create new Alarm object with day of week array */
MedicineAlarm newAlarm = new MedicineAlarm();
boolean[] days = new boolean[7];
newAlarm.setPillName(al.getPillName());
newAlarm.setMinute(al.getMinute());
newAlarm.setHour(al.getHour());
newAlarm.addId(al.getId());
newAlarm.setDateString(al.getDateString());
newAlarm.setAlarmId(al.getAlarmId());
int day = getDayOfWeek(al.getId());
days[day - 1] = true;
newAlarm.setDayOfWeek(days);
timesOfDay.add(al.getStringTime());
combinedAlarms.add(newAlarm);
}
}
Collections.sort(combinedAlarms);
return combinedAlarms;
}
/**
* Get a single pillapp.Model-Alarm
* Used as a helper function
*/
public int getDayOfWeek(long alarm_id) throws URISyntaxException {
SQLiteDatabase db = this.getReadableDatabase();
String dbAlarm = "SELECT * FROM " +
ALARM_TABLE + " WHERE " +
KEY_ROWID + " = " + alarm_id;
Cursor c = db.rawQuery(dbAlarm, null);
if (c != null)
c.moveToFirst();
int dayOfWeek = c.getInt(c.getColumnIndex(KEY_DAY_WEEK));
c.close();
return dayOfWeek;
}
/**
* allows pillBox to retrieve from History table
*
* @return a list of all history objects
*/
public List<History> getHistory() {
List<History> allHistory = new ArrayList<>();
String dbHist = "SELECT * FROM " + HISTORIES_TABLE;
SQLiteDatabase db = getReadableDatabase();
Cursor c = db.rawQuery(dbHist, null);
if (c.moveToFirst()) {
do {
History h = new History();
h.setPillName(c.getString(c.getColumnIndex(KEY_PILLNAME)));
h.setDateString(c.getString(c.getColumnIndex(KEY_DATE_STRING)));
h.setHourTaken(c.getInt(c.getColumnIndex(KEY_HOUR)));
h.setMinuteTaken(c.getInt(c.getColumnIndex(KEY_MINUTE)));
h.setDoseQuantity(c.getString(c.getColumnIndex(KEY_DOSE_QUANTITY)));
h.setDoseUnit(c.getString(c.getColumnIndex(KEY_DOSE_UNITS)));
h.setAction(c.getInt(c.getColumnIndex(KEY_ACTION)));
h.setAlarmId(c.getInt(c.getColumnIndex(KEY_ALARM_ID)));
allHistory.add(h);
} while (c.moveToNext());
}
c.close();
return allHistory;
}
// ############################### delete methods##################################### //
private void deletePillAlarmLinks(long alarmId) {
SQLiteDatabase db = this.getWritableDatabase();
db.delete(PILL_ALARM_LINKS, KEY_ALARMTABLE_ID
+ " = ?", new String[]{String.valueOf(alarmId)});
}
public void deleteAlarm(long alarmId) {
SQLiteDatabase db = this.getWritableDatabase();
/** First delete any link in PillAlarmLink Table */
deletePillAlarmLinks(alarmId);
/* Then delete alarm */
db.delete(ALARM_TABLE, KEY_ROWID
+ " = ?", new String[]{String.valueOf(alarmId)});
}
public void deletePill(String pillName) throws URISyntaxException {
SQLiteDatabase db = this.getWritableDatabase();
List<MedicineAlarm> pillsAlarms;
/** First get all Alarms and delete them and their Pill-links */
pillsAlarms = getAllAlarmsByPill(pillName);
for (MedicineAlarm alarm : pillsAlarms) {
long id = alarm.getId();
deleteAlarm(id);
}
/** Then delete Pill */
db.delete(PILL_TABLE, KEY_PILLNAME
+ " = ?", new String[]{pillName});
}
}
i need to insert the value of text view into my database table_pill alarm in the column of frag.
Andrei is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.