本文整理匯總了Java中com.facebook.internal.Validate.sdkInitialized方法的典型用法代碼示例。如果您正苦於以下問題:Java Validate.sdkInitialized方法的具體用法?Java Validate.sdkInitialized怎麽用?Java Validate.sdkInitialized使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.facebook.internal.Validate
的用法示例。
在下文中一共展示了Validate.sdkInitialized方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getApplicationSignature
import com.facebook.internal.Validate; //導入方法依賴的package包/類
public static String getApplicationSignature(Context context) {
Validate.sdkInitialized();
if (context == null) {
return null;
}
PackageManager packageManager = context.getPackageManager();
if (packageManager == null) {
return null;
}
try {
PackageInfo pInfo = packageManager.getPackageInfo(context.getPackageName(), 64);
Signature[] signatures = pInfo.signatures;
if (signatures == null || signatures.length == 0) {
return null;
}
try {
MessageDigest md = MessageDigest.getInstance(CommonUtils.SHA1_INSTANCE);
md.update(pInfo.signatures[0].toByteArray());
return Base64.encodeToString(md.digest(), 9);
} catch (NoSuchAlgorithmException e) {
return null;
}
} catch (NameNotFoundException e2) {
return null;
}
}
示例2: ProfileTracker
import com.facebook.internal.Validate; //導入方法依賴的package包/類
/**
* Constructor.
*/
public ProfileTracker() {
Validate.sdkInitialized();
this.receiver = new ProfileBroadcastReceiver();
this.broadcastManager = LocalBroadcastManager.getInstance(
FacebookSdk.getApplicationContext());
startTracking();
}
示例3: AccessTokenTracker
import com.facebook.internal.Validate; //導入方法依賴的package包/類
/**
* The constructor.
*/
public AccessTokenTracker() {
Validate.sdkInitialized();
this.receiver = new CurrentAccessTokenBroadcastReceiver();
this.broadcastManager = LocalBroadcastManager.getInstance(
FacebookSdk.getApplicationContext());
startTracking();
}
示例4: LoginManager
import com.facebook.internal.Validate; //導入方法依賴的package包/類
LoginManager() {
Validate.sdkInitialized();
}
示例5: getApplicationContext
import com.facebook.internal.Validate; //導入方法依賴的package包/類
/**
* The getter for the context of the current application.
* @return The context of the current application.
*/
public static Context getApplicationContext() {
Validate.sdkInitialized();
return applicationContext;
}
示例6: getOnProgressThreshold
import com.facebook.internal.Validate; //導入方法依賴的package包/類
/**
* Gets the threshold used to report progress on requests.
*/
public static long getOnProgressThreshold() {
Validate.sdkInitialized();
return onProgressThreshold.get();
}
示例7: getCallbackRequestCodeOffset
import com.facebook.internal.Validate; //導入方法依賴的package包/類
public static int getCallbackRequestCodeOffset() {
Validate.sdkInitialized();
return callbackRequestCodeOffset;
}
示例8: getCacheDir
import com.facebook.internal.Validate; //導入方法依賴的package包/類
public static File getCacheDir() {
Validate.sdkInitialized();
return (File) cacheDir.getValue();
}
示例9: getApplicationContext
import com.facebook.internal.Validate; //導入方法依賴的package包/類
public static Context getApplicationContext() {
Validate.sdkInitialized();
return applicationContext;
}
示例10: getLimitEventAndDataUsage
import com.facebook.internal.Validate; //導入方法依賴的package包/類
public static boolean getLimitEventAndDataUsage(Context context) {
Validate.sdkInitialized();
return context.getSharedPreferences("com.facebook.sdk.appEventPreferences", 0).getBoolean("limitEventUsage", false);
}
示例11: getOnProgressThreshold
import com.facebook.internal.Validate; //導入方法依賴的package包/類
public static long getOnProgressThreshold() {
Validate.sdkInitialized();
return onProgressThreshold.get();
}
示例12: getApplicationId
import com.facebook.internal.Validate; //導入方法依賴的package包/類
public static String getApplicationId() {
Validate.sdkInitialized();
return applicationId;
}
示例13: getApplicationName
import com.facebook.internal.Validate; //導入方法依賴的package包/類
public static String getApplicationName() {
Validate.sdkInitialized();
return applicationName;
}
示例14: getClientToken
import com.facebook.internal.Validate; //導入方法依賴的package包/類
public static String getClientToken() {
Validate.sdkInitialized();
return appClientToken;
}
示例15: getWebDialogTheme
import com.facebook.internal.Validate; //導入方法依賴的package包/類
public static int getWebDialogTheme() {
Validate.sdkInitialized();
return webDialogTheme;
}