Search in sources :

Example 1 with ConversationLegacy

use of com.moez.QKSMS.data.ConversationLegacy in project qksms by moezbhatti.

the class MarkReadService method onHandleIntent.

@Override
protected void onHandleIntent(Intent intent) {
    Bundle extras = intent.getExtras();
    long threadId = extras.getLong("thread_id");
    ConversationLegacy conversation = new ConversationLegacy(this, threadId);
    conversation.markRead();
}
Also used : ConversationLegacy(com.moez.QKSMS.data.ConversationLegacy) Bundle(android.os.Bundle)

Example 2 with ConversationLegacy

use of com.moez.QKSMS.data.ConversationLegacy in project qksms by moezbhatti.

the class PushbulletService method onMessageReceived.

@Override
protected void onMessageReceived(String conversationIden, String body) {
    long threadId = Long.parseLong(conversationIden);
    ConversationLegacy conversation = new ConversationLegacy(getApplicationContext(), threadId);
    Transaction sendTransaction = new Transaction(getApplicationContext(), SmsHelper.getSendSettings(getApplicationContext()));
    Message message = new com.moez.QKSMS.mmssms.Message(body, conversation.getAddress());
    message.setType(com.moez.QKSMS.mmssms.Message.TYPE_SMSMMS);
    sendTransaction.sendNewMessage(message, conversation.getThreadId());
    QKReplyActivity.dismiss(conversation.getThreadId());
    NotificationManager.update(getApplicationContext());
}
Also used : ConversationLegacy(com.moez.QKSMS.data.ConversationLegacy) Transaction(com.moez.QKSMS.mmssms.Transaction) Message(com.moez.QKSMS.mmssms.Message)

Example 3 with ConversationLegacy

use of com.moez.QKSMS.data.ConversationLegacy in project qksms by moezbhatti.

the class PushbulletService method onConversationDismissed.

@Override
protected void onConversationDismissed(String conversationIden) {
    long threadId = Long.parseLong(conversationIden);
    ConversationLegacy conversation = new ConversationLegacy(getApplicationContext(), threadId);
    conversation.markRead();
}
Also used : ConversationLegacy(com.moez.QKSMS.data.ConversationLegacy)

Example 4 with ConversationLegacy

use of com.moez.QKSMS.data.ConversationLegacy in project qksms by moezbhatti.

the class EndlessJabber method UpdateReadMessages.

@Override
public void UpdateReadMessages(Context context, long time, int threadId) {
    Log.d(TAG, "UpdateReadMessages");
    new ConversationLegacy(context, threadId).markRead();
}
Also used : ConversationLegacy(com.moez.QKSMS.data.ConversationLegacy)

Example 5 with ConversationLegacy

use of com.moez.QKSMS.data.ConversationLegacy in project qksms by moezbhatti.

the class EndlessJabber method DeleteThread.

@Override
public void DeleteThread(Context context, int threadId) {
    Log.d(TAG, "DeleteThread");
    new ConversationLegacy(context, threadId).delete();
}
Also used : ConversationLegacy(com.moez.QKSMS.data.ConversationLegacy)

Aggregations

ConversationLegacy (com.moez.QKSMS.data.ConversationLegacy)9 Bundle (android.os.Bundle)2 ContentValues (android.content.ContentValues)1 Drawable (android.graphics.drawable.Drawable)1 Uri (android.net.Uri)1 ConversationPrefsHelper (com.moez.QKSMS.common.ConversationPrefsHelper)1 Contact (com.moez.QKSMS.data.Contact)1 Message (com.moez.QKSMS.mmssms.Message)1 Transaction (com.moez.QKSMS.mmssms.Transaction)1