Java Code Examples for com.flurry.android.FlurryAgent#logEvent()
The following examples show how to use
com.flurry.android.FlurryAgent#logEvent() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GodotFlurry.java From godot_modules with MIT License | 6 votes |
public void _log_event(String p_name, Dictionary p_params, boolean p_timed) { if (!active) return; if (p_params.size() == 0) { FlurryAgent.logEvent(p_name, null, p_timed); return; }; Map<String, String> params = new HashMap<String, String>(); String[] keys = p_params.get_keys(); for (String key : keys) { params.put(key, p_params.get(key).toString()); }; FlurryAgent.logEvent(p_name, params, p_timed); }
Example 2
Source File: FlurryTest.java From foam with BSD 3-Clause "New" or "Revised" License | 6 votes |
@Test public void testLogEvent() { PowerMockito.mockStatic(FlurryAgent.class); Context mockContext = mock(Context.class); Flurry flurry = new Flurry(null); flurry.logEvent(mockContext, "test_event"); //Switch to verify mode PowerMockito.verifyStatic(); FlurryAgent.onStartSession(eq(mockContext)); FlurryAgent.logEvent(eq("test_event")); FlurryAgent.onEndSession(eq(mockContext)); }
Example 3
Source File: AppViewActivity.java From aptoide-client with GNU General Public License v2.0 | 6 votes |
@Override public boolean onOptionsItemSelected(MenuItem item) { int i = item.getItemId(); if (i == android.R.id.home) { getActivity().onBackPressed(); return true; } else if (i == R.id.menu_share) { FlurryAgent.logEvent("App_View_Clicked_On_Share_Button"); Intent sharingIntent = new Intent(Intent.ACTION_SEND); sharingIntent.setType("text/plain"); sharingIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.install) + " \"" + appName + "\""); sharingIntent.putExtra(Intent.EXTRA_TEXT, wUrl); if (wUrl != null) { startActivity(Intent.createChooser(sharingIntent, getString(R.string.share))); } } else if (i == R.id.menu_schedule) { new AptoideDatabase(Aptoide.getDb()).scheduledDownloadIfMd5(packageName, md5sum, versionName, storeName, appName, iconUrl); } return super.onOptionsItemSelected(item); }
Example 4
Source File: FlurryEventLogger.java From aptoide-client-v8 with GNU General Public License v3.0 | 6 votes |
@Override public void log(String eventName, Map<String, Object> data, AnalyticsManager.Action action, String context) { if (data != null) { FlurryAgent.logEvent(eventName, map(data)); } else { FlurryAgent.logEvent(eventName); } logger.logDebug(TAG, "log() called with: " + "eventName = [" + eventName + "], data = [" + data + "], action = [" + action + "], context = [" + context + "]"); }
Example 5
Source File: FlurryProvider.java From AnalyticsKit-Android with Apache License 2.0 | 5 votes |
/** * @see AnalyticsKitProvider */ @Override public void sendEvent(@NonNull AnalyticsEvent event) throws IllegalStateException { Map<String, String> eventParams = stringifyParameters(event.getAttributes()); if (event.isTimed()) { // start the Flurry SDK event timer for the event if (eventParams != null) { FlurryAgent.logEvent(event.name(), eventParams, true); } else { FlurryAgent.logEvent(event.name(), true); } } else { if (eventParams != null) { FlurryAgent.logEvent(event.name(), eventParams); } else { FlurryAgent.logEvent(event.name()); } } }
Example 6
Source File: Analytics.java From ExtensionsPack with MIT License | 5 votes |
public static void logEvent(String eventId, String params) { Map<String, String> m = new HashMap<String, String>(); m.put("params", params); FlurryAgent.logEvent(eventId, m); localytics.tagEvent(eventId, m); }
Example 7
Source File: DetailActivity.java From KinoCast with MIT License | 5 votes |
@Override protected Boolean doInBackground(Void... params) { Map<String, String> articleParams = new HashMap<>(); articleParams.put("Name", item.getTitle()); articleParams.put("Type", item.getType() == ViewModel.Type.MOVIE ? "Movie" : "Series"); articleParams.put("Id", item.getSlug()); FlurryAgent.logEvent("Content_View", articleParams); item = Parser.getInstance().loadDetail(item); return true; }
Example 8
Source File: FlurryAnalyticsHelper.java From q-municate-android with Apache License 2.0 | 5 votes |
public static void pushAnalyticsData(Context context) { // init Flurry FlurryAgent.setLogEnabled(true); FlurryAgent.init(context, "P8NWM9PBFCK2CWC8KZ59"); Map<String, String> params = new HashMap<>(); //param keys and values have to be of String type params.put("app_id", QBSettings.getInstance().getApplicationId()); params.put("chat_endpoint", QBSettings.getInstance().getChatEndpoint()); //up to 10 params can be logged with each event FlurryAgent.logEvent("connect_to_chat", params); }
Example 9
Source File: Flurry.java From foam with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * {@inheritDoc} */ @Override public void logEvent(Context context, String event) { FlurryAgent.onStartSession(context); FlurryAgent.logEvent(event); FlurryAgent.onEndSession(context); }
Example 10
Source File: TutorialActivity.java From aptoide-client with GNU General Public License v2.0 | 5 votes |
@Override public boolean onOptionsItemSelected(MenuItem item) { int i = item.getItemId(); if (i == R.id.menu_skip) { FlurryAgent.logEvent("Wizard_Skipped_Initial_Wizard"); // if (currentFragment == lastFragment) { // getFragmentsActions(); // runFragmentsActions(); // } finish(); } return super.onOptionsItemSelected(item); }
Example 11
Source File: TutorialActivity.java From aptoide-client with GNU General Public License v2.0 | 5 votes |
@Override public void finish() { FlurryAgent.logEvent("Wizard_Added_Apps_As_Default_Store"); Intent data = new Intent(); data.putExtra("addDefaultRepo", true); setResult(RESULT_OK, data); Log.d("Tutorial-addDefaultRepo", "true"); AptoideUtils.AppUtils.checkPermissions(this); Analytics.Tutorial.finishedTutorial(mViewPager.getCurrentItem()+1); super.finish(); }
Example 12
Source File: FlurryAnalyticsModule.java From react-native-flurry-analytics with MIT License | 4 votes |
@ReactMethod public void logEventWithParameters(String eventName, ReadableMap parameters, boolean timed) { FlurryAgent.logEvent(eventName, toMap(parameters), timed); }
Example 13
Source File: FlurryModule.java From react-native-flurry-sdk with Apache License 2.0 | 4 votes |
@ReactMethod public void logEvent(String eventId) { FlurryAgent.logEvent(eventId); }
Example 14
Source File: FlurryAnalyticsModule.java From react-native-flurry-analytics with MIT License | 4 votes |
@ReactMethod public void logEvent(String eventName, boolean timed) { FlurryAgent.logEvent(eventName, timed); }
Example 15
Source File: EventLogger.java From Loop with Apache License 2.0 | 4 votes |
private static void logFlurryEvent(Event event){ String name = event.getName(); HashMap<String, Object> map = event.getMap(); Map<String, String> flurryMap = new HashMap<>(); for (Object o : map.entrySet()) { Map.Entry pair = (Map.Entry) o; String key = (String) pair.getKey(); Object value = pair.getValue(); flurryMap.put(key, String.valueOf(value)); } FlurryAgent.logEvent(name, flurryMap); }
Example 16
Source File: InformacoesFiscalizacaoActivity.java From vocefiscal-android with Apache License 2.0 | 4 votes |
protected void gravarNaBaseLocalESeguir() { if(voceFiscalDatabase!=null&&voceFiscalDatabase.isOpen()) { voceFiscalDatabase.addFiscalizacao(fiscalizacao); if(fiscalizacao!=null&&fiscalizacao.getIdFiscalizacao()!=null) { FlurryAgent.logEvent("Fiscalizou"); SharedPreferences prefs = getSharedPreferences("vocefiscal", 0); if(prefs!=null) { SharedPreferences.Editor editor = prefs.edit(); if(editor!=null) { if(estado_spinner!=null) editor.putInt(POSICAO_INICIAL_ESTADO, estado_spinner.getSelectedItemPosition()); if(municipio_spinner!=null) editor.putInt(POSICAO_INICIAL_MUNICIPIO, municipio_spinner.getSelectedItemPosition()); editor.commit(); } } Intent intentService = new Intent(getApplicationContext(), UploadManagerService.class); Bundle bundle = new Bundle(); bundle.putInt(UploadManagerService.COMMAND, UploadManagerService.START_UPLOADING); bundle.putLong(UploadManagerService.ID_FISCALIZACAO,fiscalizacao.getIdFiscalizacao()); intentService.putExtras(bundle); startService(intentService); Intent intent = new Intent(getApplicationContext(), FiscalizacaoConcluidaActivity.class); Bundle bundleActivity = new Bundle(); bundleActivity.putString(SECAO, fiscalizacao.getSecaoEleitoral()); bundleActivity.putString(ZONA, fiscalizacao.getZonaEleitoral()); bundleActivity.putString(MUNICIPIO, fiscalizacao.getMunicipio()); intent.putExtras(bundleActivity); startActivity(intent); finish(); }else { voceFiscalDatabase = new VoceFiscalDatabase(this); Toast.makeText(getApplicationContext(), "Não foi possível salvar a fiscalização. Por favor, tente novamente.", Toast.LENGTH_SHORT).show(); } }else { voceFiscalDatabase = new VoceFiscalDatabase(this); Toast.makeText(getApplicationContext(), "Não foi possível salvar a fiscalização. Por favor, tente novamente.", Toast.LENGTH_SHORT).show(); } }
Example 17
Source File: FlurryModule.java From react-native-flurry-sdk with Apache License 2.0 | 4 votes |
@ReactMethod public void logEventParamsTimed(String eventId, ReadableMap parameters, boolean timed) { FlurryAgent.logEvent(eventId, toMap(parameters), timed); }
Example 18
Source File: FlurryModule.java From react-native-flurry-sdk with Apache License 2.0 | 4 votes |
@ReactMethod public void logEventParams(String eventId, ReadableMap parameters) { FlurryAgent.logEvent(eventId, toMap(parameters)); }
Example 19
Source File: Analytics.java From ExtensionsPack with MIT License | 4 votes |
public static void logEvent(String eventId) { FlurryAgent.logEvent(eventId, null); localytics.tagEvent(eventId); }
Example 20
Source File: FlurryModule.java From react-native-flurry-sdk with Apache License 2.0 | 4 votes |
@ReactMethod public void logEventTimed(String eventId, boolean timed) { FlurryAgent.logEvent(eventId, timed); }