Click here to Skip to main content
15,922,309 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
I am beginner and have made SMS application using Android Studio, infect it sends SMS on a loop of contacts (200 contacts). For mentioned purpose I have used a button and a method named sendSMS which have a loop of 200 and send SMS followed by one second sleep. As for as the mentioned procedure is concern my application works fine.

But, I am also trying to set the contact name in an edittext in sendSMS method. When I press command button to call the method sendSMS my application behave like busy and don't update the edit text filed and at the end all of sudden it displays the last contact name in edit text filed followed by the customized message
Posted
Comments
Afzaal Ahmad Zeeshan 25-Oct-15 15:42pm    
Last contact means that it does loop through each and every contact name but process stops once it goes throw the last one.

What is it that you want? Do you want to get the contact number in the SMS text for each message?
Member 12040968 26-Oct-15 2:02am    
Yes Afzal, I want my application to be refreshed (in vb doevents, in oracle synchronize) after sending each sms of the loop to show whom sms was sent and where is my counter at the moment. Do you want me to post the code here?
Krunal Rohit 26-Oct-15 0:44am    
Use AsyncTask, as such your application getting busy for sometime.

-KR
Member 12040968 26-Oct-15 2:04am    
I want my application to be refreshed (in vb doevents, in oracle synchronize) after sending each sms of the loop to show whom sms was sent and where is my counter at the moment. Will asyncTask do the same for me? Do you want me to post the code here?
Member 12040968 28-Oct-15 0:35am    
Thank you Krunal, your suggestion worked for me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900