use of com.moez.QKSMS.mmssms.Transaction in project qksms by moezbhatti.
the class RemoteMessagingReceiver method onReceive.
@Override
public void onReceive(Context context, Intent intent) {
Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
Bundle bundle = intent.getExtras();
if (remoteInput != null && bundle != null) {
if (intent.getAction().equals(ACTION_REPLY)) {
Message message = new Message(remoteInput.getCharSequence(EXTRA_VOICE_REPLY).toString(), new String[] { bundle.getString(EXTRA_ADDRESS) });
Transaction sendTransaction = new Transaction(context, SmsHelper.getSendSettings(context));
sendTransaction.sendNewMessage(message, bundle.getLong(EXTRA_THREAD_ID));
Intent i = new Intent(context, MarkReadService.class);
i.putExtra(EXTRA_THREAD_ID, bundle.getLong(EXTRA_THREAD_ID));
context.startService(i);
}
}
}
use of com.moez.QKSMS.mmssms.Transaction in project qksms by moezbhatti.
the class AirplaneModeReceiver method sendSms.
private void sendSms(Context context, MessageItem messageItem) {
Transaction sendTransaction = new Transaction(context, SmsHelper.getSendSettings(context));
Message message = new Message(messageItem.mBody, messageItem.mAddress);
message.setType(Message.TYPE_SMSMMS);
context.getContentResolver().delete(messageItem.mMessageUri, null, null);
sendTransaction.sendNewMessage(message, 0);
}
Aggregations