Code example for SmsMessage

Methods: getTimestampMillis, hashCode

0
    } 
     
    public String getAndroidUID(Context context, String body) {
    	 
    	if(msgObj != null) {
    		return Integer.toString(msgObj.hashCode()) + "-" + msgObj.getTimestampMillis();
    	} 
    	else { 
    		if(this.android_uid != null)
    			return android_uid;
    		else 
    			return Integer.toString(msgId_phoneDB) + "-" + System.currentTimeMillis();
    	} 
    } 
     
    public String getType() {
    	if(msgObj != null)
    		return "0"; // inbound messages only 
    	else 
    		return type; // composing a new message and sending it from phone or an acknowledgement
    }