I have list of numbers like this:
-153
-542
-153
-153
-783
-785
-975
-153
-478
as you see "153" is showen 4 times but i want to show this number one time only like this:
-153
-542
-783
-785
-975
-478
EDIT:
i need to get all messages numbers but show only one if similar numbers here is my method:
    public static List<SMSData> getAllNumbers(Context context){
    List<SMSData> smsList = new ArrayList<SMSData>();
    Uri uri = Uri.parse("content://sms/inbox");
    Cursor c= context.getContentResolver().query(uri, null,null,null,null);
    // Read the sms data and store it in the list
    if(c.moveToFirst()) {
        for(int i=0; i < c.getCount(); i++) {
            SMSData sms = new SMSData();
            sms.setBody(c.getString(c.getColumnIndexOrThrow("body")).toString());
            sms.setNumber(c.getString(c.getColumnIndexOrThrow("address")).toString());
            sms.setDate(c.getString(c.getColumnIndexOrThrow("date")).toString());
            smsList.add(sms);
            c.moveToNext();
        }
    }
    return smsList;
}
i fond the solution:
https://stackoverflow.com/a/19305534/3522182
tnx all.
 
     
    