/*
         * Fill list with message data from user Inbox.
         * */
        public static void Fill_With_Inbox_Data(Activity context,ListView listView)
        {
            Pay_SMS_Main psm=new Pay_SMS_Main();

                update_inbox_messages = true;
                List<String> items=new List<String>();
                bool valid_body_check=false;
                String smsFilteredBody="";
                String[] smsTimePaying= new string[5];

                String[] projection = new String[]{ "address", "body","date" };
                CursorLoader loader=new CursorLoader(context);
                try{
                    //slaže podatke obrnutim redom,tj od najstarijeg do najmlađeg tako da kad dodajem novi podatak na kraj da bude poredano
                    loader = new CursorLoader( context,Android.Net.Uri.Parse ("content://sms/inbox"), projection, null, null, null);
                }catch(Exception e){
                    Log.Debug ("Problem kod loadera",e.ToString ());
                }
                ICursor  cursor =  (ICursor)loader.LoadInBackground ();

                if (cursor.MoveToFirst ()) { // must check the result to prevent exception
                    do {
                        try {
                            //Ako je broj iz datoteke Zone_Numbers_Assets, odnosno ako je broj iz raspona dozvoljenih
                            if (psm.CheckSMSNumbers(cursor.GetString (cursor.GetColumnIndexOrThrow (projection [0]))))
                            {
                                String smsSender = cursor.GetString (cursor.GetColumnIndexOrThrow (projection [0]));
                                String smsBody = cursor.GetString (cursor.GetColumnIndexOrThrow (projection [1]));
                                String smsTime = cursor.GetString (cursor.GetColumnIndexOrThrow (projection [2]));
                                long smsTimeLong=long.Parse (smsTime);
                                String smsDate=psm.ConvertDateFromMillseconds (smsTimeLong);
                                smsTime=psm.ConvertTimeFromMillseconds (smsTimeLong);

                            try{
                                var tuple=ParseSMS.ParseSMSbody (smsBody);
                                valid_body_check = tuple.Item1; //bool true or false
                                smsFilteredBody = tuple.Item2; // car registration
                                smsTimePaying=tuple.Item3.Split ('.');// car_time
                            }catch(Exception e){
                                Log.Debug ("Greska prilikom filtriranja sms poruke.",e.ToString ());
                            }
                            //check if sms body pass validation
                            if(valid_body_check){
                                String msgData = psm.MessageDisplay (smsSender, smsFilteredBody,smsTime,smsTimePaying[0],smsDate);
                                items.Add (msgData);
                            }

                            }
                        } catch (Exception e) {
                            Log.Debug ("UCITAVANJE SMS-a u Pay_SMS_Main", e.ToString ());
                        }
                    } while (cursor.MoveToNext ());
                } else { // empty box, no SMS
                    cursor.Close ();
                }
                //okrecem podatke u descending nacin,tako da je najnoviji podatak na pocetku
                items.Reverse ();
                DeleteHistory ();
                using(StreamWriter writer = new StreamWriter(message_Data)){

                    foreach(String data in items ){
                        writer.Write (data+"\n");
                    };
                }

                try{
                    FillListWithData(items,context,listView);
                }catch(NullReferenceException e){
                    Log.Debug ("FillListWithData:U ucitavanju inboxa",	e.ToString ());
                    }

                Enable_message_update=false;
        }