本文整理汇总了Java中com.google.samples.apps.iosched.Config.IS_DOGFOOD_BUILD属性的典型用法代码示例。如果您正苦于以下问题:Java Config.IS_DOGFOOD_BUILD属性的具体用法?Java Config.IS_DOGFOOD_BUILD怎么用?Java Config.IS_DOGFOOD_BUILD使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.google.samples.apps.iosched.Config
的用法示例。
在下文中一共展示了Config.IS_DOGFOOD_BUILD属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onResume
@Override
public void onResume() {
super.onResume();
// Shows the debug warning, if this is a debug build and the warning has not been shown yet
if (Config.IS_DOGFOOD_BUILD && !PrefUtils.wasDebugWarningShown(this)) {
new AlertDialog.Builder(this)
.setTitle(Config.DOGFOOD_BUILD_WARNING_TITLE)
.setMessage(Config.DOGFOOD_BUILD_WARNING_TEXT)
.setPositiveButton(android.R.string.ok, null).show();
PrefUtils.markDebugWarningShown(this);
}
}
示例2: onStart
@Override
public void onStart() {
super.onStart();
AnalyticsManager.initializeAnalyticsTracker(getApplicationContext());
// Check for NFC data
Intent i = getIntent();
if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(i.getAction())) {
LOGI(TAG, "Badge detected");
/* [ANALYTICS:EVENT]
* TRIGGER: Scan another attendee's badge.
* CATEGORY: 'NFC'
* ACTION: 'Read'
* LABEL: 'Badge'. Badge info IS NOT collected.
* [/ANALYTICS]
*/
AnalyticsManager.sendEvent("NFC", "Read", "Badge");
readTag((Tag) i.getParcelableExtra(NfcAdapter.EXTRA_TAG));
} else if (ACTION_SIMULATE.equals(i.getAction()) && Config.IS_DOGFOOD_BUILD) {
String simulatedUrl = i.getDataString();
LOGD(TAG, "Simulating badge scanning with URL " + simulatedUrl);
// replace https by Unicode character 4, as per normal badge encoding rules
recordBadge(simulatedUrl.replace("https://", "\u0004"));
} else {
LOGW(TAG, "Invalid action in Intent to NfcBadgeActivity: " + i.getAction());
}
finish();
}
示例3: LOGD
public static void LOGD(final String tag, String message) {
//noinspection PointlessBooleanExpression,ConstantConditions
if (BuildConfig.DEBUG || Config.IS_DOGFOOD_BUILD || Log.isLoggable(tag, Log.DEBUG)) {
Log.d(tag, message);
}
}