diff --git a/demo/android/STT/porcupine-stt-demo-app/src/main/java/ai/picovoice/porcupine/sttdemo/MainActivity.java b/demo/android/STT/porcupine-stt-demo-app/src/main/java/ai/picovoice/porcupine/sttdemo/MainActivity.java index edd1742c79..8e270765cf 100644 --- a/demo/android/STT/porcupine-stt-demo-app/src/main/java/ai/picovoice/porcupine/sttdemo/MainActivity.java +++ b/demo/android/STT/porcupine-stt-demo-app/src/main/java/ai/picovoice/porcupine/sttdemo/MainActivity.java @@ -118,9 +118,7 @@ protected void onCreate(Bundle savedInstanceState) { .build(getApplicationContext(), porcupineManagerCallback); } catch (PorcupineInvalidArgumentException e) { - onPorcupineInitError( - String.format("%s\nEnsure your accessKey '%s' is a valid access key.", e.getMessage(), ACCESS_KEY) - ); + onPorcupineInitError(e.getMessage()); } catch (PorcupineActivationException e) { onPorcupineInitError("AccessKey activation error"); } catch (PorcupineActivationLimitException e) { diff --git a/demo/android/Service/porcupine-service-demo-app/src/main/java/ai/picovoice/porcupinedemoservice/PorcupineService.java b/demo/android/Service/porcupine-service-demo-app/src/main/java/ai/picovoice/porcupinedemoservice/PorcupineService.java index e6e52a8afa..437e06c618 100644 --- a/demo/android/Service/porcupine-service-demo-app/src/main/java/ai/picovoice/porcupinedemoservice/PorcupineService.java +++ b/demo/android/Service/porcupine-service-demo-app/src/main/java/ai/picovoice/porcupinedemoservice/PorcupineService.java @@ -83,9 +83,7 @@ public int onStartCommand(Intent intent, int flags, int startId) { porcupineManager.start(); } catch (PorcupineInvalidArgumentException e) { - onPorcupineInitError( - String.format("%s\nEnsure your accessKey '%s' is a valid access key.", e.getMessage(), ACCESS_KEY) - ); + onPorcupineInitError(e.getMessage()); } catch (PorcupineActivationException e) { onPorcupineInitError("AccessKey activation error"); } catch (PorcupineActivationLimitException e) { @@ -95,12 +93,12 @@ public int onStartCommand(Intent intent, int flags, int startId) { } catch (PorcupineActivationThrottledException e) { onPorcupineInitError("AccessKey has been throttled"); } catch (PorcupineException e) { - onPorcupineInitError("Failed to initialize Porcupine " + e.getMessage()); + onPorcupineInitError("Failed to initialize Porcupine: " + e.getMessage()); } Notification notification = porcupineManager == null ? getNotification("Porcupine init failed", "Service will be shut down") : - getNotification("Wake word", "Service running"); + getNotification("Wake word service", "Say 'Porcupine'!"); startForeground(1234, notification); return super.onStartCommand(intent, flags, startId);