ab0898c571
* Adding icons and text for manage location * Adding manage location to main menu * Adding class to manage location * Adding view layout to manage location * Share location switch created * Basic listener added to switch * Moving manage location to users menu * Adding icons and text for manage location * Adding manage location to main menu * Adding class to manage location * Adding view layout to manage location * Share location switch created * Basic listener added to switch * Moving manage location to users menu * Adding elements to indoor_location view * Improving indoor_location with default text * Logic to calculate distance * Trying to connect to the API. * Adding model to location distance * Changing textview to listview * Making request to MacStore API to get location of Mac * Search user menu * New designs manage location activity * Connecting to swad api * Connection to swad api working * Location history showing up in activity * Adding button and user code to find user * Sorting locations and saving only one * Implementing GetLastLocation API method * Adding location preferences translations * Adding translations to location menu toast * Return without error from searching user * Removing warning * Adding translations * Changing permissions * Changing module name * Making location serializable * Changing deprecated implementation * Cleaning code and refactoring deprecated classes * Changing location name in menu * Scanning all wifi networks * Hiding white activities * Showing more information in each location * Fixing bug when searching user * Fixing available networks sort * Using roomCode instead of institutionCode * Changes scheduling tasks * Deleting dependencies * Deleting useless import * Getting correct mac * Requesting permissions to user * LocationTimeStamp inherits from Location * Using new variable to soap object * Setting const defaultValue * Extracting common lines on update location click * Extracting common lines on activity result * Update SWADroid/src/main/res/values/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/values/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/values-es/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Using functions to reduce code * Update SWADroid/src/main/res/values/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/GetLastLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/model/UserFilter.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/GetLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/GetLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/GetLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/IndoorLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/IndoorLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/IndoorLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/IndoorLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/IndoorLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/IndoorLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/IndoorLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/IndoorLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/IndoorLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Constant moved to class level * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/SendCurrentLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/SendCurrentLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/indoorlocation/SendCurrentLocation.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/modules/messages/SearchUsers.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/values-es/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/values-es/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/values-es/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/values-es/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/values-es/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/values-es/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/values-es/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/values/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/values/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/values/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/values/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/values/strings.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Adding dependency to preferences * Changing indoor location title text * Showing text when no location is found * Allow always location option * Adding new button to show mac * Find mac button added and working * Stopping scheduler when user can't be located * Update SWADroid/src/main/java/es/ugr/swad/swadroid/model/LocationTimeStamp.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/model/LocationTimeStamp.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/java/es/ugr/swad/swadroid/model/LocationTimeStamp.java Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update SWADroid/src/main/res/xml/preferences.xml Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com> * Update material version to 1.2.1 * Updating plugin * Fixing API permissions * Update gradle/wrapper/gradle-wrapper.properties * Minor code style improvements * Fix IndexOutOfBoundsException * Add default locale to SimpleDateFormat * Use complete Gradle distribution * Update authors * Update CHANGELOG * Remove unused import * Minor code style improvements Co-authored-by: javibl8@correo.ugr.es <javier.bueno@jitkey.com> Co-authored-by: Juan Miguel Boyero Corral <juanmi1982@gmail.com>
277 lines
6.1 KiB
Java
277 lines
6.1 KiB
Java
/*
|
|
* This file is part of SWADroid.
|
|
*
|
|
* Copyright (C) 2010 Juan Miguel Boyero Corral <juanmi1982@gmail.com>
|
|
*
|
|
* SWADroid is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* SWADroid is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with SWADroid. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
package es.ugr.swad.swadroid.model;
|
|
|
|
import org.ksoap2.serialization.PropertyInfo;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.Hashtable;
|
|
|
|
/**
|
|
* User data.
|
|
*
|
|
* @author Rubén Martín Hidalgo
|
|
*/
|
|
public class FrequentUser extends Model implements Serializable{
|
|
/**
|
|
* Sender identifier.
|
|
*/
|
|
private String idUser;
|
|
/**
|
|
* Recipient identifier.
|
|
*/
|
|
private String userNickname;
|
|
/**
|
|
* User first surname.
|
|
*/
|
|
private String userSurname1;
|
|
/**
|
|
* User last surname.
|
|
*/
|
|
private String userSurname2;
|
|
/**
|
|
* User name.
|
|
*/
|
|
private String userFirstname;
|
|
/**
|
|
* Full path where user's picture is stored.
|
|
*/
|
|
private String userPhoto;
|
|
/**
|
|
* Unique identifier for each user.
|
|
*/
|
|
private int userCode;
|
|
/**
|
|
* Is a receiver?.
|
|
*/
|
|
private boolean selectedCheckbox;
|
|
/**
|
|
* Score of frequent recipient
|
|
*/
|
|
private double score;
|
|
|
|
/**
|
|
* Constructor.
|
|
*
|
|
* @param idUser Sender identifier.
|
|
* @param userNickname Recipient identifier.
|
|
* @param userSurname1 User first surname.
|
|
* @param userSurname2 User last surname.
|
|
* @param userFirstname User name.
|
|
* @param userPhoto Full path where user's picture is stored.
|
|
* @param userCode User code.
|
|
* @param selectedCheckbox Is a receiver?.
|
|
* @param score Score of frequent recipient
|
|
*/
|
|
public FrequentUser(String idUser, String userNickname, String userSurname1, String userSurname2, String userFirstname, String userPhoto, int userCode, boolean selectedCheckbox, double score) {
|
|
this.idUser = idUser;
|
|
this.userNickname = userNickname;
|
|
this.userSurname1 = userSurname1;
|
|
this.userSurname2 = userSurname2;
|
|
this.userFirstname = userFirstname;
|
|
this.userPhoto = userPhoto;
|
|
this.userCode = userCode;
|
|
this.selectedCheckbox = selectedCheckbox;
|
|
this.score = score;
|
|
}
|
|
|
|
/**
|
|
* Gets sender identifier.
|
|
*
|
|
* @return Sender identifier.
|
|
*/
|
|
public String getidUser() {
|
|
return this.idUser;
|
|
}
|
|
|
|
/**
|
|
* Sets sender identifier.
|
|
*
|
|
* @param idUser Sender identifier.
|
|
*/
|
|
public void setIdUser(String idUser) {
|
|
this.idUser = idUser;
|
|
}
|
|
|
|
/**
|
|
* Gets user name.
|
|
*
|
|
* @return User name.
|
|
*/
|
|
public String getUserFirstname() {
|
|
return userFirstname;
|
|
}
|
|
|
|
/**
|
|
* Sets user name.
|
|
*
|
|
* @param userFirstname User name.
|
|
*/
|
|
public void setUserFirstname(String userFirstname) {
|
|
this.userFirstname = userFirstname;
|
|
}
|
|
|
|
/**
|
|
* Gets user identifier.
|
|
*
|
|
* @return User identifier.
|
|
*/
|
|
public String getUserNickname() {
|
|
return userNickname;
|
|
}
|
|
|
|
/**
|
|
* Sets user identifier.
|
|
*
|
|
* @param userNickname User identifier.
|
|
*/
|
|
public void setUserNickname(String userNickname) {
|
|
this.userNickname = userNickname;
|
|
}
|
|
|
|
/**
|
|
* Gets user first surname.
|
|
*
|
|
* @return User first surname.
|
|
*/
|
|
public String getUserSurname1() {
|
|
return userSurname1;
|
|
}
|
|
|
|
/**
|
|
* Sets user first surname.
|
|
*
|
|
* @param userSurname1 User first surname.
|
|
*/
|
|
public void setUserSurname1(String userSurname1) {
|
|
this.userSurname1 = userSurname1;
|
|
}
|
|
|
|
/**
|
|
* Gets user last surname.
|
|
*
|
|
* @return User last surname.
|
|
*/
|
|
public String getUserSurname2() {
|
|
return userSurname2;
|
|
}
|
|
|
|
/**
|
|
* Sets user last surname.
|
|
*
|
|
* @param userSurname2 User last surname.
|
|
*/
|
|
public void setUserSurname2(String userSurname2) {
|
|
this.userSurname2 = userSurname2;
|
|
}
|
|
|
|
/**
|
|
* Gets Full path where user's picture is stored.
|
|
*
|
|
* @return the userPhoto
|
|
*/
|
|
public String getUserPhoto() {
|
|
return userPhoto;
|
|
}
|
|
|
|
/**
|
|
* Sets Full path where user's picture is stored.
|
|
*
|
|
* @param userPhoto the userPhoto to set
|
|
*/
|
|
public void setUserPhoto(String userPhoto) {
|
|
this.userPhoto = userPhoto;
|
|
}
|
|
|
|
/**
|
|
* Gets userCode.
|
|
*
|
|
* @return the userPhoto
|
|
*/
|
|
public int getUserCode() {
|
|
return userCode;
|
|
}
|
|
|
|
/**
|
|
* Sets userCode.
|
|
*
|
|
* @param userCode
|
|
*/
|
|
public void setUserCode(int userCode) {
|
|
this.userCode = userCode;
|
|
}
|
|
|
|
/**
|
|
* Get if checkbox is selected.
|
|
*
|
|
* @return if checkbox is selected (true / false)
|
|
*/
|
|
public boolean getCheckbox() {
|
|
return selectedCheckbox;
|
|
}
|
|
|
|
/**
|
|
* Sets Full path where user's picture is stored.
|
|
*
|
|
* @param selected the checkbox is selected or not
|
|
*/
|
|
public void setCheckbox(boolean selected){
|
|
this.selectedCheckbox = selected;
|
|
}
|
|
|
|
/**
|
|
* Get score of frequent recipient.
|
|
*
|
|
* @return score
|
|
*/
|
|
public double getScore() {
|
|
return score;
|
|
}
|
|
|
|
/**
|
|
* Set score of frequent recipient.
|
|
*
|
|
* @param score
|
|
*/
|
|
public void setScore(double score){
|
|
this.score = score;
|
|
}
|
|
|
|
@Override
|
|
public Object getProperty(int index) {
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public int getPropertyCount() {
|
|
return 0;
|
|
}
|
|
|
|
@Override
|
|
public void setProperty(int index, Object value) {
|
|
|
|
}
|
|
|
|
@Override
|
|
public void getPropertyInfo(int index, Hashtable properties, PropertyInfo info) {
|
|
|
|
}
|
|
}
|