use of dev.sagar.smsblocker.tech.beans.SMS in project SMSBlocker by sagarpawardev.
the class SilentSMSSenderActivity method process.
private void process() {
final String methodName = "process()";
log.justEntered(methodName);
SMS sms = gSMSUtil.sendSMS(gAddress, gMessage);
Toast.makeText(this, "SMS Sent", Toast.LENGTH_SHORT).show();
log.returning(methodName);
}
use of dev.sagar.smsblocker.tech.beans.SMS in project SMSBlocker by sagarpawardev.
the class ThreadActivity method sendMsg.
private SMS sendMsg() {
final String methodName = "sendMsg()";
log.justEntered(methodName);
String msg = etMsg.getText().toString().trim();
String phoneNo = address;
SMS newSMS = smsUtil.sendSMS(phoneNo, msg);
log.returning(methodName);
return newSMS;
}
use of dev.sagar.smsblocker.tech.beans.SMS in project SMSBlocker by sagarpawardev.
the class RVThreadAdapter method getItemViewType.
@Override
public int getItemViewType(int position) {
SMS sms = smses.get(position);
boolean smsType = (sms.getType() == SMS.TYPE_RECEIVED);
return smsType ? TYPE_SENT : TYPE_RECEIVED;
}
use of dev.sagar.smsblocker.tech.beans.SMS in project SMSBlocker by sagarpawardev.
the class RVThreadAdapter method startSelections.
public boolean startSelections() {
final String methodName = "startSelections()";
log.justEntered(methodName);
log.error(methodName, "This can be improved");
log.info(methodName, "Selected SMS count: " + selectedSMSes.size());
for (SMS sms : selectedSMSes) {
log.debug(methodName, "Starring SMS id: " + sms.getId());
// Starred SMS to database
inboxUtil.starSMS(sms);
sms.setSaved(true);
// Starred SMS to UI
int position = selectedSMSes.indexOf(sms);
notifyItemChanged(position);
}
selectedSMSes.clear();
log.returning(methodName);
return true;
}
use of dev.sagar.smsblocker.tech.beans.SMS in project SMSBlocker by sagarpawardev.
the class RVThreadAdapter method unstarSelections.
public boolean unstarSelections() {
final String methodName = "unstarSelections()";
log.justEntered(methodName);
List<SMS> unstarredSelections = new ArrayList<>();
for (int position : markedForUnstar) {
SMS sms = smses.get(position);
unstarredSelections.add(sms);
}
log.info(methodName, "Unstarring SMSes");
int count = inboxUtil.unstarSMSes(unstarredSelections);
log.info(methodName, "Requested count: " + unstarredSelections.size() + " Deleted count: " + count);
markedForUnstar.clear();
if (count > 0)
Toast.makeText(context, "SMS Unsaved", Toast.LENGTH_SHORT).show();
log.returning(methodName);
return true;
}
Aggregations