Android : Android manage app if Not Responsing from server

on Sunday, September 14, 2014


im my Application i'm using networking and my problem is if fetch from server not Responsing or delay is long my app alert me to App Not Responsing, are you sure to Force close or waiting. i want to manage that to 10 second if if fetch from server not Responsing alert to user wait and disable Android force close & wait. Thanks


My simple code to connect server for fetch data is :



public void getReceivedSMS(long start, long count) {

/* Connect to Server*/
tsms = new TSMS(context, new User(this.username, this.password));

try {

/* Fetch From connected Server */
rows = tsms.getReceivedSMS(start, count);

saveRowsintoDatabase(rows);

} catch (TException e) {

e.printStackTrace();

}
}

0 comments:

Post a Comment