Giter VIP home page Giter VIP logo

react-native-callkeep's Issues

manifest merger error

Just adding callkeep to a project and I'm getting an error

Gradle sync failed: Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.0.1).
			Searched in the following locations:
			https://jcenter.bintray.com/com/android/tools/build/manifest-merger/26.0.1/manifest-merger-26.0.1.jar
			Consult IDE log for more details (Help | Show Log) (6s 297ms)
Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.0.1).
Searched in the following locations:
    https://jcenter.bintray.com/com/android/tools/build/manifest-merger/26.0.1/manifest-merger-26.0.1.jar

It looks like the latest version available is
https://repo.jfrog.org/artifactory/libs-release-bintray/com/android/tools/build/manifest-merger/25.3.0/

Completely flumoxed as to why this is even happening - I've used callkeep in another projects fine

iOS: endCall and endAllCalls not working after second setup

To show incoming call screen we call

  1. RNCallKeep.setup(options)
  2. createNewUdid()
  3. RNCallKeep.displayIncomingCall(getCurrentUuid() .......)

To close incoming call screen we call

  1. RNCallKeep.endCall(getCurrentUuid())

It works great for the first time.

### But -------------------------------------------------------------------------------
when we receive a new call and again do the same flow:

  1. RNCallKeep.setup(options)
  2. createNewUdid()
  3. RNCallKeep.displayIncomingCall(getCurrentUuid() .......)

and when we need to close the incoming call screen by
RNCallKeep.endCall(getCurrentUuid()) it is not working.

  • RNCallKeep.endAllCalls() also not working
  • UUID for displayIncomingCall and for endCall are the same.
  • If we will displayIncomingCall with old UUID endCall will work, but we can't open the app from native incoming call screen, and the app will crash after 5-6 seconds...

Android Call with dialog empty

On some Samsung devices there is a problem when a default calling account has not been chosen. When a call is made from the Phone app, the call with dialog should show the SIM and the CallKeep app but it is blank.

This has been reproduced on Samsung S9 with Android 9 (but was fixed in a security patch from Samsung) and Samsung Note 9 with Android 9 (no security patch available yet), but works correctly on Samsung S8 with Android 9.

I know this is not a problem with the library and is a Samsung OS issue, but a possible workaround could be checking if a default is set (with telecomManager.getDefaultOutgoingPhoneAccount("tel")) and sending the user to the calling accounts settings (TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS) for them to set a default.

Screenshot 2019-03-29 at 09 41 03

Incoming call UI not displaying.

Hi,

I am using this plugin to show incoming video call ui into react-native, I am trying to display a incoming call UI as per document I used this function after installing plugin and linked.

 RNCallKeep.displayIncomingCall(uuid.v4(), '44534534543', 'jaawant','number', true);

I also tried old comments on display incoming call and follow instructions but there was no luck.
I also updated this into RNCallKeep.m file
callUpdate.hasVideo = hasVideo;

Please help me , as it is not showing any error so can't fix it.

Thanks in advance.

No sound when using callkit

I got no sound when I answer with callkit. Do you know why this can be?

Everything works if I use
RNCallKeep.startCall(session.ID, "User", 'generic');

But it doesn't work when I answer from native UI
RNCallKeep.displayIncomingCall(session.ID, user.username, user.username, 'generic', isVideoCall);

The problem is related with this actually.
react-native-webrtc/react-native-callkit#45

Sometimes connection keeps long so I want to show users that it is still connecting but when I do that
no one can hear each other. To solve that I am doing disabling & enabling microphone on receiver. Now caller can hear receiver but receiver can't hear caller. Is there a better way to apply this PR?

Issue with fresh install of app on android

I've got an issue on a fresh install of the app (or one where i remove the permission to make phone calls)

On fresh install load I get a OS alert asking for permission to make phone calls, I approve and then nothing happens after that.

If I then close the app and restart it, I then get the custom Alert box saying "we need you the phone account", you press ok and it takes you through to the phone accounts settings.

My feeling is that the custom Alert should happen straight after the requested making a phone call permission. I'm going to investigate this a bit today but wanted to make an issue on how to recreate it.

I'm running RNCallKeep.setup within componentDidMount()

bug: RNCallKeep.endCall(uuid) is not disconnecting the call

I'm integerating my app with react-native-pjsip library and I've used react-native-callkeep for call-kit handeling. When remote user hangup the call then my react-native-pjsip's endpoint method notify me to terminate the call so I'm calling RNCallKeep.endCall(uuid) but it's not disconnecting the call from my screen

