本文整理汇总了Java中io.fabric.sdk.android.Kit类的典型用法代码示例。如果您正苦于以下问题:Java Kit类的具体用法?Java Kit怎么用?Java Kit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Kit类属于io.fabric.sdk.android包,在下文中一共展示了Kit类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:JackChan1999,项目名称:letv,代码行数:22,代码来源:Settings.java
示例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());
}
}
}
开发者ID:JackChan1999,项目名称:letv,代码行数:25,代码来源:IdManager.java
示例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();
}
开发者ID:JackChan1999,项目名称:letv,代码行数:9,代码来源:FileStoreImpl.java
示例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;
}
开发者ID:JackChan1999,项目名称:letv,代码行数:9,代码来源:DefaultSettingsController.java
示例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;
}
}
开发者ID:JackChan1999,项目名称:letv,代码行数:14,代码来源:AbstractSpiCall.java
示例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);
}
开发者ID:JackChan1999,项目名称:letv,代码行数:14,代码来源:IdManager.java
示例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()]);
}
开发者ID:edx,项目名称:edx-app-android,代码行数:14,代码来源:Config.java
示例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}));
}
开发者ID:JackChan1999,项目名称:letv,代码行数:7,代码来源:Crashlytics.java
示例9: getKits
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public Collection<? extends Kit> getKits() {
return this.kits;
}
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:Crashlytics.java
示例10: PreferenceStoreImpl
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
@Deprecated
public PreferenceStoreImpl(Kit kit) {
this(kit.getContext(), kit.getClass().getName());
}
开发者ID:JackChan1999,项目名称:letv,代码行数:5,代码来源:PreferenceStoreImpl.java
示例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);
}
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:UpdateAppSpiCall.java
示例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);
}
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:DefaultSettingsSpiCall.java
示例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);
}
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:AbstractAppSpiCall.java
示例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);
}
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:CreateAppSpiCall.java
示例15: DefaultCachedSettingsIo
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public DefaultCachedSettingsIo(Kit kit) {
this.kit = kit;
}
开发者ID:JackChan1999,项目名称:letv,代码行数:4,代码来源:DefaultCachedSettingsIo.java
示例16: testGetIdentifier
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public void testGetIdentifier() {
final Kit kit = new Digits();
final String identifier = BuildConfig.GROUP + ":" + BuildConfig.ARTIFACT_ID;
assertEquals(identifier, kit.getIdentifier());
}
开发者ID:crashlytics,项目名称:digits-android,代码行数:6,代码来源:DigitsTest.java
示例17: list
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public static Kit[] list(TwitterAuthConfig authConfig) {
return new Kit[]{new Twitter(authConfig)};
}
开发者ID:TruckMuncher,项目名称:TruckMuncher-Android,代码行数:4,代码来源:FabricKits.java
示例18: list
import io.fabric.sdk.android.Kit; //导入依赖的package包/类
public static Kit[] list(TwitterAuthConfig authConfig) {
return new Kit[]{new Twitter(authConfig), new Crashlytics()};
}
开发者ID:TruckMuncher,项目名称:TruckMuncher-Android,代码行数:4,代码来源:FabricKits.java
注:本文中的io.fabric.sdk.android.Kit类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论