>
</activity>
+ <!-- Checkout Activities -->
+ <activity android:name=".accountAccess.ItemsCheckOutListView"></activity>
+
+
<activity android:name=".searchCatalog.RecordDetails_Info"></activity>
<activity android:name=".searchCatalog.RecordDetails_Content"></activity>
<activity android:name=".searchCatalog.RecordDetails_Details"></activity>
public static final int settings=0x7f02000a;
}
public static final class id {
- public static final int account_btn_book_bags=0x7f090003;
- public static final int account_btn_check_out=0x7f090000;
- public static final int account_btn_fines=0x7f090002;
- public static final int account_btn_holds=0x7f090001;
- public static final int chose_organisation=0x7f09001a;
- public static final int main_btn_account=0x7f090005;
- public static final int main_btn_app_settings=0x7f090006;
- public static final int main_btn_search=0x7f090004;
- public static final int record_details_info_author=0x7f090008;
- public static final int record_details_info_publisher=0x7f090009;
- public static final int record_details_info_title=0x7f090007;
- public static final int record_details_simple_author=0x7f09000b;
- public static final int record_details_simple_isbn=0x7f090010;
- public static final int record_details_simple_publisher=0x7f09000c;
- public static final int record_details_simple_series=0x7f09000e;
- public static final int record_details_simple_subject=0x7f09000d;
- public static final int record_details_simple_synopsis=0x7f09000f;
- public static final int record_details_simple_title=0x7f09000a;
- public static final int searchButton=0x7f090017;
- public static final int searchText=0x7f090016;
- public static final int search_more_items_button=0x7f090011;
- public static final int search_record_author=0x7f090014;
- public static final int search_record_img=0x7f090012;
- public static final int search_record_publishing=0x7f090015;
- public static final int search_record_title=0x7f090013;
- public static final int search_result_number=0x7f090018;
- public static final int search_results_list=0x7f090019;
+ public static final int account_btn_book_bags=0x7f090009;
+ public static final int account_btn_check_out=0x7f090006;
+ public static final int account_btn_fines=0x7f090008;
+ public static final int account_btn_holds=0x7f090007;
+ public static final int checkout_due_date=0x7f090005;
+ public static final int checkout_items_list=0x7f090001;
+ public static final int checkout_record_author=0x7f090003;
+ public static final int checkout_record_title=0x7f090002;
+ public static final int checkout_renewals_remaining=0x7f090004;
+ public static final int chose_organisation=0x7f09001f;
+ public static final int main_btn_account=0x7f09000b;
+ public static final int main_btn_app_settings=0x7f09000c;
+ public static final int main_btn_search=0x7f09000a;
+ public static final int record_details_info_author=0x7f09000e;
+ public static final int record_details_info_publisher=0x7f09000f;
+ public static final int record_details_info_title=0x7f09000d;
+ public static final int record_details_simple_author=0x7f090011;
+ public static final int record_details_simple_isbn=0x7f090016;
+ public static final int record_details_simple_publisher=0x7f090012;
+ public static final int record_details_simple_series=0x7f090014;
+ public static final int record_details_simple_subject=0x7f090013;
+ public static final int record_details_simple_synopsis=0x7f090015;
+ public static final int record_details_simple_title=0x7f090010;
+ public static final int searchButton=0x7f09001d;
+ public static final int searchText=0x7f09001c;
+ public static final int search_more_items_button=0x7f090017;
+ public static final int search_record_author=0x7f09001a;
+ public static final int search_record_img=0x7f090018;
+ public static final int search_record_publishing=0x7f09001b;
+ public static final int search_record_title=0x7f090019;
+ public static final int search_result_number=0x7f090000;
+ public static final int search_results_list=0x7f09001e;
}
public static final class layout {
- public static final int dashbord_account=0x7f030000;
- public static final int dashbord_main=0x7f030001;
- public static final int main=0x7f030002;
- public static final int record_details_info=0x7f030003;
- public static final int record_details_simple=0x7f030004;
- public static final int search_result_footer_view=0x7f030005;
- public static final int search_result_item=0x7f030006;
- public static final int search_result_list=0x7f030007;
+ public static final int checkout_list=0x7f030000;
+ public static final int checkout_list_item=0x7f030001;
+ public static final int dashbord_account=0x7f030002;
+ public static final int dashbord_main=0x7f030003;
+ public static final int main=0x7f030004;
+ public static final int record_details_info=0x7f030005;
+ public static final int record_details_simple=0x7f030006;
+ public static final int search_result_footer_view=0x7f030007;
+ public static final int search_result_item=0x7f030008;
+ public static final int search_result_list=0x7f030009;
}
public static final class string {
public static final int app_name=0x7f070001;
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical" >
+
+
+ <LinearLayout android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/search_result_text"
+ />
+
+ <TextView
+ android:id="@+id/search_result_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textStyle="bold"
+ />
+
+ </LinearLayout>
+
+ <ListView
+ android:id="@+id/checkout_items_list"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ ></ListView>
+
+</LinearLayout>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="left|center"
+ android:paddingBottom="3px"
+ android:paddingTop="3px"
+ android:paddingLeft="3px"
+ android:orientation="horizontal" >
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:orientation="vertical"
+ android:gravity="center_vertical"
+ android:paddingLeft="4dip"
+ >
+ <TextView
+ android:id="@+id/checkout_record_title"
+ style="@style/TitleSearchStyleList"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+
+ <TextView
+ android:id="@+id/checkout_record_author"
+ style="@style/AuthorSearchStyleList"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+
+ <TextView
+ android:id="@+id/checkout_renewals_remaining"
+ style="@style/PubSearchStyleList"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+
+ <TextView
+ android:id="@+id/checkout_due_date"
+ style="@style/PubSearchStyleList"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+
+ </LinearLayout>
+</LinearLayout>
\ No newline at end of file
/**
* The Class AuthenticateUser.
+ * Singleton class
*/
public class AccountAccess {
/** The password. */
public static String password = "demo123";
+ private static AccountAccess accountAccess = null;
/**
* Instantiates a new authenticate user.
*
* @param httpAddress the http address
*/
- public AccountAccess(String httpAddress) {
+ private AccountAccess(String httpAddress) {
this.httpAddress = httpAddress;
}
+ public static AccountAccess getAccountAccess(String httpAddress){
+
+ if(accountAccess == null){
+ accountAccess = new AccountAccess(httpAddress);
+ }
+ if(!httpAddress.equals(accountAccess.httpAddress))
+ accountAccess.updateHttpAddress(httpAddress);
+
+ return accountAccess;
+ }
+
+ // the object must be initialized before
+ public static AccountAccess getAccountAccess(){
+
+ if(accountAccess != null){
+ return accountAccess;
+ }
+
+ return null;
+ }
+ /*
+ * Change the Http conn to a new library address
+ */
+ public void updateHttpAddress(String httpAddress){
+
+ try {
+ // configure the connection
+
+ System.out.println("Connection with " + httpAddress);
+ conn = new HttpConnection(httpAddress + "/osrf-gateway-v1");
+
+ } catch (Exception e) {
+ System.err.println("Exception in establishing connection "
+ + e.getMessage());
+ }
+ }
/**
* Md5.
*
System.err.println("Error in parsing authtime " + e.getMessage());
}
+ //get user ID
+ accountAccess.getAccountSummary();
return true;
}
//------------------------Checked Out Items Section -------------------------//
- public void getItemsCheckedOut(){
+ public ArrayList<CircRecord> getItemsCheckedOut(){
+
+ ArrayList<CircRecord> circRecords = new ArrayList<CircRecord>();
+ /*
ArrayList<OSRFObject> long_overdue = new ArrayList<OSRFObject>();
ArrayList<OSRFObject> claims_returned = new ArrayList<OSRFObject>();
ArrayList<OSRFObject> lost = new ArrayList<OSRFObject>();
ArrayList<OSRFObject> out = new ArrayList<OSRFObject>();
+ ArrayList<OSRFObject> overdue = new ArrayList<OSRFObject>();
+ */
+ //fetch ids
List<String> long_overdue_id;
+ List<String> overdue_id;
List<String> claims_returned_id;
List<String> lost_id;
List<String> out_id;
+
Object resp = Utils.doRequest(conn, SERVICE_ACTOR, METHOD_FETCH_CHECKED_OUT_SUM, new Object[]{authToken, userID});
long_overdue_id = (List<String>)((Map<String,?>)resp).get("long_overdue");
claims_returned_id = (List<String>)((Map<String,?>)resp).get("claims_returned");
lost_id = (List<String>)((Map<String,?>)resp).get("lost");
out_id = (List<String>)((Map<String,?>)resp).get("out");
+ overdue_id = (List<String>)((Map<String,?>)resp).get("overdue");
//get all the record circ info
- for(int i=0;i<out_id.size();i++){
- //System.out.println(out.get(i));
- out.add(retrieveCircRecord(out_id.get(i)));
-
- System.out.println(out.get(i).get("target_copy"));
- fetchInfoForCheckedOutItem(out.get(i).get("target_copy")+"");
-
- }
+ if(out_id != null)
+ for(int i=0;i<out_id.size();i++){
+ //get circ
+ OSRFObject circ = retrieveCircRecord(out_id.get(i));
+ CircRecord circRecord = new CircRecord(circ, CircRecord.OUT,Integer.parseInt(out_id.get(i)));
+ //get info
+ fetchInfoForCheckedOutItem(circ.getInt("target_copy"), circRecord);
+ circRecords.add(circRecord);
+
+ //System.out.println(out.get(i).get("target_copy"));
+ //fetchInfoForCheckedOutItem(out.get(i).get("target_copy")+"");
+ }
+
+ if(overdue_id != null)
+ for(int i=0;i<overdue_id.size();i++){
+ //get circ
+ OSRFObject circ = retrieveCircRecord(overdue_id.get(i));
+ CircRecord circRecord = new CircRecord(circ, CircRecord.OVERDUE, Integer.parseInt(overdue_id.get(i)));
+ //fetch info
+ fetchInfoForCheckedOutItem(circ.getInt("target_copy"), circRecord);
+ circRecords.add(circRecord);
+
+ }
+ //TODO are we using this too? In the opac they are not used
+ /*
for(int i=0;i<lost_id.size();i++){
//System.out.println(out.get(i));
lost.add(retrieveCircRecord(lost_id.get(i)));
//System.out.println(out.get(i));
long_overdue.add(retrieveCircRecord(long_overdue_id.get(i)));
}
-
+ */
+
+ return circRecords;
+ }
+ /* Retrieves the Circ record
+ * @param : target_copy from circ
+ * @returns : "circ" OSRFObject
+ */
+ private OSRFObject retrieveCircRecord(String id){
+
+ OSRFObject circ = (OSRFObject) Utils.doRequest(conn, SERVICE_CIRC, METHOD_FETCH_CIRC_BY_ID, new Object[]{authToken,id});
+ return circ;
}
+
/* Fetch info for Checked Out Items
* It uses two methods : open-ils.search.biblio.mods_from_copy or in case
* of pre-cataloged records it uses open-ils.search.asset.copy.retriev
* Usefull info : title and author
* (for acp : dummy_title, dummy_author)
*/
- private OSRFObject fetchInfoForCheckedOutItem(String target_copy){
+ private OSRFObject fetchInfoForCheckedOutItem(Integer target_copy, CircRecord circRecord){
+
+ if(target_copy == null)
+ return null;
OSRFObject result;
+ System.out.println("Mods from copy");
OSRFObject info_mvr = fetchModsFromCopy(target_copy);
//if title or author not inserted, request acp with copy_target
result = info_mvr;
OSRFObject info_acp = null;
-
- if(info_mvr.get("title") == null || info_mvr.get("author") == null){
+
+ //the logic to establish mvr or acp is copied from the opac
+ if(info_mvr.getString("title") == null || info_mvr.getString("author") == null){
+ System.out.println("Asset");
info_acp = fetchAssetCopy(target_copy);
result = info_acp;
+ circRecord.acp = info_acp;
+ circRecord.circ_info_type = CircRecord.ACP_OBJ_TYPE;
+ }
+ else{
+ circRecord.mvr = info_mvr;
+ circRecord.circ_info_type = CircRecord.MVR_OBJ_TYPE;
}
-
return result;
}
- /* Retreives the Circ record
- * @param : target_copy from circ
- * @returns : "circ" OSRFObject
- */
- private OSRFObject retrieveCircRecord(String id){
-
- OSRFObject circ = (OSRFObject) Utils.doRequest(conn, SERVICE_CIRC, METHOD_FETCH_CIRC_BY_ID, new Object[]{authToken,id});
- return circ;
- }
-
- private OSRFObject fetchModsFromCopy(String target_copy){
+ private OSRFObject fetchModsFromCopy(Integer target_copy){
//sync request
OSRFObject mvr = (OSRFObject) Utils.doRequest(conn, SERVICE_SEARCH, METHOD_FETCH_MODS_FROM_COPY, new Object[]{target_copy});
return mvr;
}
- private OSRFObject fetchAssetCopy(String target_copy){
+ private OSRFObject fetchAssetCopy(Integer target_copy){
OSRFObject acp = (OSRFObject) Utils.doRequest(conn, SERVICE_SEARCH, METHOD_FETCH_COPY, new Object[]{target_copy});
return acp;
}
+
+
+
/* Method used to renew a circulation record based on target_copy_id
* Returns many objects, don't think they are needed
*/
if(type.equals("C")){
//fetch_copy
- OSRFObject copyObject = fetchAssetCopy(hold.getString("target"));
+ OSRFObject copyObject = fetchAssetCopy(hold.getInt("target"));
//fetch_volume from copyObject.call_number field
Integer call_number = copyObject.getInt("call_number");
--- /dev/null
+package org.evergreen.android.accountAccess;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.opensrf.util.OSRFObject;
+
+/**
+ * This is a wrapper class that get the information out for a circ object
+ * @author daniel
+ *
+ */
+public class CircRecord {
+
+ public static final int MVR_OBJ_TYPE = 1;
+ public static final int ACP_OBJ_TYPE = 2;
+ public static final int UNDEF_OBJ_TYPE = 0;
+
+ public OSRFObject mvr = null;
+
+ public OSRFObject acp = null;
+
+ public OSRFObject circ = null;
+
+ public int circ_info_type = UNDEF_OBJ_TYPE;
+
+ public int circ_type;
+
+ public static final int OUT = 0;
+ public static final int CLAIMS_RETURNED = 1;
+ public static final int LONG_OVERDUE = 2;
+ public static final int OVERDUE = 3;
+ public static final int LOST = 4;
+
+ public int circ_id = -1;
+
+ private static final String datePattern = "yyyy-MM-dd'T'hh:mm:ssZ";
+
+ private Date circ_due_date = null;
+
+ public CircRecord(OSRFObject circ, OSRFObject mvr, OSRFObject acp, int circ_type, int circ_id) {
+
+ this.circ = circ;
+
+ //one of the acp or mvr will be null this will determine the circ OSRFObject type
+ this.acp = acp;
+ this.mvr = mvr;
+
+ if(this.acp != null)
+ this.circ_info_type = ACP_OBJ_TYPE;
+
+ if(this.mvr != null)
+ this.circ_info_type = MVR_OBJ_TYPE;
+
+ this.circ_type = circ_type;
+ this.circ_id = circ_id;
+ //parse due date
+ parseDate(circ);
+ }
+
+ public CircRecord(OSRFObject circ,int circ_type, int circ_id){
+ this.circ = circ;
+ this.circ_type = circ_type;
+ this.circ_id = circ_id;
+ //parse due date
+ parseDate(circ);
+ }
+
+ public String getAuthor(){
+
+ String author = null;
+
+ if(this.circ_info_type == MVR_OBJ_TYPE)
+ author = mvr.getString("author");
+ if(this.circ_info_type == ACP_OBJ_TYPE)
+ author = acp.getString("dummy_author");
+
+ return author;
+ }
+
+
+ public String getDueDate(){
+
+ return circ_due_date.toLocaleString();
+ }
+
+ public String getTitle(){
+
+ String title = null;
+
+ if(this.circ_info_type == MVR_OBJ_TYPE)
+ title = mvr.getString("title");
+ if(this.circ_info_type == ACP_OBJ_TYPE)
+ title = acp.getString("dummy_title");
+
+ return title;
+ }
+
+ public String getRenewals(){
+
+ if(circ != null)
+ circ.getInt("renewal_remaining");
+
+ return null;
+ }
+
+ private void parseDate(OSRFObject circ){
+
+ final SimpleDateFormat sdf = new SimpleDateFormat(datePattern);
+
+ if(circ.getString("due_date") != null)
+ try
+ {
+ this.circ_due_date = sdf.parse(circ.getString("due_date"));
+ System.out.println(this.circ_due_date);
+ }
+ catch (ParseException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+}
--- /dev/null
+package org.evergreen.android.accountAccess;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.evergreen.android.R;
+import org.evergreen.android.globals.GlobalConfigs;
+import org.evergreen.android.searchCatalog.RecordInfo;
+import org.opensrf.util.OSRFObject;
+
+import android.app.Activity;
+import android.content.Context;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
+
+public class ItemsCheckOutListView extends Activity{
+
+ private String TAG = "ItemsCheckOutListView";
+
+ private AccountAccess accountAccess = null;
+
+ private ListView lv;
+
+ private CheckOutArrayAdapter listAdapter = null;
+
+ private ArrayList<CircRecord> circRecords = null;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ // TODO Auto-generated method stub
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.checkout_list);
+
+ accountAccess = AccountAccess.getAccountAccess();
+
+ lv = (ListView) findViewById(R.id.checkout_items_list);
+
+ circRecords = accountAccess.getItemsCheckedOut();
+
+ listAdapter = new CheckOutArrayAdapter(this, R.layout.checkout_list_item, circRecords);
+ lv.setAdapter(listAdapter);
+
+
+
+ listAdapter.notifyDataSetChanged();
+
+ }
+
+
+ class CheckOutArrayAdapter extends ArrayAdapter<CircRecord> {
+ private static final String tag = "CheckoutArrayAdapter";
+
+ private TextView recordTitle;
+ private TextView recordAuthor;
+ private TextView recordDueDate;
+ private TextView recordRenewals;
+
+ private List<CircRecord> records = new ArrayList<CircRecord>();
+
+ public CheckOutArrayAdapter(Context context, int textViewResourceId,
+ List<CircRecord> objects) {
+ super(context, textViewResourceId, objects);
+ this.records = objects;
+ }
+
+ public int getCount() {
+ return this.records.size();
+ }
+
+ public CircRecord getItem(int index) {
+ return this.records.get(index);
+ }
+
+ public View getView(int position, View convertView, ViewGroup parent) {
+ View row = convertView;
+
+ // Get item
+ CircRecord record = getItem(position);
+
+
+ if(record == null)
+ {
+ Log.d(tag, "Starting XML view more infaltion ... ");
+ LayoutInflater inflater = (LayoutInflater) this.getContext()
+ .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ row = inflater.inflate(R.layout.search_result_footer_view, parent, false);
+ Log.d(tag, "Successfully completed XML view more Inflation!");
+
+
+ }
+ else{
+
+ //if it is the right type of view
+ if (row == null ) {
+
+ Log.d(tag, "Starting XML Row Inflation ... ");
+ LayoutInflater inflater = (LayoutInflater) this.getContext()
+ .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ row = inflater.inflate(R.layout.checkout_list_item, parent, false);
+ Log.d(tag, "Successfully completed XML Row Inflation!");
+
+ }
+
+ // Get reference to TextView - title
+ recordTitle = (TextView) row.findViewById(R.id.checkout_record_title);
+
+ // Get reference to TextView - author
+ recordAuthor = (TextView) row.findViewById(R.id.checkout_record_author);
+
+ //Get reference to TextView - record Publisher date+publisher
+ recordDueDate = (TextView) row.findViewById(R.id.checkout_due_date);
+
+ //Get remaining renewals
+ recordRenewals = (TextView) row.findViewById(R.id.checkout_renewals_remaining);
+ //set text
+ System.out.println("Row" + record.getTitle() + " " + record.getAuthor() + " " + record.getDueDate() + " " + record.getRenewals());
+ recordTitle.setText(record.getTitle());
+ recordAuthor.setText(record.getAuthor());
+ recordDueDate.setText(record.getDueDate());
+ recordRenewals.setText(record.getRenewals());
+ }
+
+ return row;
+ }
+ }
+}
//authenticate
- AccountAccess ac = new AccountAccess(GlobalConfigs.httpAddress);
+ AccountAccess ac = AccountAccess.getAccountAccess(GlobalConfigs.httpAddress);
ac.authenticate();
return true;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.net.URLConnection;
+import java.util.Map;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
-import org.evergreen.android.accountAccess.SessionNotFoundException;
+import org.evergreen.android.accountAccess.AccountAccess;
import org.opensrf.Method;
import org.opensrf.net.http.GatewayRequest;
import org.opensrf.net.http.HttpConnection;
}
-
- public static Object doRequest(HttpConnection conn, String service, String methodName, Object[] params) throws SessionNotFoundException{
-
+ //TODO throw NO_SESSION
+ public static Object doRequest(HttpConnection conn, String service, String methodName, Object[] params) //throws SessionNotFoundException{
+ {
//TODO check params and throw errors
Method method = new Method(methodName);
-
- for(int i=0;i<params.length;i++)
- method.addParam(params[i]);
-
+ System.out.println();
+ for(int i=0;i<params.length;i++){
+ method.addParam(params[i]);
+ System.out.print("Param "+i+":" + params[i]);
+ }
+ System.out.println();
//sync request
HttpRequest req = new GatewayRequest(conn, service, method).send();
Object resp;
while ((resp = req.recv()) != null) {
System.out.println("Sync Response: " + resp);
Object response = (Object) resp;
- return response;
+
+ try{
+ String textcode = ((Map<String,String>)response).get("textcode");
+ if(textcode != null){
+ if(textcode.equals("NO_SESSION")){
+ response = requireNewSession(conn, service, methodName, params);
+ }
+
+ }
+ }catch(Exception e){
+
+ }
+ return response;
}
return null;
}
-
+
+ public static Object requireNewSession(HttpConnection conn, String service, String methodName, Object[] params){
+
+ AccountAccess ac = AccountAccess.getAccountAccess();
+ boolean success = ac.authenticate();
+
+ Object response = null;
+
+ if(success){
+ response = doRequest(conn, service, methodName, params);
+ }
+
+ return response;
+ }
}
package org.evergreen.android.views;
import org.evergreen.android.R;
-import org.evergreen.android.globals.GlobalConfigs;
+import org.evergreen.android.accountAccess.ItemsCheckOutListView;
import android.app.Activity;
+import android.content.Intent;
import android.os.Bundle;
import android.view.View;
switch (id) {
case R.id.account_btn_check_out :
- //startActivity (new Intent(getApplicationContext(), F3Activity.class));
+ startActivity (new Intent(getApplicationContext(),ItemsCheckOutListView.class));
break;
case R.id.account_btn_holds:
//startActivity (new Intent(getApplicationContext(), F4Activity.class));
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
String key) {
+
+
if(key.equals("username")){
AccountAccess.userName = sharedPreferences.getString("username", "");
}else
public void run() {
boolean routeToAddress = true;
- AccountAccess account = new AccountAccess(GlobalConfigs.httpAddress);
+ AccountAccess account = AccountAccess.getAccountAccess(GlobalConfigs.httpAddress);
try{
Utils.checkNetworkStatus((ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE), context);
}catch(NoNetworkAccessException e){