Class Profile

java.lang.Object
com.example.slacks_lottoevent.model.Profile

public class Profile extends Object
Represents a user profile with basic information.
  • Constructor Details

    • Profile

      public Profile()
      Default constructor for Firestore serialization.
    • Profile

      public Profile(String name, String phone, String email, String deviceId, android.content.Context context)
      Constructor for creating a new profile.
      Parameters:
      name - The name of the user.
      phone - The phone number of the user.
      email - The email address of the user.
      context - The application context for file access.
  • Method Details

    • getName

      public String getName()
    • setName

      public void setName(String name, android.content.Context context)
      Sets the name of the user and updates the profile picture if using the default picture.
      Parameters:
      name - The name of the user.
      context - The application context for file access.
    • getEmail

      public String getEmail()
    • setEmail

      public void setEmail(String email)
    • getPhone

      public String getPhone()
    • setPhone

      public void setPhone(String phone)
    • getDeviceId

      public String getDeviceId()
    • getAdminNotifications

      public boolean getAdminNotifications()
    • setAdminNotifications

      public void setAdminNotifications(boolean adminNotifications)
    • getUsingDefaultPicture

      public boolean getUsingDefaultPicture()
    • setUsingDefaultPicture

      public void setUsingDefaultPicture(boolean usingDefaultPicture)
    • getProfilePicturePath

      public String getProfilePicturePath()
    • setProfilePicturePath

      public void setProfilePicturePath(String profilePicturePath)
    • generateProfilePicture

      public String generateProfilePicture(String name, android.content.Context context)
      Generates and saves a profile picture image with the initials of the name.
      Parameters:
      name - The name to extract initials from.
      context - The application context for accessing file storage.
      Returns:
      The file path of the saved profile picture.
    • getAdmin

      public boolean getAdmin()
    • setAdmin

      public void setAdmin(boolean admin)