當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。