Debug: I've thought that maybe RNCallKeep.endCall and RNCallKeep.startCall is getting different uids but after printing out the results it's the same uuid = "cec47dc0-4017-11e9-b085-e3a9fec010a6".

Please let me know If I'm doing anything wrong

@manuquentin can you help me?

Small issue in android auto-linking

Not a big deal, but when running
react-native link react-native-callkeep

We get
import com.wazo.callkeep.RNCallKeepPackage;
instead of
import io.wazo.callkeep.RNCallKeepPackage;
in our MainApplication.java

This prevents from building the app on android.

Update readme

Should the line:

"Tell ConnectionService that the device is ready to accept outgoing calls"

not read:

"Tell ConnectionService that the device is ready to accept incoming calls"?

can't dismiss the callscreen iOS

I have everything working and the call coming through to my device but when I call RNCallKeep.endCall(callUUID); this doesn't dismiss the native call screen.

I have it wrapped in a timer so if there's no answer after 20seconds the call should stop but it isn't working

Can anyone help?

Add an event when the speaker button is pressed

For now when the user change the speaker output, we don't have any event for that.

We need also a method to tell CallKeep to change the speaker button when we change it in the application.

Android - answerCall and endCall come with no params to decide which call should be terminated

If your app is able to handle multiple calls, how do you decide which to terminate? Lets say you have an active call and and inbound call.

How do you know which call is being ended? Should we be using

ACTION_HANGUP_CALL and ACTION_REJECT_CALL

https://github.com/hoxfon/react-native-twilio-programmable-voice/blob/master/android/src/main/java/com/hoxfon/react/RNTwilioVoice/CallNotificationManager.java#L31

Feels like I can take a stab at doing the right thing but there will be edge cases where I'm unable to choose which call I should be ending - right?

Or can we get a callId in the event like there is on ios - which would make this like for like

add ios support for performSetGroupCallAction

Just trying to work out whats needed to utilise the new callkit ios flag in RN-WebRTC 75 and realised we still don't support performSetGroupCallAction

I plan on submitting a PR for it but making the issue so it doesn't get forgotten about

phone account enable issue

Trying to do
RNCallKeep.displayIncomingCall

but always popup the Permission required,
what's the phone account enable mean?

using ASUS (Android 7.0) dual-sim device with 1 sim-card,

any suggestion? thanks.

RNCallKeep.addEventListener() not working.

Hi, guys.
I have tried more times to debug catch events and output result, but all RNCallKeep.addEventListener subscriptions are not working.
Maybe I have some missing configuration?
I am testing TextNow voip services on my phone and mac.
Here is my code.

import React, { Component } from 'react';
import {
  View,
  Dimensions,
  PermissionsAndroid,
  Platform,
  Text,
  TouchableOpacity
} from 'react-native';
import PropTypes from 'prop-types';
import Contacts from 'react-native-contacts';
import Icon from 'react-native-vector-icons/FontAwesome';
import RNCallKeep from 'react-native-callkeep';
import uuid from 'uuid';
import { AppContext, Navbar } from 'app/components';
import styles from './style';

const dm = Dimensions.get('screen');
class MainScreen extends Component {
  constructor(props) {
    super(props);

    this.state = {
      lastCallNumber: ''
    };
    this.currentCallId = null;

    // Initialise RNCallKeep
    const options = {
      ios: {
        appName: 'Nope'
      },
      android: {
        alertTitle: 'Permissions required',
        alertDescription:
          'This application needs to access your phone accounts',
        cancelButton: 'Cancel',
        okButton: 'ok'
      }
    };

    try {
      RNCallKeep.setup(options);
      RNCallKeep.setAvailable(true); // Only used for Android, see doc above.
    } catch (err) {
      console.error('initializeCallKeep error:', err.message);
    }

    // Add RNCallKeep Events
    RNCallKeep.addEventListener('didReceiveStartCallAction', this.onNativeCall);
    RNCallKeep.addEventListener('answerCall', this.onAnswerCallAction);
    RNCallKeep.addEventListener('endCall', this.onEndCallAction);
    RNCallKeep.addEventListener(
      'didDisplayIncomingCall',
      this.onIncomingCallDisplayed
    );
    RNCallKeep.addEventListener(
      'didPerformSetMutedCallAction',
      this.onToggleMute
    );
    RNCallKeep.addEventListener(
      'didActivateAudioSession',
      this.audioSessionActivated
    );
  }

  onNativeCall = ({ handle }) => {
    // Your normal start call action
    alert('call');
    RNCallKeep.startCall(this.getCurrentCallId(), handle);
  };

