Giter VIP home page Giter VIP logo

Comments (24)

diegogarciar avatar diegogarciar commented on September 4, 2024 1

Try running example from Android Studio and set a breakpoint on VoiceFirebaseMessageingService file from the calle device to check if you're receiving the push notification. If you don't receive the notification, there's still something wrong with your setup

image

from twilio_voice.

diegogarciar avatar diegogarciar commented on September 4, 2024 1

You must debug with Android Studio for it to work

from twilio_voice.

diegogarciar avatar diegogarciar commented on September 4, 2024 1

[email protected]

from twilio_voice.

diegogarciar avatar diegogarciar commented on September 4, 2024

I’m not sure about that issue, have you tried calling the other way around?

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

Yes I call from one device to the other try us 2 and both fall into this problem

from twilio_voice.

diegogarciar avatar diegogarciar commented on September 4, 2024

Can you give me the specs of both devices?

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

Devices:

  1. Android 11 - Samsung Galaxy s10
  2. Emulador - Android 11

Open a call in twilio and this was the return:

Hi Victor,
480 Temporarily Unavailable means the destination number is valid, but it's not answering or unable to answer. They may be out of service, roaming, or not accepting calls. Often seen when calling wireless phones that don't answer and don't have voicemail.

You can see this and other response meanings here: https://support.twilio.com/hc/en-us/articles/360035018373-View-the-Voice-Insights-Summary-for-a-Call.

Sincerely,
Sam E.
Twilio Support

I'm setting the token of the users logged in the function

  register() {
    try {
  
     TwilioVoice.instance.setTokens(
        accessToken: tokenDeAcesso.acessToken!, (from my server)
        deviceToken: tokenFCM,
      );
    } catch (error, stackTrace) {
      print(error);
      print(stackTrace);
    }
  }

I'm registering this logged in user
TwilioVoice.instance.registerClient(user.uid, 'Celular');

And my function to call to is the UserID of the other device


 TwilioVoice.instance.call.place(
                      to: 'qrMJuS8DpYQGZyF6dxJ8cYc83X53',
                      from: userId!,
                    );

My project is:
https://github.com/VictorPadovan1997/stc-mobile-ricochet-twillio/blob/main/lib/pages/voice-twilio.dart

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

We did a test here with our function that we were using on the server to call voice()
and tested by calling a number and it worked.
in other words, the problem is how receiving calls in the backend in the app with the package is handled.

from twilio_voice.

diegogarciar avatar diegogarciar commented on September 4, 2024

Might be telated to #41 . But I dont know how to fix it

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

I'm doing a project for the company. Get in touch with a twillio expert before starting everything to indicate something for us to integrate into flutter and they recommended your package.

I put the link to the .Dart file in my git in the message above from the voice twillio class if you can see where I'm going wrong, I appreciate it.

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

For receiving a call as a package handle this?

from twilio_voice.

diegogarciar avatar diegogarciar commented on September 4, 2024

I don't know how to fix it, but you help me find what's going on.

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

I don't have this file in the project.
this file does not come from the package?
I simply took the /example folder from the repository (https://github.com/diegogarciar/twilio_voice/tree/master/example)
and I verified that the VoiceFirebase... file is in the root and not in the folder /exemplo
I'll start over cloning the entire project

alt text

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

Good morning, I started again, cloned the entire project instead of just being the folder / example
Well three things that are happening.

  1. When debugging on my device these Note does not prevent me from running apk on divece.
Note: /Users/mac/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-10.0.9/android/src/main/java/io/flutter/plugins/firebase/messaging/JobIntentService.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/mac/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-5.0.0+4/android/src/main/java/com/dexterous/flutterlocalnotifications/FlutterLocalNotificationsPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
  1. even passing the To and From function
TwilioVoice.instance.call.place(
  to: 'qrMJuS8DpYQGZyF6dxJ8cYc83X53',
   from: userId!,
 );

When I show the CallScreen screen it shows me on my console;

Connected - From: null, To: null, StartOn: 2021-10-25 11:05:31.247157, Direction: CallDirection.outgoing
twilio_voice Located in: https://github.com/diegogarciar/twilio_voice/blob/master/lib/twilio_voice.dart

alt text

When making a call, it closes the call again:

D/TwilioVoicePlugin(30284): Disconnected
I/flutter (30284): event CallEvent.callEnded
2I/flutter (30284): voip-onCallStateChanged CallEvent.callEnded
I/flutter (30284): call Ended

I spent a breakpoint in VoiceFirebaseMessageingService
Located in:
https://github.com/diegogarciar/twilio_voice/blob/master/android/src/main/java/com/twilio/twilio_voice/fcm/VoiceFirebaseMessagingService.java

Wouldn't it be correct to give a breakpoint in the package cache that doesn't come from the package instead of the root project? because even trying to trigger the call it doesn't reach this function.

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

Well I cloned the project again starting from scratch open the project in Android Studio.
And firstly, there is an error in the package: in file VoiceFirebase...java (Android Studio 4.1.3)

alt text

need to install some lib What versions are you using?
I've noticed these errors are occurring in most .java files and I noticed that it doesn't fall into any stopping breakpoint of the files .java
need to migrate to androidx ?

I passed the breakpoints in the onMessageReceived function as recommended by you,
and does not stop in this function, that is, it is not being called.

alt text

My Console LOG
What would this twilio_voice_android.iml file be ?
that I did to solve I got the file found in https://github.com/diegogarciar/twilio_voice/blob/master/twilio_voice.iml
and threw it to /android folder

alt text
Video example of what is happening:
https://www.youtube.com/watch?v=-_9dq3wPUnc

My Project:https://github.com/VictorPadovan1997/stc-mobile-ricochet-twillio

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

good night.
I managed to solve the problem I mentioned above opening the /android folder in android Studio and solving the imports
now the only problem I'm facing is regarding the FlutterPlugin
I have installed the plugins in Android Studio

  • flutter
  • dart

Where does this Plugin come from I need to install something in my build.glade dependencies?
Thank you.

alt text

from twilio_voice.

diegogarciar avatar diegogarciar commented on September 4, 2024

You must open the example/Android folder from AS, and from there, navigate to that file

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

I need to configure something on example/android
or in root/android in android studio?

The package wasn't supposed to do this all by itself when configured correctly according to the readme?🤔

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

Tente executar o exemplo do Android Studio e definir um ponto de interrupção no arquivo VoiceFirebaseMessageingService do dispositivo calle para verificar se você está recebendo a notificação push. Se você não receber a notificação, ainda há algo errado com sua configuração

imagem

Dude asks me a question.
Here you mentioned for me to pass a breakpoints in VoiceFirebaseMessageingService opening /example in AS.

But when I run my app flutter will get the example/lib/main.dart file.
And the VoiceFirebase... file is located at the root in root/android.

And then it will be debugging the /example folder And not what comes from the root ie the breakpoints won't work.

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

is correct ?

from twilio_voice.

diegogarciar avatar diegogarciar commented on September 4, 2024

Hello Victor is possible, if you can't do it you'll need to find another way to debug this. The plugin works, there's a lot of documentation from Twilio on how to properly implement Twilio voice. If there is no clear error to report I'll close this issue.
If you need technical assistance for implementation, you can contact me to my email and I can charge you for doing this work. Rate is $35/hour

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

What is your email

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

Thanks, Sent

from twilio_voice.

VictorPadovan1997 avatar VictorPadovan1997 commented on September 4, 2024

After a lot of dedication, I managed to make a call.
for those who had the same problem the error was being seen because of the FCM variable of firebase was null.

from twilio_voice.

Related Issues (20)

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.