-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc7519a
commit 15e1928
Showing
4 changed files
with
89 additions
and
62 deletions.
There are no files selected for viewing
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
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
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
82 changes: 41 additions & 41 deletions
82
...p-brac-hnpp/src/main/java/org/smartregister/brac/hnpp/task/ConfirmIdentificationTask.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
package org.smartregister.brac.hnpp.task; | ||
|
||
import android.os.AsyncTask; | ||
import android.text.TextUtils; | ||
import android.util.Log; | ||
|
||
import org.smartregister.CoreLibrary; | ||
import org.smartregister.brac.hnpp.HnppApplication; | ||
import org.smartregister.brac.hnpp.utils.HnppConstants; | ||
import org.smartregister.simprint.SimPrintsHelper; | ||
|
||
public class ConfirmIdentificationTask extends AsyncTask<Void, Void, Void> { | ||
|
||
private String sessiodId; | ||
private String selectedGuid; | ||
|
||
public ConfirmIdentificationTask(String sessiodId, String selectedGuid) { | ||
this.sessiodId = sessiodId; | ||
this.selectedGuid = selectedGuid; | ||
} | ||
|
||
@Override | ||
protected Void doInBackground(Void... voids) { | ||
confirmSelectedGuid(sessiodId, selectedGuid); | ||
return null; | ||
} | ||
|
||
|
||
private void confirmSelectedGuid(String sessionid, String simPrintsGuid) { | ||
Log.v("SIMPRINTS_IDENTITY","projectId:"+HnppConstants.getSimPrintsProjectId()+":userId:"+CoreLibrary.getInstance().context().allSharedPreferences().fetchRegisteredANM()); | ||
SimPrintsHelper simPrintsHelper = new SimPrintsHelper(HnppConstants.getSimPrintsProjectId(), CoreLibrary.getInstance().context().allSharedPreferences().fetchRegisteredANM()); | ||
if (TextUtils.isEmpty(simPrintsGuid)) { | ||
Log.v("SIMPRINTS_IDENTITY","confirmSelectedGuid>>"+sessiodId); | ||
simPrintsHelper.confirmIdentity(HnppApplication.getHNPPInstance().getApplicationContext(), sessionid, "none_selected"); | ||
|
||
} else { | ||
Log.v("SIMPRINTS_IDENTITY","sessionId:"+sessiodId+":guId"+simPrintsGuid+":appcontext:"+HnppApplication.getHNPPInstance().getApplicationContext()); | ||
simPrintsHelper.confirmIdentity(HnppApplication.getHNPPInstance().getApplicationContext(), sessionid, simPrintsGuid); | ||
} | ||
} | ||
} | ||
//package org.smartregister.brac.hnpp.task; | ||
// | ||
//import android.os.AsyncTask; | ||
//import android.text.TextUtils; | ||
//import android.util.Log; | ||
// | ||
//import org.smartregister.CoreLibrary; | ||
//import org.smartregister.brac.hnpp.HnppApplication; | ||
//import org.smartregister.brac.hnpp.utils.HnppConstants; | ||
//import org.smartregister.simprint.SimPrintsHelper; | ||
// | ||
//public class ConfirmIdentificationTask extends AsyncTask<Void, Void, Void> { | ||
// | ||
// private String sessiodId; | ||
// private String selectedGuid; | ||
// | ||
// public ConfirmIdentificationTask(String sessiodId, String selectedGuid) { | ||
// this.sessiodId = sessiodId; | ||
// this.selectedGuid = selectedGuid; | ||
// } | ||
// | ||
// @Override | ||
// protected Void doInBackground(Void... voids) { | ||
// confirmSelectedGuid(sessiodId, selectedGuid); | ||
// return null; | ||
// } | ||
// | ||
// | ||
// private void confirmSelectedGuid(String sessionid, String simPrintsGuid) { | ||
// Log.v("SIMPRINTS_IDENTITY","projectId:"+HnppConstants.getSimPrintsProjectId()+":userId:"+CoreLibrary.getInstance().context().allSharedPreferences().fetchRegisteredANM()); | ||
// SimPrintsHelper simPrintsHelper = new SimPrintsHelper(HnppConstants.getSimPrintsProjectId(), CoreLibrary.getInstance().context().allSharedPreferences().fetchRegisteredANM()); | ||
// if (TextUtils.isEmpty(simPrintsGuid)) { | ||
// Log.v("SIMPRINTS_IDENTITY","confirmSelectedGuid>>"+sessiodId); | ||
// simPrintsHelper.confirmIdentity(HnppApplication.getHNPPInstance().getApplicationContext(), sessionid, "none_selected"); | ||
// | ||
// } else { | ||
// Log.v("SIMPRINTS_IDENTITY","sessionId:"+sessiodId+":guId"+simPrintsGuid+":appcontext:"+HnppApplication.getHNPPInstance().getApplicationContext()); | ||
// simPrintsHelper.confirmIdentity(HnppApplication.getHNPPInstance().getApplicationContext(), sessionid, simPrintsGuid); | ||
// } | ||
// } | ||
//} |