Android Open Source - Android-LensRocket User Preferences






From Project

Back to project page Android-LensRocket.

License

The source code is released under:

Copyright (c) 2014 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software...

If you think the Android project Android-LensRocket listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*
Created by Chris Risner/*from www . jav  a 2  s.  co m*/
Copyright (c) Microsoft Corporation
All Rights Reserved
Apache 2.0 License
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
 
     http://www.apache.org/licenses/LICENSE-2.0
 
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 
See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.
 */

package com.msted.lensrocket.datamodels;

import com.msted.lensrocket.R;

public class UserPreferences {
  @com.google.gson.annotations.SerializedName("username")
  private String mUsername;
  @com.google.gson.annotations.SerializedName("mobileNumber")
  private String mMobileNumber;
  @com.google.gson.annotations.SerializedName("email")
  private String mEmail;
  @com.google.gson.annotations.SerializedName("receiveFrom")
  private String mReceiveFrom;
  @com.google.gson.annotations.SerializedName("shareTo")
  private String mShareTo;
  @com.google.gson.annotations.SerializedName("id")
  private String mId;
  
  public UserPreferences getCopy() {
    UserPreferences copy = new UserPreferences();
    copy.mUsername = mUsername;
    copy.mMobileNumber = mMobileNumber;
    copy.mEmail = mEmail;
    copy.mReceiveFrom = mReceiveFrom;
    copy.mShareTo = mShareTo;
    copy.mId = mId;
    return copy;
  }
  
  public String getId() { return mId; } 
  public String getUsername() { return mUsername; }
  public String getMobileNumber() { return mMobileNumber; }
  public void setMobileNumber(String mobileNumber) { mMobileNumber = mobileNumber; }
  public String getEmail() { return mEmail; }
  public void setEmail(String email) { mEmail = email; }
  public String getReceiveFrom() { return mReceiveFrom; }
  public void setReceiveFrom(String receiveFrom) { mReceiveFrom  = receiveFrom; }
  public String getShareTo() { return mShareTo; }
  public void setShareTo(String shareTo) { mShareTo = shareTo; }
  
  public void setValueForPreference(int preference, String value) {
    switch (preference) {
      case R.string.email_address:
        this.setEmail(value);
      break;
      case R.string.receive_rockets_from:
        this.setReceiveFrom(value);
        break;
      case R.string.share_stories_to:
        this.setShareTo(value);
        break;
    }
  }
  
  @Override
  public boolean equals(Object o) {
    return o instanceof UserPreferences && ((UserPreferences) o).mId == mId;
  }
}




Java Source Code List

com.msted.lensrocket.CameraPreview.java
com.msted.lensrocket.Constants.java
com.msted.lensrocket.LensRocketApplication.java
com.msted.lensrocket.LensRocketBroadcastReceiver.java
com.msted.lensrocket.LensRocketService.java
com.msted.lensrocket.PreferencesHandler.java
com.msted.lensrocket.activities.AccessFriendsActivity.java
com.msted.lensrocket.activities.FriendsListActivity.java
com.msted.lensrocket.activities.LoginActivity.java
com.msted.lensrocket.activities.RecordActivity.java
com.msted.lensrocket.activities.RocketsListActivity.java
com.msted.lensrocket.activities.SelectUsernameActivity.java
com.msted.lensrocket.activities.SendToFriendsActivity.java
com.msted.lensrocket.activities.SettingsActivity.java
com.msted.lensrocket.activities.SignupActivity.java
com.msted.lensrocket.activities.SplashScreenActivity.java
com.msted.lensrocket.activities.WebWrapperActivity.java
com.msted.lensrocket.adapters.FriendsListArrayAdapter.java
com.msted.lensrocket.adapters.RocketsArrayAdapter.java
com.msted.lensrocket.adapters.SendToFriendsArrayAdapter.java
com.msted.lensrocket.adapters.ViewFriendsListArrayAdapter.java
com.msted.lensrocket.base.BaseActivity.java
com.msted.lensrocket.base.BaseListActivity.java
com.msted.lensrocket.datamodels.Friend.java
com.msted.lensrocket.datamodels.RocketFile.java
com.msted.lensrocket.datamodels.Rocket.java
com.msted.lensrocket.datamodels.UserPreferences.java
com.msted.lensrocket.util.DeviceDetector.java
com.msted.lensrocket.util.LensRocketAlert.java
com.msted.lensrocket.util.LensRocketLogger.java
com.msted.lensrocket.util.LensRocketRegisterResponse.java
com.msted.lensrocket.util.LensRocketResponse.java
com.msted.lensrocket.util.NetworkUtilities.java
com.msted.lensrocket.util.NoNetworkConnectivityException.java
com.msted.lensrocket.util.TextValidator.java