apps-sdk 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apps-sdk",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Apps SDK - Compatible with Expo SDK 54 + React 19",
5
5
  "main": "index.js",
6
6
  "author": "ASD",
@@ -3,6 +3,8 @@ import { ExpoSpeechRecognitionModule } from 'expo-speech-recognition';
3
3
  import Session from "./Session";
4
4
  import * as Speech from 'expo-speech';
5
5
  import { franc } from 'franc-min';
6
+ import Networking from './Networking';
7
+ import MixPanel from './MixPanel';
6
8
 
7
9
  class VoiceService {
8
10
  constructor() {
@@ -15,9 +17,18 @@ class VoiceService {
15
17
  try {
16
18
  const { status } = await ExpoSpeechRecognitionModule.requestPermissionsAsync();
17
19
  if (status !== 'granted') {
20
+ Networking.sendEvent('other', 'speech_permission_denied');
21
+ MixPanel.trackEvent('speech_permission_denied');
22
+ Networking.sendEvent('other', 'microphone_permission_denied');
23
+ MixPanel.trackEvent('microphone_permission_denied');
18
24
  throw new Error('Speech recognition permission not granted');
19
25
  }
20
26
 
27
+ Networking.sendEvent('other', 'speech_permission_granted');
28
+ MixPanel.trackEvent('speech_permission_granted');
29
+ Networking.sendEvent('other', 'microphone_permission_granted');
30
+ MixPanel.trackEvent('microphone_permission_granted');
31
+
21
32
  let language = Session.getDeviceLanguageAndRegion();
22
33
  language = this.normalizeLocale(language);
23
34