Android Open Source - MobileConnectTestApp Logo Response






From Project

Back to project page MobileConnectTestApp.

License

The source code is released under:

MIT License

If you think the Android project MobileConnectTestApp 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

package com.gsma.android.xoperatorapidemo.logo;
/*w w  w. j  a  va2s  . co  m*/
import org.json.JSONException;
import org.json.JSONObject;

public class LogoResponse {
  String operatorId;
  String apiName;
  String language;
  String size;
  String height;
  String width;
  String action;
  String url;
  String bgColourRange;
  
  public LogoResponse() {
  }

  public LogoResponse(Object source) throws JSONException {
    if (source!=null && source instanceof JSONObject) {
      JSONObject so=(JSONObject) source;
      operatorId=so.has("operatorId")?so.getString("operatorId"):null;
      apiName=so.has("apiName")?so.getString("apiName"):null;
      language=so.has("language")?so.getString("language"):null;
      size=so.has("size")?so.getString("size"):null;
      height=so.has("height")?so.getString("height"):null;
      width=so.has("width")?so.getString("width"):null;
      action=so.has("action")?so.getString("action"):null;
      url=so.has("url")?so.getString("url"):null;
      bgColourRange=so.has("bgColourRange")?so.getString("bgColourRange"):null;
    }
  }
  
  public JSONObject toObject() throws JSONException {
    JSONObject obj=new JSONObject();
    
    if (operatorId!=null) obj.put("operatorId", operatorId);
    if (apiName!=null) obj.put("apiName", apiName);
    if (language!=null) obj.put("language", language);
    if (size!=null) obj.put("size", size);
    if (height!=null) obj.put("height", height);
    if (width!=null) obj.put("width", width);
    if (action!=null) obj.put("action", action);
    if (url!=null) obj.put("url", url);
    if (bgColourRange!=null) obj.put("bgColourRange", bgColourRange);
    return obj;
  }

  public String getOperatorId() {
    return operatorId;
  }

  public void setOperatorId(String operatorId) {
    this.operatorId = operatorId;
  }

  public String getApiName() {
    return apiName;
  }

  public void setApiName(String apiName) {
    this.apiName = apiName;
  }

  public String getLanguage() {
    return language;
  }

  public void setLanguage(String language) {
    this.language = language;
  }

  public String getSize() {
    return size;
  }

  public void setSize(String size) {
    this.size = size;
  }

  public String getHeight() {
    return height;
  }

  public void setHeight(String height) {
    this.height = height;
  }

  public String getAction() {
    return action;
  }

  public void setAction(String action) {
    this.action = action;
  }

  public String getUrl() {
    return url;
  }

  public void setUrl(String url) {
    this.url = url;
  }

  public String getBgColourRange() {
    return bgColourRange;
  }

  public void setBgColourRange(String bgColourRange) {
    this.bgColourRange = bgColourRange;
  }

  
  
/*
 * [{"operatorId":"exchange",
 * "apiName":"operatorid",
 * "language":"en",
 * "size":"large",
 * "height":"140px",
 * "width":"640px",
 * "action":"default",
 * "url":"http://integration-api.apiexchange.org:80/v1/logostorage/images/english/connect_with_operator_640x140.png",
 * "bgColourRange":"#ffffff,#000000"},
 * 
 * {"operatorId":"exchange",
 * "apiName":"payment",
 * "language":"en",
 * "size":"large",
 * "height":"140px",
 * "width":"640px",
 * "action":"default",
 * "url":"http://integration-api.apiexchange.org:80/v1/logostorage/images/english/pay_with_operator_640x140.png",
 * "bgColourRange":"#ffffff,#000000"}]
 */
  
}




Java Source Code List

com.gsma.android.xoperatorapidemo.activity.MainActivity.java
com.gsma.android.xoperatorapidemo.activity.SettingsActivity.java
com.gsma.android.xoperatorapidemo.activity.discovery.ActiveDiscoveryTask.java
com.gsma.android.xoperatorapidemo.activity.discovery.DiscoveryProcessEndpoints.java
com.gsma.android.xoperatorapidemo.activity.discovery.DisplayDiscoveryWebsiteActivity.java
com.gsma.android.xoperatorapidemo.activity.discovery.PassiveDiscoveryTask.java
com.gsma.android.xoperatorapidemo.activity.discovery.ProcessDiscoveryToken.java
com.gsma.android.xoperatorapidemo.activity.identity.AuthorizationCompleteActivity.java
com.gsma.android.xoperatorapidemo.activity.identity.DisplayIdentityWebsiteActivity.java
com.gsma.android.xoperatorapidemo.activity.identity.OpenIDConnectAbstractActivity.java
com.gsma.android.xoperatorapidemo.activity.identity.RetrieveTokenTask.java
com.gsma.android.xoperatorapidemo.activity.identity.RetrieveUserinfoTask.java
com.gsma.android.xoperatorapidemo.discovery.Api.java
com.gsma.android.xoperatorapidemo.discovery.DeveloperOperatorSetting.java
com.gsma.android.xoperatorapidemo.discovery.DiscoveryData.java
com.gsma.android.xoperatorapidemo.discovery.DiscoveryDeveloperOperatorSettings.java
com.gsma.android.xoperatorapidemo.discovery.DiscoveryServingOperatorSettings.java
com.gsma.android.xoperatorapidemo.discovery.DiscoveryStartupSettings.java
com.gsma.android.xoperatorapidemo.discovery.LinkConstants.java
com.gsma.android.xoperatorapidemo.discovery.Link.java
com.gsma.android.xoperatorapidemo.discovery.Response.java
com.gsma.android.xoperatorapidemo.discovery.ServingOperatorSetting.java
com.gsma.android.xoperatorapidemo.identity.UserinfoAddress.java
com.gsma.android.xoperatorapidemo.identity.Userinfo.java
com.gsma.android.xoperatorapidemo.logo.LogoCacheItem.java
com.gsma.android.xoperatorapidemo.logo.LogoCache.java
com.gsma.android.xoperatorapidemo.logo.LogoLoaderTask.java
com.gsma.android.xoperatorapidemo.logo.LogoResponseArray.java
com.gsma.android.xoperatorapidemo.logo.LogoResponse.java
com.gsma.android.xoperatorapidemo.utils.HttpUtils.java
com.gsma.android.xoperatorapidemo.utils.JsonUtils.java
com.gsma.android.xoperatorapidemo.utils.KeyValuePair.java
com.gsma.android.xoperatorapidemo.utils.ParameterList.java
com.gsma.android.xoperatorapidemo.utils.PhoneState.java
com.gsma.android.xoperatorapidemo.utils.PhoneUtils.java
com.gsma.android.xoperatorapidemo.utils.PreferencesUtils.java