Package fire.eagle.android

Source Code of fire.eagle.android.Util

package fire.eagle.android;

import android.content.Intent;
import android.net.Uri;

public class Util
{
  static public String getCallbackUrlScheme()
  {
    return "jfireeagle-android-app";
  }
 
  static public String getCallbackUrl()
  {
    return getCallbackUrlScheme() + "://callback";
  }

  static public boolean isCallback(Intent i)
  {
    if (i == null)
    {
      return false;
    }
   
    Uri uri = i.getData();
   
    return isCallback(uri);
  }
 
  static public boolean isCallback(Uri u)
  {
    if (u == null)
    {
      return false;
    }
    else
    {
      return u.toString().startsWith(getCallbackUrl());
    }
  }
 
  static public String getToken(Uri u)
  {
    return u.getQueryParameter("oauth_token");
  }
 
}
TOP

Related Classes of fire.eagle.android.Util

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.