  onAnswerCallAction = ({ callUUID }) => {
    // called when the user answer the incoming call
  };

  onEndCallAction = ({ callUUID }) => {
    RNCallKeep.endCall(this.getCurrentCallId());

    this.currentCallId = null;
  };

  onIncomingCallDisplayed = (error) => {

    alert('call');
    // You will get this event after RNCallKeep finishes showing incoming call UI
    // You can check if there was an error while displaying
  };

  onToggleMute = (muted) => {
    // Called when the system or the user mutes a call
  };

  audioSessionActivated = (data) => {
    // you might want to do following things when receiving this event:
    // - Start playing ringback if it is an outgoing call
  };

  getCurrentCallId = () => {
    if (!this.currentCallId) {
      this.currentCallId = uuid.v4();
    }

    return this.currentCallId;
  };

  async componentDidMount() {
    this.reload();
    if (Platform.OS === 'android') {
      PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.READ_CONTACTS, {
        title: 'Contacts',
        message: 'This app would like to view your contacts.'
      }).then(() => {
        Contacts.getAll((err, contacts) => {
          if (err === 'denied') {
            // error
            throw err;
          } else {
            // contacts returned in Array
            this.parseContacts(contacts);
          }
        });
      });
    } else {
      Contacts.getAll((err, contacts) => {
        if (err) {
          throw err;
        }
        // contacts returned
     
      });
    }
  }

  reload = async () => {
    await this.context.showLoading();

    this.context.hideLoading();
  };

  leftHandler = () => {
    this.props.navigation.toggleDrawer();
  };

  upVote() {
    alert('Yep!');
  }

  downVote() {
    alert('Nope!');
  }

  render() {
    return (
      <View style={styles.container}>
        <Navbar
          left="ios-menu"
          leftHandler={this.leftHandler}
          title="Dashboard"
        />
        <View style={styles.container}>
          <Text style={styles.title}>Nope</Text>
          <Text style={styles.description}>Please rate the calls below:</Text>
          <View style={styles.box}>
            <Text style={styles.description}>Was this call legit?</Text>
            <Text style={styles.description}>{this.state.lastCallNumber}</Text>
          </View>
          <View style={styles.voteBox}>
            <View style={styles.leftBox}>
              <TouchableOpacity onPress={() => this.upVote()}>
                <Text style={styles.voteTitle}>
                  Yep
                  <Icon name="thumbs-up" size={30} color="grey" />
                </Text>
              </TouchableOpacity>
            </View>
            <View style={styles.rightBox}>
              <TouchableOpacity onPress={() => this.downVote()}>
                <Text style={styles.voteTitle}>
                  Nope!
                  <Icon name="thumbs-down" size={30} color="grey" />
                </Text>
              </TouchableOpacity>
            </View>
          </View>
        </View>
      </View>
    );
  }
}

MainScreen.contextType = AppContext;

MainScreen.propTypes = {
  navigation: PropTypes.object
};

export default MainScreen;

iOS and Android packages are correctly imported and running without any errors.
But can't catch event as I desired.
Thanks.

Starting an android call when app in killed state behaves weirdly

With the update in master, we get the event into the background service and then open up the app from there with the uuid for connection service. If I run startCall I get the connection service UI but I don't get a start call event. I have to assume that the event isn't going to happen and force the call to happen as though I got the start call action.

How did you envisage this working @manuquentin ?

Should the underlying callkeep code show the UI as though you've called startCall ?

Oh looks like this does actually act like this... and I was getting confused due to reloading the RN App inside the app during debugging

Incoming call not displaying it's a video call

I have a function that is being called when I get a notification but I can't get it to say Video and not audio. Bellow is the function

onIncomingCall(callUuid) {
   RNCallKeep.displayIncomingCall(callUuid, "Thomas Large", null, true);
}

True is the way the docs tells you how to set it

Can anyone help?

Ability to use react-native-callkeep when app is backgrounded/killed

The react-native-callkeep library works when the app's JS is active (open/backgrounded for Android, open for iOS). However, the react-native-callkeep JS API, as documented in the readme, doesn't work when the app is in the other states (killed for Android, backgrounded/killed for iOS).

Can react-native-callkeep possibly be made to work in those scenarios (i.e. from a push notification via a native notification service, etc.)?

Possibility of self-managed react-native-callkeep, i.e. with "setConnectionProperties(PROPERTY_SELF_MANAGED)"?

