Title: How to set the message ID and time stamp for incoming messages
Tags: android;sms
Question: I am  developing an app that receive sms and I want to know how to 
set message ID and timestamp for incoming messages.



Here is another answer: Are you sure that you want to 'set' the message ID and timestamp, do you mean that you want to read them as they are received by the phone? I doubt that you will be able to set these values manually

Comment for this answer: actually  i want to keep track  of massages that i have already  read ,so i waz thinking of massage id and time stamp

Here is another answer: I'm guessing you're using an SmsMessage object. This object does not allow you to set any ID or timestamp, but you can retrieve the timestamp with getTimeStampMillis(), and there doesn't seem be any ID's in this class. If you want to be able to have and manipulate these values you probably need to write your own Sms-class.

Comment for this answer: @MkhululiKhustaricoBuzwa You don't need to set any values for that. Just retrieve. Or am I misunderstanding something? getStatusOnIcc() can give you read/unread status. If you need to have a list of read messages, then maybe create a list of these objects/some id you've made
Comment for this answer: actualy i want to  keep  track  of massages that have   being already  read thats why i was thinikng of massage id and time stamp

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2012:00:04/16/12', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<android><sms>', 'Title': 'How to set the message ID and time stamp for incoming messages', 'ViewCount': 746, 'id': 10174340, 'user_AboutMe': None, 'user_AccountId': 1361102.0, 'user_DisplayName': 'Mkhululi Khustarico Buzwa', 'user_Reputation': 1.0, 'user_Views': 9.0, 'user_id': 1298469.0}}