From 6bbbdd20d5682f11ff2118ebbf9be40ae58a18e9 Mon Sep 17 00:00:00 2001 From: swayangjit Date: Tue, 30 Jul 2019 21:47:50 +0530 Subject: [PATCH] Issue #000 fix: Removed the unit from the output. --- src/android/NetworkSpeedPlugin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android/NetworkSpeedPlugin.java b/src/android/NetworkSpeedPlugin.java index 5b18a9f..cc8b5f8 100644 --- a/src/android/NetworkSpeedPlugin.java +++ b/src/android/NetworkSpeedPlugin.java @@ -82,9 +82,9 @@ private void getNetworkSpeed(CallbackContext callbackContext) { double speed = (double) totalSpeed / 1024; if (speed > 1) { - callbackContext.success(String.valueOf((int) speed) + " KB/s"); + callbackContext.success(String.valueOf((int) speed)); } else { - callbackContext.success(String.format(Locale.ENGLISH, "%.3f", (double) totalSpeed / 1024) + " KB/s"); + callbackContext.success(String.format(Locale.ENGLISH, "%.3f", (double) totalSpeed / 1024)); } } catch (Exception e) { callbackContext.error(e.getMessage());