Search in sources :

Example 6 with AnalyticsApplication

use of com.voipgrid.vialer.analytics.AnalyticsApplication in project vialer-android by VoIPGRID.

the class SipCall method sendMos.

private void sendMos() {
    if (getCallDuration() > 10) {
        float mos = this.calculateMos();
        new AnalyticsHelper(((AnalyticsApplication) mSipService.getApplication()).getDefaultTracker()).sendEvent(mSipService.getString(R.string.analytics_event_category_metrics), mSipService.getString(R.string.analytics_event_action_callmetrics), mSipService.getString(R.string.analytics_event_label_mos, getCodec(), getConnectionType()), (int) (100 * (long) mos));
        mRemoteLogger.e("MOS for CONNECTION: " + ConnectivityHelper.get(mSipService).getConnectionTypeString() + " with value: " + mos);
    }
}
Also used : AnalyticsApplication(com.voipgrid.vialer.analytics.AnalyticsApplication) AnalyticsHelper(com.voipgrid.vialer.analytics.AnalyticsHelper)

Aggregations

AnalyticsApplication (com.voipgrid.vialer.analytics.AnalyticsApplication)6 AnalyticsHelper (com.voipgrid.vialer.analytics.AnalyticsHelper)6 JsonStorage (com.voipgrid.vialer.util.JsonStorage)4 Intent (android.content.Intent)2 SystemUser (com.voipgrid.vialer.api.models.SystemUser)2 RemoteLogger (com.voipgrid.vialer.logging.RemoteLogger)2 SharedPreferences (android.content.SharedPreferences)1 Cursor (android.database.Cursor)1 Uri (android.net.Uri)1 TextView (android.widget.TextView)1 Tracker (com.google.android.gms.analytics.Tracker)1 Preferences (com.voipgrid.vialer.Preferences)1 Api (com.voipgrid.vialer.api.Api)1 Registration (com.voipgrid.vialer.api.Registration)1 PhoneAccount (com.voipgrid.vialer.api.models.PhoneAccount)1 SetupActivity (com.voipgrid.vialer.onboarding.SetupActivity)1 ReachabilityReceiver (com.voipgrid.vialer.reachability.ReachabilityReceiver)1 AccountHelper (com.voipgrid.vialer.util.AccountHelper)1 ProximitySensorHelper (com.voipgrid.vialer.util.ProximitySensorHelper)1 ResponseBody (okhttp3.ResponseBody)1