diff --git a/android/app/src/main/assets/capacitor.config.json b/android/app/src/main/assets/capacitor.config.json index 2399c4927..b7bc000c7 100644 --- a/android/app/src/main/assets/capacitor.config.json +++ b/android/app/src/main/assets/capacitor.config.json @@ -16,5 +16,8 @@ "sound" ] } + }, + "server": { + "url": "http://192.168.0.81:8101" } } diff --git a/package-lock.json b/package-lock.json index 4efb94fea..07b5b68ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2194,19 +2194,19 @@ "integrity": "sha512-HCFwOxmK7igEgNm20y+zYi+XQ0OlZYnE4oCaI82TGmA7sehlDpBBKbjmI2Bd8aM09+BXFbAAtq7JCxkEfY8nIg==" }, "@capacitor/filesystem": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@capacitor/filesystem/-/filesystem-1.0.6.tgz", - "integrity": "sha512-8xqUbDZFGBMhgqoBSn9wEd9OBPdHIRegQ9zCCZcpHNf3FFAIby1ck+aDFnoq+Da49xhD6ks1SKCBSxz/26qWTw==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@capacitor/filesystem/-/filesystem-1.1.0.tgz", + "integrity": "sha512-8O3UuvL8HNUEJvZnmn8yUmvgB1evtXfcF0oxIo3YbSlylqywJwS3JTiuhKmsvSxCdpbTy8IaTsutVh3gZgWbKg==" }, "@capacitor/haptics": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@capacitor/haptics/-/haptics-1.1.3.tgz", - "integrity": "sha512-ui2mY/riK1Y4bxnJKJfclWO61obZ0RHmtErPhpmt4wIEVjG1segYdFop45R2PxyEwoUJgzEsAxnviM/T6k8seQ==" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@capacitor/haptics/-/haptics-1.1.4.tgz", + "integrity": "sha512-+pJIb5X7xAcbrWj6rJaV+cwBlv8aFwB1/Ob6EV4atydThuuVSSsAL4hI4ZYlPNOxM6H5s+ZDLj7Pa2os4eFmtg==" }, "@capacitor/ios": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-3.3.0.tgz", - "integrity": "sha512-KImT4hVoQJuAfe01wUYiMLnutMu7PxVCv4c8HVWiW+OuyyOua3lC8wQ5gAauGDugAo6mdM7fVva5a0Vtyhnbdg==" + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-3.4.1.tgz", + "integrity": "sha512-ycFCyKI8DsgedVg7PW5MpCVgqFuD0PMHQGVfC5ichXc2C/jAATX32EVdEMCB0N3guKoH2k6T3Efwg59+Fcdx2w==" }, "@capacitor/keyboard": { "version": "1.1.3", @@ -6881,9 +6881,9 @@ "dev": true }, "capacitor-voice-recorder": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/capacitor-voice-recorder/-/capacitor-voice-recorder-2.0.0.tgz", - "integrity": "sha512-YU0tN8+A963sCYjL9du6jbUqOh5w5dJf++8IFBkuV0sDQZuuLaK//1RypJi0MQLifQESZSjhTVWoXTViIthA/w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/capacitor-voice-recorder/-/capacitor-voice-recorder-2.1.0.tgz", + "integrity": "sha512-H0c/sUVD7cduVS5VqutKk00whyqXZUFi56ChRMl9Ke/LBU71HhHwzonPmheT8i9gQmgOaplc3TOpaKqckXb+3A==", "requires": { "get-blob-duration": "^1.2.0" } diff --git a/package.json b/package.json index 00ed7e276..d7cdfbdb9 100644 --- a/package.json +++ b/package.json @@ -39,9 +39,9 @@ "@capacitor/camera": "^1.2.0", "@capacitor/core": "^3.3.2", "@capacitor/device": "^1.1.0", - "@capacitor/filesystem": "^1.0.6", - "@capacitor/haptics": "^1.1.2", - "@capacitor/ios": "3.3.0", + "@capacitor/filesystem": "^1.1.0", + "@capacitor/haptics": "^1.1.4", + "@capacitor/ios": "3.4.1", "@capacitor/keyboard": "^1.1.2", "@capacitor/local-notifications": "^1.1.0", "@capacitor/network": "^1.0.6", @@ -99,7 +99,7 @@ "angular-tag-cloud-module": "^5.2.2", "bootstrap": "^4.5.0", "build": "0.1.4", - "capacitor-voice-recorder": "^2.0.0", + "capacitor-voice-recorder": "^2.1.0", "ci": "^2.1.1", "cordova": "^10.0.0", "cordova-plugin-crop": "^0.4.0", diff --git a/src/app/pages/chat/messages/messages.page.html b/src/app/pages/chat/messages/messages.page.html index c10e7c24c..cf18ead3b 100644 --- a/src/app/pages/chat/messages/messages.page.html +++ b/src/app/pages/chat/messages/messages.page.html @@ -175,16 +175,19 @@ - + + {{audio}} + + - +
@@ -199,7 +202,7 @@ - diff --git a/src/app/pages/chat/messages/messages.page.ts b/src/app/pages/chat/messages/messages.page.ts index 93b62cb43..60dc2074d 100644 --- a/src/app/pages/chat/messages/messages.page.ts +++ b/src/app/pages/chat/messages/messages.page.ts @@ -20,7 +20,7 @@ import { ChatUserStorage } from 'src/app/store/chat/chat-user.service'; import { environment } from 'src/environments/environment'; import { ThemeService } from 'src/app/services/theme.service' -import { Directory, Encoding, FilesystemDirectory } from '@capacitor/filesystem'; +import { Filesystem, Directory, Encoding } from '@capacitor/filesystem'; import { VoiceRecorder, VoiceRecorderPlugin, RecordingData, GenericResponse, CurrentRecordingStatus } from 'capacitor-voice-recorder'; import { Haptics, ImpactStyle } from '@capacitor/haptics'; import { PreviewCameraPage } from 'src/app/modals/preview-camera/preview-camera.page'; @@ -40,9 +40,9 @@ import { SearchPage } from 'src/app/pages/search/search.page'; import { Storage } from '@ionic/storage'; import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service'; import { Camera, CameraResultType, CameraSource } from '@capacitor/camera'; - import {Plugins} from '@capacitor/core'; +/* import {Plugins} from '@capacitor/core'; - const { Filesystem } = Plugins; + const { Filesystem } = Plugins; */ const IMAGE_DIR = 'stored-images'; @@ -144,7 +144,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { console.log('MEMBER', value) }) - //this.loadFiles(); + this.loadFiles(); VoiceRecorder.requestAudioRecordingPermission(); this.getChatMembers(); Filesystem.mkdir({ @@ -197,13 +197,16 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { directory: Directory.Data }).then(result => { console.log(result); - const temp: any[] = result.files.reverse(); + this.storedFileNames = result.files; + /* const temp: any[] = result.files.reverse(); this.storedFileNames = temp[0]; - console.log(this.storedFileNames); + console.log(this.storedFileNames); */ }) } startRecording() { + console.log('Recording'); + if (this.recording) { return; } @@ -212,6 +215,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { } stopRecording() { + console.log('Stop'); if (!this.recording) { return; } @@ -220,7 +224,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { this.recording = false; if (result.value && result.value.recordDataBase64) { const recordData = result.value.recordDataBase64; - console.log(recordData); + //console.log(recordData); this.myAudio = recordData; const fileName = new Date().getTime() + ".wav"; await Filesystem.writeFile({ diff --git a/src/app/shared/chat/group-messages/group-messages.page.html b/src/app/shared/chat/group-messages/group-messages.page.html index 515af253b..05738dbe3 100644 --- a/src/app/shared/chat/group-messages/group-messages.page.html +++ b/src/app/shared/chat/group-messages/group-messages.page.html @@ -205,14 +205,14 @@ -
+
diff --git a/src/environments/environment.ts b/src/environments/environment.ts index d333a7fd8..6bf93dabc 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -5,7 +5,7 @@ export const environment = { production: false, apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', - // apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', + //apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/', apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket', //apiChatUrl: 'https://www.tabularium.pt/api/v1/',