mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
using in call manager to adjust phone during call
This commit is contained in:
parent
3efe2f75ab
commit
adbb07da30
@ -516,7 +516,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.10;
|
MARKETING_VERSION = 1.11;
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"-ObjC",
|
"-ObjC",
|
||||||
@ -549,7 +549,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.10;
|
MARKETING_VERSION = 1.11;
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"-ObjC",
|
"-ObjC",
|
||||||
@ -571,7 +571,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
|
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
@ -643,7 +643,7 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
|
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
@ -427,6 +427,8 @@ PODS:
|
|||||||
- React-jsi (= 0.71.3)
|
- React-jsi (= 0.71.3)
|
||||||
- React-logger (= 0.71.3)
|
- React-logger (= 0.71.3)
|
||||||
- React-perflogger (= 0.71.3)
|
- React-perflogger (= 0.71.3)
|
||||||
|
- ReactNativeIncallManager (4.0.1):
|
||||||
|
- React-Core
|
||||||
- RNCClipboard (1.11.1):
|
- RNCClipboard (1.11.1):
|
||||||
- React-Core
|
- React-Core
|
||||||
- RNDeviceInfo (10.4.0):
|
- RNDeviceInfo (10.4.0):
|
||||||
@ -528,6 +530,7 @@ DEPENDENCIES:
|
|||||||
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
|
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
|
||||||
- React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
|
- React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
|
||||||
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
|
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
|
||||||
|
- ReactNativeIncallManager (from `../node_modules/react-native-incall-manager`)
|
||||||
- "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)"
|
- "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)"
|
||||||
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
|
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
|
||||||
- "RNFBApp (from `../node_modules/@react-native-firebase/app`)"
|
- "RNFBApp (from `../node_modules/@react-native-firebase/app`)"
|
||||||
@ -637,6 +640,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: "../node_modules/react-native/ReactCommon/runtimeexecutor"
|
:path: "../node_modules/react-native/ReactCommon/runtimeexecutor"
|
||||||
ReactCommon:
|
ReactCommon:
|
||||||
:path: "../node_modules/react-native/ReactCommon"
|
:path: "../node_modules/react-native/ReactCommon"
|
||||||
|
ReactNativeIncallManager:
|
||||||
|
:path: "../node_modules/react-native-incall-manager"
|
||||||
RNCClipboard:
|
RNCClipboard:
|
||||||
:path: "../node_modules/@react-native-clipboard/clipboard"
|
:path: "../node_modules/@react-native-clipboard/clipboard"
|
||||||
RNDeviceInfo:
|
RNDeviceInfo:
|
||||||
@ -712,6 +717,7 @@ SPEC CHECKSUMS:
|
|||||||
React-RCTVibration: 5199a180d04873366a83855de55ac33ce60fe4d5
|
React-RCTVibration: 5199a180d04873366a83855de55ac33ce60fe4d5
|
||||||
React-runtimeexecutor: 7bf0dafc7b727d93c8cb94eb00a9d3753c446c3e
|
React-runtimeexecutor: 7bf0dafc7b727d93c8cb94eb00a9d3753c446c3e
|
||||||
ReactCommon: 5f9a24e64c1c3e2b719014f07cb2acf628983000
|
ReactCommon: 5f9a24e64c1c3e2b719014f07cb2acf628983000
|
||||||
|
ReactNativeIncallManager: 0d2cf9f4d50359728a30c08549762fe67a2efb81
|
||||||
RNCClipboard: 2834e1c4af68697089cdd455ee4a4cdd198fa7dd
|
RNCClipboard: 2834e1c4af68697089cdd455ee4a4cdd198fa7dd
|
||||||
RNDeviceInfo: 749f2e049dcd79e2e44f134f66b73a06951b5066
|
RNDeviceInfo: 749f2e049dcd79e2e44f134f66b73a06951b5066
|
||||||
RNFBApp: 4f8ea53443d52c7db793234d2398a357fc6cfbf1
|
RNFBApp: 4f8ea53443d52c7db793234d2398a357fc6cfbf1
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
"react-native-document-picker": "^8.1.3",
|
"react-native-document-picker": "^8.1.3",
|
||||||
"react-native-gesture-handler": "^2.9.0",
|
"react-native-gesture-handler": "^2.9.0",
|
||||||
"react-native-image-crop-picker": "^0.39.0",
|
"react-native-image-crop-picker": "^0.39.0",
|
||||||
|
"react-native-incall-manager": "^4.0.1",
|
||||||
"react-native-reanimated": "^2.14.4",
|
"react-native-reanimated": "^2.14.4",
|
||||||
"react-native-reanimated-carousel": "^3.3.0",
|
"react-native-reanimated-carousel": "^3.3.0",
|
||||||
"react-native-rsa-native": "^2.0.5",
|
"react-native-rsa-native": "^2.0.5",
|
||||||
|
@ -6,6 +6,7 @@ import { addCall } from 'api/addCall';
|
|||||||
import { keepCall } from 'api/keepCall';
|
import { keepCall } from 'api/keepCall';
|
||||||
import { removeCall } from 'api/removeCall';
|
import { removeCall } from 'api/removeCall';
|
||||||
import { removeContactCall } from 'api/removeContactCall';
|
import { removeContactCall } from 'api/removeContactCall';
|
||||||
|
import InCallManager from 'react-native-incall-manager';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ScreenCapturePickerView,
|
ScreenCapturePickerView,
|
||||||
@ -203,6 +204,7 @@ export function useRingContext() {
|
|||||||
}
|
}
|
||||||
if (event.track.kind === 'video') {
|
if (event.track.kind === 'video') {
|
||||||
updateState({ remoteVideo: true });
|
updateState({ remoteVideo: true });
|
||||||
|
InCallManager.setForceSpeakerphoneOn(true);
|
||||||
}
|
}
|
||||||
stream.current.addTrack(event.track, stream.current);
|
stream.current.addTrack(event.track, stream.current);
|
||||||
} );
|
} );
|
||||||
@ -252,6 +254,7 @@ export function useRingContext() {
|
|||||||
updateState({ callStatus: "connected" });
|
updateState({ callStatus: "connected" });
|
||||||
if (policy === 'polite') {
|
if (policy === 'polite') {
|
||||||
connected.current = true;
|
connected.current = true;
|
||||||
|
InCallManager.start({media: 'audio'});
|
||||||
transmit('polite');
|
transmit('polite');
|
||||||
polite();
|
polite();
|
||||||
}
|
}
|
||||||
@ -289,6 +292,8 @@ export function useRingContext() {
|
|||||||
}
|
}
|
||||||
clearRing();
|
clearRing();
|
||||||
clearAlive();
|
clearAlive();
|
||||||
|
InCallManager.stop();
|
||||||
|
connected.current = false;
|
||||||
calling.current = null;
|
calling.current = null;
|
||||||
if (videoTrack.current) {
|
if (videoTrack.current) {
|
||||||
videoTrack.current.stop();
|
videoTrack.current.stop();
|
||||||
@ -304,6 +309,7 @@ export function useRingContext() {
|
|||||||
ws.current.send(JSON.stringify({ AppToken: token }));
|
ws.current.send(JSON.stringify({ AppToken: token }));
|
||||||
if (policy === 'impolite') {
|
if (policy === 'impolite') {
|
||||||
connected.current = true;
|
connected.current = true;
|
||||||
|
InCallManager.start({media: 'audio'});
|
||||||
transmit('impolite');
|
transmit('impolite');
|
||||||
impolite();
|
impolite();
|
||||||
}
|
}
|
||||||
@ -454,7 +460,9 @@ export function useRingContext() {
|
|||||||
if (track.kind === 'video') {
|
if (track.kind === 'video') {
|
||||||
videoTrack.current = track;
|
videoTrack.current = track;
|
||||||
pc.current.addTrack(track, stream);
|
pc.current.addTrack(track, stream);
|
||||||
updateState({ localVideo: true });
|
const localStream = new MediaStream();
|
||||||
|
localStream.addTrack(track, localStream);
|
||||||
|
updateState({ localVideo: true, localStream });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { View, ScrollView, TouchableOpacity, StatusBar, Text, Image, Modal } from 'react-native';
|
import { Alert, View, ScrollView, TouchableOpacity, StatusBar, Text, Image, Modal } from 'react-native';
|
||||||
import { useState, useEffect, useContext } from 'react';
|
import { useState, useEffect, useContext } from 'react';
|
||||||
import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context';
|
import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context';
|
||||||
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
||||||
@ -25,6 +25,7 @@ import { ProfileIcon } from './profileIcon/ProfileIcon';
|
|||||||
import { CardsIcon } from './cardsIcon/CardsIcon';
|
import { CardsIcon } from './cardsIcon/CardsIcon';
|
||||||
import { Logo } from 'utils/Logo';
|
import { Logo } from 'utils/Logo';
|
||||||
import { Call } from './call/Call';
|
import { Call } from './call/Call';
|
||||||
|
import { DeviceEventEmitter } from 'react-native';
|
||||||
import splash from 'images/session.png';
|
import splash from 'images/session.png';
|
||||||
|
|
||||||
const ConversationStack = createStackNavigator();
|
const ConversationStack = createStackNavigator();
|
||||||
@ -326,6 +327,13 @@ export function Session() {
|
|||||||
setDmChannel({ id });
|
setDmChannel({ id });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const listener = DeviceEventEmitter.addListener('Proximity', function (data) {
|
||||||
|
Alert.alert("proximity");
|
||||||
|
});
|
||||||
|
return () => { listener.remove() }
|
||||||
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let incoming = [];
|
let incoming = [];
|
||||||
for (let i = 0; i < state.ringing.length; i++) {
|
for (let i = 0; i < state.ringing.length; i++) {
|
||||||
|
@ -6326,6 +6326,11 @@ react-native-image-crop-picker@^0.39.0:
|
|||||||
resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.39.0.tgz#9cb8e8ffb0e8ab06f7b3227cadf077169e225eba"
|
resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.39.0.tgz#9cb8e8ffb0e8ab06f7b3227cadf077169e225eba"
|
||||||
integrity sha512-4aANbQMrmU6zN/4b0rVBA7SbaZ3aa5JESm3Xk751sINybZMt1yz/9h95LkO7U0pbslHDo3ofXjG75PmQRP6a/w==
|
integrity sha512-4aANbQMrmU6zN/4b0rVBA7SbaZ3aa5JESm3Xk751sINybZMt1yz/9h95LkO7U0pbslHDo3ofXjG75PmQRP6a/w==
|
||||||
|
|
||||||
|
react-native-incall-manager@^4.0.1:
|
||||||
|
version "4.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/react-native-incall-manager/-/react-native-incall-manager-4.0.1.tgz#7dae419433383ed31262d811fd549bba7951b2f2"
|
||||||
|
integrity sha512-Bqq7C+p7vCmCTpM8Xv6l4DJ3UJYzVr60IvkHMw1Ugs0KJswh3veBJrpk+hUPSETPT6J/5oUwxChXlNsymsh7fg==
|
||||||
|
|
||||||
react-native-reanimated-carousel@^3.3.0:
|
react-native-reanimated-carousel@^3.3.0:
|
||||||
version "3.3.0"
|
version "3.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/react-native-reanimated-carousel/-/react-native-reanimated-carousel-3.3.0.tgz#e71e9441ee6aaae401c5a023b27bf48a54565d16"
|
resolved "https://registry.yarnpkg.com/react-native-reanimated-carousel/-/react-native-reanimated-carousel-3.3.0.tgz#e71e9441ee6aaae401c5a023b27bf48a54565d16"
|
||||||
|
Loading…
Reference in New Issue
Block a user