Back to project page openhds-tablet.
The source code is released under:
OPENHDS PLATFORM OPENSOURCE LICENSE AGREEMENT Copyright (c) 2013 University of Southern Maine. All rights reserved. Redistribution and use in source and binary forms, with or without mo...
If you think the Android project openhds-tablet listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.openhds.mobile.task; /* w ww . jav a 2s.co m*/ import org.apache.http.HttpResponse; import org.openhds.mobile.database.DatabaseAdapter; import org.openhds.mobile.model.Supervisor; /** * Task to initially authenticate a user when they first use the application */ public class AuthenticateTask extends AbstractHttpTask<Void, Void> { private DatabaseAdapter store; public AuthenticateTask(AbstractHttpTask.RequestContext requestCtx, TaskListener listener, DatabaseAdapter store) { super(requestCtx, listener); this.store = store; } @Override protected EndResult handleResponseData(HttpResponse response) { Supervisor user = new Supervisor(); user.setName(requestCtx.user); user.setPassword(requestCtx.password); store.addSupervisor(user); return EndResult.SUCCESS; } }