• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps increasing speed of app in weak internet connection

Hi All,

I am new to this forum.

We have launched our app yesterday. when i access it in normal signal(mobile), my app works fast. However when the mobile signal is weak, my app works slow and sometimes requests are getting time out because of this issue.

I have a big virtual server( 8 core CPU and 16 GB RAM).

Is there a way to increase the speed of my app when the internet connection is weak?

Thanks,
Hasnu
 
Welcome to the forum :)

You'll get your best answer to development questions in our Application Development forum, as described (and linked) in the sticky post at the top of the Android Questions forum: http://androidforums.com/threads/developers-please-read-this-before-posting-in-here.904569/. I'll move the thread over there.

However, you'll probably have to give a bit more information than you have here, e.g. what the app is actually doing (remember that the reader knows nothing beyond what you write). I'm inferring from what you've written that your app is spending much of its time exchanging information with your server, and you probably can't do anything about the device's internet connection becoming slow/intermittent if the signal becomes weak. How the app handles timeouts is something that you can control. But as I say, I'm limited to guessing based on the little information you have provided (and am not a developer).
 
Thanks Hadron. its a food based app. It will show available restaurants in the vicinity. I have 2 calls. My first call will get all the restaurants available. My second call will get the food menus of selected restaurant.

Please let me know how to handle the time out.

I am using volly coding for webservices.

public void registerUser(final String requestType, String username,
String email, String phone, String password,
final ACBConnectionManager callback) {
// TODO Auto-generated method stub

String[] parameterHeader = new String[4];
parameterHeader[0] = "name";
parameterHeader[1] = "email";
parameterHeader[2] = "phone";
parameterHeader[3] = "password";

String[] parameterValue = new String[4];
parameterValue[0] = username;
parameterValue[1] = email;
parameterValue[2] = phone;
parameterValue[3] = password;

String registrationurl = RequestTypes.BASE_URL_REGISTRATION
+ Utility.joinURLParametersArrayWithHeaders(parameterHeader,
parameterValue);

Log.i("registrationurl", registrationurl);

JsonObjectRequest jsonObjReqforRegister = new JsonObjectRequest(
Method.GET, registrationurl, null,
new Response.Listener<JSONObject>() {

@override
public void onResponse(JSONObject response) {
Log.d(TAG, response.toString());

try {

String statusString = response.getString("status");
if (statusString.equals("success")) {

String message = response.getString("message");

callback.onSuccess(message, null, requestType);
} else {
String message = response.getString("message");
callback.onFailure(message, null, requestType);
}

} catch (JSONException e) {
callback.onFailure(Constants.SERVER_ERROR, null,
requestType);
}

}
}, new Response.ErrorListener() {

@override
public void onErrorResponse(VolleyError error) {
VolleyLog.d(TAG, "Error: " + error.getMessage());
callback.onFailure(Constants.SERVER_ERROR, null,
requestType);
}
});

// Adding request to request queue
AppController.getInstance().addToRequestQueue(jsonObjReqforRegister);

}
---------------------------------------

Please let me know how to increase timeout for my call

Thanks,
Hasnu
 
Back
Top Bottom