本文整理汇总了Java中android.telephony.SmsMessage.getPseudoSubject方法的典型用法代码示例。如果您正苦于以下问题:Java SmsMessage.getPseudoSubject方法的具体用法?Java SmsMessage.getPseudoSubject怎么用?Java SmsMessage.getPseudoSubject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.telephony.SmsMessage
的用法示例。
在下文中一共展示了SmsMessage.getPseudoSubject方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: IncomingTextMessage
import android.telephony.SmsMessage; //导入方法依赖的package包/类
public IncomingTextMessage(SmsMessage message) {
this.message = message.getDisplayMessageBody();
this.sender = message.getDisplayOriginatingAddress();
this.senderDeviceId = TextSecureAddress.DEFAULT_DEVICE_ID;
this.protocol = message.getProtocolIdentifier();
this.serviceCenterAddress = message.getServiceCenterAddress();
this.replyPathPresent = message.isReplyPathPresent();
this.pseudoSubject = message.getPseudoSubject();
this.sentTimestampMillis = message.getTimestampMillis();
this.groupId = null;
this.push = false;
}
示例2: IncomingTextMessage
import android.telephony.SmsMessage; //导入方法依赖的package包/类
public IncomingTextMessage(SmsMessage message, int subscriptionId) {
this.message = message.getDisplayMessageBody();
this.sender = message.getDisplayOriginatingAddress();
this.senderDeviceId = SignalServiceAddress.DEFAULT_DEVICE_ID;
this.protocol = message.getProtocolIdentifier();
this.serviceCenterAddress = message.getServiceCenterAddress();
this.replyPathPresent = message.isReplyPathPresent();
this.pseudoSubject = message.getPseudoSubject();
this.sentTimestampMillis = message.getTimestampMillis();
this.subscriptionId = subscriptionId;
this.expiresInMillis = 0;
this.groupId = null;
this.push = false;
}
示例3: extractMessageData
import android.telephony.SmsMessage; //导入方法依赖的package包/类
@Nullable
private Map<String, String> extractMessageData(Context context,
Intent intent, long timeReceive) {
// get messages
SmsMessage[] messages = getSMSMessages(intent);
if (messages == null || messages.length == 0) {
Log.w(TAG, "Received message is null or empty");
return null;
}
// Assume that all messages in array received at ones have the same data except of bodies.
// So get just the first message to get the rest data.
SmsMessage message = messages[0];
if (message == null) {
Log.w(TAG, "Received message is null");
return null;
}
String number = message.getOriginatingAddress();
Map<String, String> data = new HashMap<>();
data.put(ContactsAccessHelper.BODY, getSMSMessageBody(context, messages));
data.put(ContactsAccessHelper.ADDRESS, number);
data.put(ContactsAccessHelper.DATE, String.valueOf(timeReceive));
data.put(ContactsAccessHelper.DATE_SENT, String.valueOf(message.getTimestampMillis()));
data.put(ContactsAccessHelper.PROTOCOL, String.valueOf(message.getProtocolIdentifier()));
data.put(ContactsAccessHelper.REPLY_PATH_PRESENT, String.valueOf(message.isReplyPathPresent()));
data.put(ContactsAccessHelper.SERVICE_CENTER, message.getServiceCenterAddress());
String subject = message.getPseudoSubject();
subject = (subject != null && !subject.isEmpty() ? subject : null);
data.put(ContactsAccessHelper.SUBJECT, subject);
return data;
}
示例4: IncomingTextMessage
import android.telephony.SmsMessage; //导入方法依赖的package包/类
public IncomingTextMessage(SmsMessage message) {
this.message = message.getDisplayMessageBody();
this.sender = message.getDisplayOriginatingAddress();
this.senderDeviceId = PushAddress.DEFAULT_DEVICE_ID;
this.protocol = message.getProtocolIdentifier();
this.serviceCenterAddress = message.getServiceCenterAddress();
this.replyPathPresent = message.isReplyPathPresent();
this.pseudoSubject = message.getPseudoSubject();
this.sentTimestampMillis = message.getTimestampMillis();
this.groupId = null;
this.push = false;
}
示例5: IncomingTextMessage
import android.telephony.SmsMessage; //导入方法依赖的package包/类
public IncomingTextMessage(SmsMessage message, int subscriptionId, boolean receivedWhenLocked) {
this.message = message.getDisplayMessageBody();
this.sender = message.getDisplayOriginatingAddress();
this.senderDeviceId = 1;
this.protocol = message.getProtocolIdentifier();
this.serviceCenterAddress = message.getServiceCenterAddress();
this.replyPathPresent = message.isReplyPathPresent();
this.pseudoSubject = message.getPseudoSubject();
this.sentTimestampMillis = message.getTimestampMillis();
this.subscriptionId = subscriptionId;
this.groupId = null;
this.push = false;
this.receivedWhenLocked = receivedWhenLocked;
}
示例6: IncomingTextMessage
import android.telephony.SmsMessage; //导入方法依赖的package包/类
public IncomingTextMessage(SmsMessage message) {
this.message = message.getDisplayMessageBody();
this.sender = message.getDisplayOriginatingAddress();
this.senderDeviceId = RecipientDevice.DEFAULT_DEVICE_ID;
this.protocol = message.getProtocolIdentifier();
this.serviceCenterAddress = message.getServiceCenterAddress();
this.replyPathPresent = message.isReplyPathPresent();
this.pseudoSubject = message.getPseudoSubject();
this.sentTimestampMillis = message.getTimestampMillis();
this.groupId = null;
this.push = false;
}