Created
October 29, 2012 13:43
-
-
Save dpenic/3973631 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void callDownloadOptionsAndPackagesData() { | |
ServiceInfoSource source = Sources.getServiceInfoSource(getActivity()); | |
ServiceInfoParams params = new ServiceInfoParams(); | |
params.setMsisdn(CurrentUser.getInstance(getActivity()).getMSISDN()); | |
//Ovo ovisno o tome je li "normalan" ili "hibridni" mozda | |
params.setServiceId(48); | |
source.setParams(params); | |
source.fetchAsync(new LoadListener() { | |
@Override | |
public void onError(ArrayList<Error> errors) { | |
loadingLayout.setVisibility(View.GONE); | |
} | |
@Override | |
public void beforeLoad() { | |
// TODO Auto-generated method stub | |
} | |
@Override | |
public void afterLoad(DataContainer container) { | |
ServiceInfo info = (ServiceInfo)container; | |
Store<ServiceParams> params = info.getParams(); | |
for (int i = 0; i < params.size(); i++) { | |
ServiceParams param = params.get(i); | |
if (param.getName().equals(STATUS)) { | |
status = param; | |
} else if (param.getName().equals(CMD_STATUS)) { | |
cmdStatus = param; | |
} else if (param.getName().equals(UPDATE_ALLOWED)) { | |
updateAllowed = param; | |
} else if (param.getName().startsWith(MOBILE_SURF)) { | |
mobileSurfPacketList.add(param); | |
} | |
} | |
showData(); | |
loadingLayout.setVisibility(View.GONE); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment