added default string response to api template [android-volley]

This commit is contained in:
Shyri Villar 2015-11-05 07:56:19 +01:00
parent e098e8f372
commit f3ff567d3f

View File

@ -105,7 +105,12 @@ public class {{classname}} {
@Override
public void onResponse(String response) {
try {
responseListener.onResponse({{returnType}}) ApiInvoker.deserialize(response, "array", Phone.class));
{{#returnType}}
responseListener.onResponse(({{{returnType}}}) ApiInvoker.deserialize(response, "array", {{returnBaseType}}.class));
{{/returnType}}
{{^returnType}}
responseListener.onResponse(response);
{{/returnType}}
} catch (ApiException exception) {
//TODO onError
Log.d("ERROR", "error");