UPDATE: This is now a feature request. Can react-native-callkeep be updated so that it can be used with setConnectionProperties(PROPERTY_SELF_MANAGED)?


Our use case is this: we have a cross-platform video chat app that uses opentok-react-native, and we currently use just push notifications to get users to pair with each other (using react-native-onesignal). When our users tap the push notification, they simply get dropped into our app.

We would instead want these video chat requests to look like phone calls. This means that we want the phone-call-esque screen to just act as a glorified push notification (tapping the answer button would trigger the exact same behavior that our push notification currently triggers -- opening the app, nothing more and nothing less).

It seems to me that such a functionality must be possible to do in CallKit and ConnectionService without all the other things that other typical VoIP apps need. For example, requesting the BIND_TELECOM_CONNECTION_SERVICE permission on Android shouldn't be needed, and it would be great to not have to show this to the user. (Or I may be misunderstanding ConnectionService.)

Is it possible to use react-native-callkeep as something like a full-screen push notification that just happens to look like an incoming phone call?

Update explanation in readme

I'm looking for a better incoming call-notification than push notifications for a WebRTC videocalling app, when i read the readme it is not immediately clear for me what happens on ios and android when the answer button is pressed?
Will my app be opened with some extra data?
Can we use it with WebRTC (and custom UI) instead of VOIP?
Can it be used when app is not active or in background?

Aside from this., great that someone converted the callkit lib into a cross platform one! I really hate one platform react-native packages or packages that behave completely different on both platforms!

TypeError: null is not an object (evaluating 'RNCallKeepModule.setAvailable')

I am getting TypeError: null is not an object (evaluating 'RNCallKeepModule.setAvailable'), with remote debugging turn off and TypeError: Cannot read property 'setAvailable' of undefined with remote debugging on.

import RNCallKeep from 'react-native-callkeep';

const App = () => {

  const options = {
    ios: {
      appName: 'My app name',
    },
    android: {
      alertTitle: 'Permissions required',
      alertDescription: 'This application needs to access your phone accounts',
      cancelButton: 'Cancel',
      okButton: 'ok',
    },
  };

  RNCallKeep.setup(options);
  RNCallKeep.setAvailable(true);

  return (
    <Fragment>
      <Text>
        hello
      </Text>
      <Button title="Press Me" />
    </Fragment>
  );
};

should there be a yarn.lock file?

This repo has no dependencies so why is there a yarn lockfile? I feel as though its causing issues with conflicting dependencies but I can't 100% put my finger on it. Anyway..... why the yarn.lock ?

No Audio on iOS

"react-native-callkeep": "^2.0.3"
"react-native-webrtc": "^1.75.0"

I am not receiving any audio when I answer an inbound call on iOS (android is fine). I do get the following in the logs.
[RNCallKeep][configureAudioSession] Activating audio session
[RNCallKeep][CXProviderDelegate][provider:didActivateAudioSession]

Can't display start call screen on iOS 12

Hi,
I have set up callkeep for iOS platform but I'm able to see only some screens.
For example I can see Incoming call screen without problems. But when I run this line of code RNCallKeep.startCall('b0074838-a352-11e9-a2a3-2a2ae2dbcce4', '123456789'); I can't see start call screen on the iPhone, moreover, when I set app in background I can see iPhone's status bar in green indicating that there is a call running, but when I click there only open my app and not the callKit screen. There are no errors in Xcode console and the logs are ok.
Could be a phone setup problem? Any clue or tip?

iOS native phone UI is minimizing when the call is accepted

Hi,

I don't know if this is the standard behavior but, when I accept the call on iOS through the native phone screen, it is minimized and it goes to my app screen. I see the native phone UI on the tray. Is there some way to configure to have this call activity screen don't minimize?

Many thanks.

Can only use lower 16 bits for requestCode

Hi Callkeep team,

I'm getting this error on android when running the sample code. I tried to unlink and link the package again, and finally checked everything manually, but it keeps happening.

This error disappears if i manually authorize my app to access the phone (settings -> Apps permissions -> myapp -> permissions -> phone).

Any idea ?

Manu

Screenshot_1557148066

react-native-cli: 2.0.1
react-native: 0.59.5

Android dial from Contacts/Dialer History when app killed

Calling using callkeep integration on android works great when the android app is open. If its closed, it doesn't work. It opens the native GUI for making an outbound call but then gives up.

Tried to look through the logs and figure out whats missing but it doesn't make too much sense to me. Got any pointers?

I'm assuming I need to put another intent filter for MainActivity into AndroidManifest but I'm a JS dev, not a native one

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.