Android Open Source - SipgateInfo Sipgate Uri Helper






From Project

Back to project page SipgateInfo.

License

The source code is released under:

GNU General Public License

If you think the Android project SipgateInfo 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 net.skweez.sipgate.api.xmlrpc;
/*  www . j  ava 2 s  . c  o m*/
import android.net.Uri;

public abstract class SipgateUriHelper {

  /**
   * Sipgate sends "URIs" without the "//", so we have to insert them.
   * 
   * @param uriString - the URI string from Sipgate (without "//")
   * @return A Uri object
   */
  public static Uri createUriFromString(String uriString) {

    Uri uri;
    
    if (uriString.startsWith("sip://")) {
      uri = Uri.parse(uriString);
    } else {
      StringBuilder uriBuilder = new StringBuilder(uriString);
      uri = Uri.parse(uriBuilder.insert(4, "//").toString());
    }

    return uri;
    
  }

}




Java Source Code List

net.skweez.sipgate.CallUtils.java
net.skweez.sipgate.PreferencesAuthenticator.java
net.skweez.sipgate.SipgateApplication.java
net.skweez.sipgate.activity.AccountInfoAdapter.java
net.skweez.sipgate.activity.CallListAdapter.java
net.skweez.sipgate.activity.MainActivity.java
net.skweez.sipgate.activity.SetupActivity.java
net.skweez.sipgate.api.AuthenticationException.java
net.skweez.sipgate.api.Call.java
net.skweez.sipgate.api.ECallStatus.java
net.skweez.sipgate.api.ISipgateAPI.java
net.skweez.sipgate.api.Price.java
net.skweez.sipgate.api.SipgateException.java
net.skweez.sipgate.api.UserName.java
net.skweez.sipgate.api.UserUri.java
net.skweez.sipgate.api.xmlrpc.SipgateUriHelper.java
net.skweez.sipgate.api.xmlrpc.SipgateXmlRpcImpl.java
net.skweez.sipgate.db.DataSource.java
net.skweez.sipgate.db.DatabaseHelper.java
net.skweez.sipgate.model.AccountInfo.java
net.skweez.sipgate.service.QueryResultReceiver.java
net.skweez.sipgate.service.QueryService.java