本文整理汇总了Java中io.fabric.sdk.android.Kit类的典型用法代码示例。如果您正苦于以下问题:Java Kit类的具体用法?Java Kit怎么用?Java Kit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Kit类属于io.fabric.sdk.android包,在下文中一共展示了Kit类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public synchronized Settings initialize(Kit kit, IdManager idManager, HttpRequestFactory httpRequestFactory, String versionCode, String versionName, String urlEndpoint) {
Settings this;
if (this.initialized) {
this = this;
} else {
if (this.settingsController == null) {
Context context = kit.getContext();
String appIdentifier = idManager.getAppIdentifier();
String apiKey = new ApiKey().getValue(context);
String installerPackageName = idManager.getInstallerPackageName();
CurrentTimeProvider currentTimeProvider = new SystemCurrentTimeProvider();
SettingsJsonTransform settingsJsonTransform = new DefaultSettingsJsonTransform();
CachedSettingsIo defaultCachedSettingsIo = new DefaultCachedSettingsIo(kit);
String iconHash = CommonUtils.getAppIconHashOrNull(context);
this.settingsController = new DefaultSettingsController(kit, new SettingsRequest(apiKey, idManager.getModelName(), idManager.getOsBuildVersionString(), idManager.getOsDisplayVersionString(), idManager.getAdvertisingId(), idManager.getAppInstallIdentifier(), idManager.getAndroidId(), CommonUtils.createInstanceIdFrom(CommonUtils.resolveBuildId(context)), versionName, versionCode, DeliveryMechanism.determineFrom(installerPackageName).getId(), iconHash), currentTimeProvider, settingsJsonTransform, defaultCachedSettingsIo, new DefaultSettingsSpiCall(kit, urlEndpoint, String.format(Locale.US, SETTINGS_URL_FORMAT, new Object[]{appIdentifier}), httpRequestFactory));
}
this.initialized = true;
this = this;
}
return this;
}
示例2: IdManager
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public IdManager(Context appContext, String appIdentifier, String appInstallIdentifier, Collection<Kit> kits) {
if (appContext == null) {
throw new IllegalArgumentException("appContext must not be null");
} else if (appIdentifier == null) {
throw new IllegalArgumentException("appIdentifier must not be null");
} else if (kits == null) {
throw new IllegalArgumentException("kits must not be null");
} else {
this.appContext = appContext;
this.appIdentifier = appIdentifier;
this.appInstallIdentifier = appInstallIdentifier;
this.kits = kits;
this.installerPackageNameProvider = new InstallerPackageNameProvider();
this.advertisingInfoProvider = new AdvertisingInfoProvider(appContext);
this.collectHardwareIds = CommonUtils.getBooleanResourceValue(appContext, COLLECT_DEVICE_IDENTIFIERS, true);
if (!this.collectHardwareIds) {
Fabric.getLogger().d(Fabric.TAG, "Device ID collection disabled for " + appContext.getPackageName());
}
this.collectUserIds = CommonUtils.getBooleanResourceValue(appContext, COLLECT_USER_IDENTIFIERS, true);
if (!this.collectUserIds) {
Fabric.getLogger().d(Fabric.TAG, "User information collection disabled for " + appContext.getPackageName());
}
}
}
示例3: FileStoreImpl
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public FileStoreImpl(Kit kit) {
if (kit.getContext() == null) {
throw new IllegalStateException("Cannot get directory before context has been set. Call Fabric.with() first");
}
this.context = kit.getContext();
this.contentPath = kit.getPath();
this.legacySupport = "Android/" + this.context.getPackageName();
}
示例4: DefaultSettingsController
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public DefaultSettingsController(Kit kit, SettingsRequest settingsRequest, CurrentTimeProvider currentTimeProvider, SettingsJsonTransform settingsJsonTransform, CachedSettingsIo cachedSettingsIo, SettingsSpiCall settingsSpiCall) {
this.kit = kit;
this.settingsRequest = settingsRequest;
this.currentTimeProvider = currentTimeProvider;
this.settingsJsonTransform = settingsJsonTransform;
this.cachedSettingsIo = cachedSettingsIo;
this.settingsSpiCall = settingsSpiCall;
}
示例5: AbstractSpiCall
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public AbstractSpiCall(Kit kit, String protocolAndHostOverride, String url, HttpRequestFactory requestFactory, HttpMethod method) {
if (url == null) {
throw new IllegalArgumentException("url must not be null.");
} else if (requestFactory == null) {
throw new IllegalArgumentException("requestFactory must not be null.");
} else {
this.kit = kit;
this.protocolAndHostOverride = protocolAndHostOverride;
this.url = overrideProtocolAndHost(url);
this.requestFactory = requestFactory;
this.method = method;
}
}
示例6: getDeviceIdentifiers
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public Map<DeviceIdentifierType, String> getDeviceIdentifiers() {
Map<DeviceIdentifierType, String> ids = new HashMap();
for (Kit kit : this.kits) {
if (kit instanceof DeviceIdentifierProvider) {
for (Entry<DeviceIdentifierType, String> entry : ((DeviceIdentifierProvider) kit).getDeviceIdentifiers().entrySet()) {
putNonNullIdInto(ids, (DeviceIdentifierType) entry.getKey(), (String) entry.getValue());
}
}
}
putNonNullIdInto(ids, DeviceIdentifierType.ANDROID_ID, getAndroidId());
putNonNullIdInto(ids, DeviceIdentifierType.ANDROID_ADVERTISING_ID, getAdvertisingId());
return Collections.unmodifiableMap(ids);
}
示例7: getEnabledKits
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public Kit[] getEnabledKits() {
List<Kit> fabricKits = new ArrayList<>();
if (isCrashlyticsEnabled()) {
fabricKits.add(new CrashlyticsCore());
}
if (isAnswersEnabled()) {
fabricKits.add(new Answers());
}
return fabricKits.toArray(new Kit[fabricKits.size()]);
}
示例8: Crashlytics
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
Crashlytics(Answers answers, Beta beta, CrashlyticsCore core) {
this.answers = answers;
this.beta = beta;
this.core = core;
this.kits = Collections.unmodifiableCollection(Arrays.asList(new Kit[]{answers, beta, core}));
}
示例9: getKits
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public Collection<? extends Kit> getKits() {
return this.kits;
}
示例10: PreferenceStoreImpl
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
@Deprecated
public PreferenceStoreImpl(Kit kit) {
this(kit.getContext(), kit.getClass().getName());
}
示例11: UpdateAppSpiCall
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public UpdateAppSpiCall(Kit kit, String protocolAndHostOverride, String url, HttpRequestFactory requestFactory) {
super(kit, protocolAndHostOverride, url, requestFactory, HttpMethod.PUT);
}
示例12: DefaultSettingsSpiCall
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public DefaultSettingsSpiCall(Kit kit, String protocolAndHostOverride, String url, HttpRequestFactory requestFactory) {
this(kit, protocolAndHostOverride, url, requestFactory, HttpMethod.GET);
}
示例13: AbstractAppSpiCall
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public AbstractAppSpiCall(Kit kit, String protocolAndHostOverride, String url, HttpRequestFactory requestFactory, HttpMethod method) {
super(kit, protocolAndHostOverride, url, requestFactory, method);
}
示例14: CreateAppSpiCall
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public CreateAppSpiCall(Kit kit, String protocolAndHostOverride, String url, HttpRequestFactory requestFactory) {
super(kit, protocolAndHostOverride, url, requestFactory, HttpMethod.POST);
}
示例15: DefaultCachedSettingsIo
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public DefaultCachedSettingsIo(Kit kit) {
this.kit = kit;
}