本文整理匯總了Java中com.facebook.Settings.getApplicationSignature方法的典型用法代碼示例。如果您正苦於以下問題:Java Settings.getApplicationSignature方法的具體用法?Java Settings.getApplicationSignature怎麽用?Java Settings.getApplicationSignature使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.facebook.Settings
的用法示例。
在下文中一共展示了Settings.getApplicationSignature方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getQueryParamsForPlatformActivityIntentWebFallback
import com.facebook.Settings; //導入方法依賴的package包/類
public static Bundle getQueryParamsForPlatformActivityIntentWebFallback(
Context context,
String callId,
int version,
String applicationName,
Bundle methodArgs) {
String keyHash = Settings.getApplicationSignature(context);
if (Utility.isNullOrEmpty(keyHash)) {
return null;
}
Bundle webParams = new Bundle();
webParams.putString(FALLBACK_DIALOG_PARAM_KEY_HASH, keyHash);
webParams.putString(FALLBACK_DIALOG_PARAM_APP_ID, Settings.getApplicationId());
webParams.putInt(FALLBACK_DIALOG_PARAM_VERSION, version);
webParams.putString(DIALOG_PARAM_DISPLAY, FALLBACK_DIALOG_DISPLAY_VALUE_TOUCH);
Bundle bridgeArguments = new Bundle();
bridgeArguments.putString(NativeProtocol.BRIDGE_ARG_ACTION_ID_STRING, callId);
bridgeArguments.putString(NativeProtocol.BRIDGE_ARG_APP_NAME_STRING, applicationName);
methodArgs = (methodArgs == null) ? new Bundle() : methodArgs;
try {
JSONObject bridgeArgsJSON = BundleJSONConverter.convertToJSON(bridgeArguments);
JSONObject methodArgsJSON = BundleJSONConverter.convertToJSON(methodArgs);
if (bridgeArgsJSON == null || methodArgsJSON == null) {
return null;
}
webParams.putString(FALLBACK_DIALOG_PARAM_BRIDGE_ARGS, bridgeArgsJSON.toString());
webParams.putString(FALLBACK_DIALOG_PARAM_METHOD_ARGS, methodArgsJSON.toString());
} catch (JSONException je) {
webParams = null;
Logger.log(LoggingBehavior.DEVELOPER_ERRORS, Log.ERROR, TAG,
"Error creating Url -- " + je);
}
return webParams;
}