当前位置: 首页>>代码示例>>Java>>正文


Java Answers.getInstance方法代码示例

本文整理汇总了Java中com.crashlytics.android.answers.Answers.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java Answers.getInstance方法的具体用法?Java Answers.getInstance怎么用?Java Answers.getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.crashlytics.android.answers.Answers的用法示例。


在下文中一共展示了Answers.getInstance方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.crashlytics.android.answers.Answers; //导入方法依赖的package包/类
@Override public void onCreate() {
  super.onCreate();
  Logger.d(TAG, "Install service is starting");
  final AptoideApplication application = (AptoideApplication) getApplicationContext();
  marketName = application.getMarketName();
  downloadManager = application.getDownloadManager();
  final MinimalAdMapper adMapper = new MinimalAdMapper();
  InstallerFactory installerFactory = new InstallerFactory(adMapper,
      new InstallFabricEvents(Analytics.getInstance(), Answers.getInstance(),
          AppEventsLogger.newLogger(getApplicationContext())), application.getImageCachePath());
  defaultInstaller = installerFactory.create(this, InstallerFactory.DEFAULT);
  rollbackInstaller = installerFactory.create(this, InstallerFactory.ROLLBACK);
  installManager =
      ((AptoideApplication) getApplicationContext()).getInstallManager(InstallerFactory.ROLLBACK);
  subscriptions = new CompositeSubscription();
  setupNotification();
  installerTypeMap = new HashMap();
  analytics = Analytics.getInstance();
  installedRepository = RepositoryFactory.getInstalledRepository(getApplicationContext());
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:21,代码来源:InstallService.java

示例2: provideAnalytics

import com.crashlytics.android.answers.Answers; //导入方法依赖的package包/类
@Provides @Singleton Analytics provideAnalytics() {
    if (BuildConfig.DEBUG) {
        return new Analytics.DebugAnalytics();
    }

    GoogleAnalytics googleAnalytics = GoogleAnalytics.getInstance(app);
    Tracker tracker = googleAnalytics.newTracker(BuildConfig.ANALYTICS_KEY);
    tracker.setSessionTimeout(300); // ms? s? better be s.
    return new Analytics.AnalyticsImpl(tracker, Answers.getInstance());
}
 
开发者ID:tasomaniac,项目名称:MuzeiHistory,代码行数:11,代码来源:AppModule.java

示例3: getDownloadManager

import com.crashlytics.android.answers.Answers; //导入方法依赖的package包/类
public AptoideDownloadManager getDownloadManager() {
  if (downloadManager == null) {
    final String apkPath = getCachePath() + "apks/";
    final String obbPath = getCachePath() + "obb/";
    final OkHttpClient.Builder httpClientBuilder =
        new OkHttpClient.Builder().addInterceptor(getUserAgentInterceptor())
            .addInterceptor(new PaidAppsDownloadInterceptor(getAuthenticationPersistence()))
            .addInterceptor(new DownloadMirrorEventInterceptor(Analytics.getInstance()))
            .connectTimeout(20, TimeUnit.SECONDS)
            .writeTimeout(20, TimeUnit.SECONDS)
            .readTimeout(20, TimeUnit.SECONDS);

    FileUtils.createDir(apkPath);
    FileUtils.createDir(obbPath);
    FileDownloader.init(this, new DownloadMgrInitialParams.InitCustomMaker().connectionCreator(
        new OkHttp3Connection.Creator(httpClientBuilder)));

    downloadManager = new AptoideDownloadManager(AccessorFactory.getAccessorFor(
        ((AptoideApplication) this.getApplicationContext()).getDatabase(), Download.class),
        getCacheHelper(), new FileUtils(action -> Analytics.File.moveFile(action)),
        new DownloadAnalytics(Analytics.getInstance(),
            new DownloadCompleteAnalytics(Analytics.getInstance(), Answers.getInstance(),
                AppEventsLogger.newLogger(this))), FileDownloader.getImpl(), getCachePath(),
        apkPath, obbPath);
  }
  return downloadManager;
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:28,代码来源:AptoideApplication.java

示例4: onCreate

import com.crashlytics.android.answers.Answers; //导入方法依赖的package包/类
@Override public void onCreate(@Nullable Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  final AptoideApplication application =
      (AptoideApplication) getContext().getApplicationContext();
  defaultTheme = application.getDefaultThemeName();
  tokenInvalidator = application.getTokenInvalidator();
  storeCredentialsProvider = new StoreCredentialsProviderImpl(
      AccessorFactory.getAccessorFor(application.getDatabase(),
          cm.aptoide.pt.database.realm.Store.class));
  accountManager = application.getAccountManager();
  bodyInterceptor = application.getAccountSettingsBodyInterceptorPoolV7();
  httpClient = application.getDefaultClient();
  converterFactory = WebService.getDefaultConverter();
  Analytics analytics = Analytics.getInstance();
  issuesAnalytics = new IssuesAnalytics(analytics, Answers.getInstance());
  sharedPreferences = application.getDefaultSharedPreferences();
  timelineAnalytics = new TimelineAnalytics(analytics,
      AppEventsLogger.newLogger(getContext().getApplicationContext()), bodyInterceptor,
      httpClient, converterFactory, tokenInvalidator, BuildConfig.APPLICATION_ID,
      sharedPreferences, application.getNotificationAnalytics(), navigationTracker,
      application.getReadPostsPersistence());
  storeAnalytics = new StoreAnalytics(AppEventsLogger.newLogger(getContext()), analytics);
  marketName = application.getMarketName();
  shareStoreHelper = new ShareStoreHelper(getActivity(), marketName);

  final SearchManager searchManager =
      (SearchManager) getContext().getSystemService(Context.SEARCH_SERVICE);

  final SearchNavigator searchNavigator =
      new SearchNavigator(getFragmentNavigator(), storeName, application.getDefaultStoreName());

  searchBuilder = new SearchBuilder(searchManager, searchNavigator);
  setHasOptionsMenu(true);
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:36,代码来源:StoreFragment.java

示例5: onCreate

import com.crashlytics.android.answers.Answers; //导入方法依赖的package包/类
@Override public void onCreate(@Nullable Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  final AptoideApplication application =
      (AptoideApplication) getContext().getApplicationContext();

  defaultThemeName = application.getDefaultThemeName();
  final SearchManager searchManager =
      (SearchManager) getContext().getSystemService(Context.SEARCH_SERVICE);

  final SearchNavigator searchNavigator =
      new SearchNavigator(getFragmentNavigator(), application.getDefaultStoreName());

  final Analytics analytics = Analytics.getInstance();
  issuesAnalytics = new IssuesAnalytics(analytics, Answers.getInstance());

  searchBuilder = new SearchBuilder(searchManager, searchNavigator);

  drawerAnalytics = new DrawerAnalytics(analytics,
      AppEventsLogger.newLogger(getContext().getApplicationContext()));
  installedRepository =
      RepositoryFactory.getInstalledRepository(getContext().getApplicationContext());
  pageViewsAnalytics =
      new PageViewsAnalytics(AppEventsLogger.newLogger(getContext().getApplicationContext()),
          analytics, navigationTracker);
  setRegisterFragment(false);
  setHasOptionsMenu(true);
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:29,代码来源:HomeFragment.java

示例6: AnalyticsManager

import com.crashlytics.android.answers.Answers; //导入方法依赖的package包/类
public AnalyticsManager(MADBikeApplication instance) {
    this.applicationContext = instance;
    answers = Answers.getInstance();
    logger = AppEventsLogger.newLogger(applicationContext);
}
 
开发者ID:Mun0n,项目名称:MADBike,代码行数:6,代码来源:AnalyticsManager.java

示例7: provideFabricAnswers

import com.crashlytics.android.answers.Answers; //导入方法依赖的package包/类
@Provides
@PerApplication
Answers provideFabricAnswers() {
    return Answers.getInstance();
}
 
开发者ID:Smart-Studio,项目名称:device-info,代码行数:6,代码来源:AnalyticsModule.java

示例8: isInitialized

import com.crashlytics.android.answers.Answers; //导入方法依赖的package包/类
public static boolean isInitialized(){
    return Fabric.isInitialized() && Answers.getInstance() != null;
}
 
开发者ID:adrielcafe,项目名称:NMSAlphabetAndroidApp,代码行数:4,代码来源:AnalyticsUtil.java

示例9: onCreate

import com.crashlytics.android.answers.Answers; //导入方法依赖的package包/类
@Override public void onCreate(@Nullable Bundle savedInstanceState) {
  appViewModel = new AppViewModel();

  super.onCreate(savedInstanceState);

  handleSavedInstance(savedInstanceState);

  final Context applicationContext = getContext().getApplicationContext();
  final AptoideApplication application = (AptoideApplication) applicationContext;
  this.appViewModel.setDefaultTheme(application.getDefaultThemeName());
  this.appViewModel.setMarketName(application.getMarketName());

  final SearchManager searchManager =
      (SearchManager) getContext().getSystemService(Context.SEARCH_SERVICE);

  final SearchNavigator searchNavigator =
      new SearchNavigator(getFragmentNavigator(), application.getDefaultStoreName());

  searchBuilder = new SearchBuilder(searchManager, searchNavigator);

  adMapper = new MinimalAdMapper();

  this.appViewModel.setqManager(application.getQManager());
  purchaseBundleMapper = application.getPurchaseBundleMapper();
  final AptoideAccountManager accountManager = application.getAccountManager();
  accountNavigator = ((ActivityResultNavigator) getContext()).getAccountNavigator();

  installManager = application.getInstallManager(InstallerFactory.ROLLBACK);
  final BodyInterceptor<BaseBody> bodyInterceptor =
      application.getAccountSettingsBodyInterceptorPoolV7();
  billingAnalytics = application.getBillingAnalytics();
  final TokenInvalidator tokenInvalidator = application.getTokenInvalidator();
  httpClient = application.getDefaultClient();
  converterFactory = WebService.getDefaultConverter();
  Analytics analytics = Analytics.getInstance();
  issuesAnalytics = new IssuesAnalytics(analytics, Answers.getInstance());
  ReadPostsPersistence readPostsPersistence =
      ((AptoideApplication) applicationContext).getReadPostsPersistence();
  timelineAnalytics =
      new TimelineAnalytics(analytics, AppEventsLogger.newLogger(applicationContext),
          bodyInterceptor, httpClient, converterFactory, tokenInvalidator,
          BuildConfig.APPLICATION_ID, application.getDefaultSharedPreferences(),
          application.getNotificationAnalytics(), navigationTracker, readPostsPersistence);
  socialRepository =
      new SocialRepository(accountManager, bodyInterceptor, converterFactory, httpClient,
          timelineAnalytics, tokenInvalidator, application.getDefaultSharedPreferences());
  appRepository =
      RepositoryFactory.getAppRepository(getContext(), application.getDefaultSharedPreferences());
  adsRepository = application.getAdsRepository();
  installedRepository = RepositoryFactory.getInstalledRepository(applicationContext);
  storeCredentialsProvider = new StoreCredentialsProviderImpl(AccessorFactory.getAccessorFor(
      ((AptoideApplication) applicationContext.getApplicationContext()).getDatabase(),
      Store.class));
  storedMinimalAdAccessor = AccessorFactory.getAccessorFor(
      ((AptoideApplication) applicationContext.getApplicationContext()).getDatabase(),
      StoredMinimalAd.class);
  final SpotAndShareAnalytics spotAndShareAnalytics = new SpotAndShareAnalytics(analytics);
  final SharedPreferences sharedPreferences = application.getDefaultSharedPreferences();
  appViewAnalytics =
      new AppViewAnalytics(analytics, AppEventsLogger.newLogger(applicationContext),
          bodyInterceptor, httpClient, tokenInvalidator, converterFactory, sharedPreferences);

  appViewSimilarAppAnalytics =
      new AppViewSimilarAppAnalytics(analytics, AppEventsLogger.newLogger(applicationContext));

  installAppRelay = PublishRelay.create();
  shareAppHelper =
      new ShareAppHelper(installedRepository, accountManager, accountNavigator, getActivity(),
          spotAndShareAnalytics, timelineAnalytics, installAppRelay,
          application.getDefaultSharedPreferences(),
          application.isCreateStoreUserPrivacyEnabled());
  downloadFactory = new DownloadFactory(getMarketName());

  storeAnalytics = new StoreAnalytics(AppEventsLogger.newLogger(applicationContext), analytics);
  notLoggedInShareAnalytics = application.getNotLoggedInShareAnalytics();
  navigationTracker = application.getNavigationTracker();
  setHasOptionsMenu(true);
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:79,代码来源:AppViewFragment.java

示例10: onCreate

import com.crashlytics.android.answers.Answers; //导入方法依赖的package包/类
@Override public void onCreate(@Nullable Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  crashReport = CrashReport.getInstance();

  viewModel = loadViewModel(getArguments());

  final android.app.SearchManager searchManagerService =
      (android.app.SearchManager) getContext().getSystemService(Context.SEARCH_SERVICE);

  searchNavigator = new SearchNavigator(getFragmentNavigator(), viewModel.getStoreName(),
      viewModel.getDefaultStoreName());

  searchBuilder =
      new SearchBuilder(searchManagerService, searchNavigator, viewModel.getCurrentQuery());

  final AptoideApplication applicationContext =
      (AptoideApplication) getContext().getApplicationContext();

  final SharedPreferences sharedPreferences = applicationContext.getDefaultSharedPreferences();

  final TokenInvalidator tokenInvalidator = applicationContext.getTokenInvalidator();

  final BodyInterceptor<BaseBody> bodyInterceptor =
      applicationContext.getAccountSettingsBodyInterceptorPoolV7();

  final OkHttpClient httpClient = applicationContext.getDefaultClient();

  final Converter.Factory converterFactory = WebService.getDefaultConverter();

  final Analytics analytics = Analytics.getInstance();
  searchAnalytics = new SearchAnalytics(analytics, AppEventsLogger.newLogger(applicationContext));

  issuesAnalytics = new IssuesAnalytics(analytics, Answers.getInstance());

  final StoreAccessor storeAccessor =
      AccessorFactory.getAccessorFor(applicationContext.getDatabase(), Store.class);
  final HashMapNotNull<String, List<String>> subscribedStoresAuthMap =
      StoreUtils.getSubscribedStoresAuthMap(storeAccessor);
  final List<Long> subscribedStoresIds = StoreUtils.getSubscribedStoresIds(storeAccessor);
  final AdsRepository adsRepository = application.getAdsRepository();

  defaultThemeName = application.getDefaultThemeName();
  defaultStoreName = application.getDefaultStoreName();
  isMultiStoreSearch = application.hasMultiStoreSearch();

  searchManager =
      new SearchManager(sharedPreferences, tokenInvalidator, bodyInterceptor, httpClient,
          converterFactory, subscribedStoresAuthMap, subscribedStoresIds, adsRepository);

  mainThreadScheduler = AndroidSchedulers.mainThread();
  searchNavigator = new SearchNavigator(getFragmentNavigator(), getDefaultStore());

  onItemViewClickRelay = PublishRelay.create();
  onOpenPopupMenuClickRelay = PublishRelay.create();
  onAdClickRelay = PublishRelay.create();

  final List<SearchAppResult> searchResultFollowedStores = new ArrayList<>();
  final List<SearchAdResult> searchResultAdsFollowedStores = new ArrayList<>();

  followedStoresResultAdapter =
      new SearchResultAdapter(onAdClickRelay, onItemViewClickRelay, onOpenPopupMenuClickRelay,
          searchResultFollowedStores, searchResultAdsFollowedStores, crashReport);

  listItemPadding = getResources().getDimension(R.dimen.padding_very_very_small);

  final List<SearchAppResult> searchResultAllStores = new ArrayList<>();
  final List<SearchAdResult> searchResultAdsAllStores = new ArrayList<>();

  allStoresResultAdapter =
      new SearchResultAdapter(onAdClickRelay, onItemViewClickRelay, onOpenPopupMenuClickRelay,
          searchResultAllStores, searchResultAdsAllStores, crashReport);
  setHasOptionsMenu(true);
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:75,代码来源:SearchResultFragment.java

示例11: onCreate

import com.crashlytics.android.answers.Answers; //导入方法依赖的package包/类
@Override public void onCreate(@Nullable Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  handleSavedInstance(savedInstanceState);

  final AptoideApplication application =
      (AptoideApplication) getContext().getApplicationContext();
  this.appViewModel.setDefaultTheme(application.getDefaultThemeName());
  this.appViewModel.setMarketName(application.getMarketName());

  final SearchManager searchManager =
      (SearchManager) getContext().getSystemService(Context.SEARCH_SERVICE);

  final SearchNavigator searchNavigator =
      new SearchNavigator(getFragmentNavigator(), application.getDefaultStoreName());

  searchBuilder = new SearchBuilder(searchManager, searchNavigator);

  adMapper = new MinimalAdMapper();
  qManager = ((AptoideApplication) getContext().getApplicationContext()).getQManager();
  purchaseBundleMapper =
      ((AptoideApplication) getContext().getApplicationContext()).getPurchaseBundleMapper();
  final AptoideAccountManager accountManager =
      ((AptoideApplication) getContext().getApplicationContext()).getAccountManager();
  accountNavigator = ((ActivityResultNavigator) getContext()).getAccountNavigator();

  installManager = ((AptoideApplication) getContext().getApplicationContext()).getInstallManager(
      InstallerFactory.ROLLBACK);
  final BodyInterceptor<BaseBody> bodyInterceptor =
      ((AptoideApplication) getContext().getApplicationContext()).getAccountSettingsBodyInterceptorPoolV7();
  billingAnalytics =
      ((AptoideApplication) getContext().getApplicationContext()).getBillingAnalytics();
  final TokenInvalidator tokenInvalidator =
      ((AptoideApplication) getContext().getApplicationContext()).getTokenInvalidator();
  httpClient = ((AptoideApplication) getContext().getApplicationContext()).getDefaultClient();
  converterFactory = WebService.getDefaultConverter();
  Analytics analytics = Analytics.getInstance();
  issuesAnalytics = new IssuesAnalytics(analytics, Answers.getInstance());

  installAnalytics = new InstallAnalytics(analytics,
      AppEventsLogger.newLogger(getContext().getApplicationContext()));

  SharedPreferences sharedPreferences = application.getDefaultSharedPreferences();
  timelineAnalytics = new TimelineAnalytics(analytics,
      AppEventsLogger.newLogger(getContext().getApplicationContext()), bodyInterceptor,
      httpClient, converterFactory, tokenInvalidator, BuildConfig.APPLICATION_ID,
      sharedPreferences, application.getNotificationAnalytics(), navigationTracker,
      application.getReadPostsPersistence());
  socialRepository =
      new SocialRepository(accountManager, bodyInterceptor, converterFactory, httpClient,
          timelineAnalytics, tokenInvalidator, sharedPreferences);
  appRepository = RepositoryFactory.getAppRepository(getContext(), sharedPreferences);
  adsRepository = application.getAdsRepository();
  installedRepository =
      RepositoryFactory.getInstalledRepository(getContext().getApplicationContext());
  storeCredentialsProvider = new StoreCredentialsProviderImpl(AccessorFactory.getAccessorFor(
      ((AptoideApplication) getContext().getApplicationContext()
          .getApplicationContext()).getDatabase(), Store.class));
  storedMinimalAdAccessor = AccessorFactory.getAccessorFor(
      ((AptoideApplication) getContext().getApplicationContext()
          .getApplicationContext()).getDatabase(), StoredMinimalAd.class);
  final SpotAndShareAnalytics spotAndShareAnalytics = new SpotAndShareAnalytics(analytics);
  appViewAnalytics = new AppViewAnalytics(analytics,
      AppEventsLogger.newLogger(getContext().getApplicationContext()), bodyInterceptor,
      httpClient, tokenInvalidator, converterFactory, sharedPreferences);
  appViewSimilarAppAnalytics = new AppViewSimilarAppAnalytics(analytics,
      AppEventsLogger.newLogger(getContext().getApplicationContext()));

  installAppRelay = PublishRelay.create();
  shareAppHelper =
      new ShareAppHelper(installedRepository, accountManager, accountNavigator, getActivity(),
          spotAndShareAnalytics, timelineAnalytics, installAppRelay, sharedPreferences,
          application.isCreateStoreUserPrivacyEnabled());
  downloadFactory = new DownloadFactory(getMarketName());
  storeAnalytics =
      new StoreAnalytics(AppEventsLogger.newLogger(getContext().getApplicationContext()),
          analytics);
  notLoggedInShareAnalytics = application.getNotLoggedInShareAnalytics();
  navigationTracker = application.getNavigationTracker();
  setHasOptionsMenu(true);
}
 
开发者ID:Aptoide,项目名称:aptoide-client-v8,代码行数:82,代码来源:AppViewFragment.java


注:本文中的com.crashlytics.android.answers.Answers.getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。