程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Sinch API 失败大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决Sinch API 失败?

开发过程中遇到Sinch API 失败的问题如何解决?下面主要结合日常开发的经验,给出你关于Sinch API 失败的解决方法建议,希望对你解决Sinch API 失败有所启发或帮助;

我正在尝试使用 Sinch SDK 创建一个基于 VoIP 的应用程序,但我不断收到错误消息。我遵循了演示应用程序,但我收到了那个错误。任何人都可以帮忙

6/28 21:18:35: Launching 'app' on Physical Device.
App restart successful without requiring a re-install.
$ adb sHell am start -n "com.example.nhare/com.example.nhare.MainActivity" -a androID.intent.action.MAIN -c androID.intent.category.LAUNCHER
Connected to process 32112 on device 'samsung-sm_j610f-23ae061b'.
Capturing and displaying logcat messages from application. This behavior can be Disabled in the "Logcat output" section of the "DeBUGger" setTings page.
W/Componentdiscovery: Class com.Google.firebase.dynamicloading.DynamicLoadingRegistrar is not an found.
I/FirebaseApp: Device unlocked: initializing all Firebase APIs for app [DEFAulT]
D/FirebaseAuth: Notifying ID token Listeners about user ( yNLPb9S17NXpfRSTMfNocK3pFU63 ).
I/FirebaseInitProvIDer: FirebaseApp initialization successful
I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to fallBACk implementation
D/PhoneWindow: forcelight changed to true [] from com.androID.internal.policy.PhoneWindow.updateForcelightNavigationbar:4238 com.androID.internal.policy.DecorVIEw.updatecolorVIEws:1510 com.androID.internal.policy.PhoneWindow.dispatchWindowAttributesChanged:3216 androID.vIEw.Window.setFlags:1148 com.androID.internal.policy.PhoneWindow.generateLayout:2444 
I/MultiWindowDecorSupport: updateCaptionType >> DecorVIEw@ee252cc[],isfloaTing: false,isApplication: true,hasWindowDecorCaption: false,hasWindowControllerCallBACk: true
D/MultiWindowDecorSupport: setCaptionType = 0,DecorVIEw = DecorVIEw@ee252cc[]
W/m.example.nhar: Accessing hIDden method LandroID/vIEw/VIEw;->computeFitSystemwindows(LandroID/graphics/Rect;LandroID/graphics/Rect;)Z (greyList,reflection,allowed)
W/m.example.nhar: Accessing hIDden method LandroID/vIEw/VIEwGroup;->makeOptionalFitsSystemwindows()V (greyList,allowed)
D/VIEwRootImpl@dd42505[MainActivity]: setVIEw = com.androID.internal.policy.DecorVIEw@ee252cc TM=true MM=false
D/NetworkSecurityConfig: No Network Security Config specifIEd,using platform default
D/VIEwRootImpl@dd42505[MainActivity]: Relayout returned: old=(0,720,1480) new=(0,1480) req=(720,1480)0 dur=17 res=0x7 s={true 2342543360} ch=true
D/Openglrenderer: createReliableSurface : 0x968f0a40,0x8ba06000
I/AdrenoGLES: QUALCOMM build                   : d39f783,I79de86aa2c
    Build Date                       : 06/04/20
    OpenGL ES Shader Compiler Version: EV031.27.05.03
    Local Branch                     : 
    Remote Branch                    : refs/Tags/AU_liNUX_ANDROID_LA.Um.8.6.R1.10.00.00.578.029
    Remote Branch                    : NONE
    Reconstruct Branch               : nothing
    Build Config                     : S L 8.0.12 AArch32
I/AdrenoGLES: PFP: 0x003ff016,ME: 0x003ff041
W/Gralloc3: mapper 3.x is not supported
D/VIEwRootImpl@dd42505[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
D/inputMethodManager: prepareNavigationbarInfo() DecorVIEw@ee252cc[MainActivity]
D/inputMethodManager: getNavigationbarcolor() -855310
D/Emergencymode: [Emergencymanager] androID createPackageContext successful: com.example.nhare
D/inputMethodManager: prepareNavigationbarInfo() DecorVIEw@ee252cc[MainActivity]
    getNavigationbarcolor() -855310
V/inputMethodManager: StarTing input: tba=com.example.nhare ic=null mNavibarcolor -855310 mIsGetNavibarcolorsuccess true,NavVisible : true,NavTrans : false
D/inputMethodManager: starTinpuTinner - ID : 0
I/inputMethodManager: starTinpuTinner - mservice.starTinputOrWindowGainedFocus
D/VIEwRootImpl@dd42505[MainActivity]: MSG_RESIZED: frame=(0,1480) ci=(0,42,84) vi=(0,84) or=1
D/inputMethodManager: prepareNavigationbarInfo() DecorVIEw@ee252cc[MainActivity]
    getNavigationbarcolor() -855310
V/inputMethodManager: StarTing input: tba=com.example.nhare ic=null mNavibarcolor -855310 mIsGetNavibarcolorsuccess true,NavTrans : false
D/inputMethodManager: starTinpuTinner - ID : 0
W/Classmapper: No setter/fIEld for Contact found on class com.example.nhare.Contacts
I/chatty: uID=10317(com.example.nharE) IDentical 1 line
W/Classmapper: No setter/fIEld for Contact found on class com.example.nhare.Contacts
D/VIEwRootImpl@849c0db[Toast]: setVIEw = androID.Widget.linearLayout@48c0778 TM=true MM=false
V/Toast: Text: Pnli in androID.Widget.Toast$TN@8b5ee51
D/VIEwRootImpl@849c0db[Toast]: Relayout returned: old=(0,1396) new=(282,1207,438,1284) req=(156,77)0 dur=21 res=0x7 s={true 2342492160} ch=true
D/Openglrenderer: createReliableSurface : 0x8b91d400,0x8b9f9800
D/VIEwRootImpl@849c0db[Toast]: MSG_RESIZED: frame=(282,1284) ci=(0,0) vi=(0,156,77) or=1
D/VIEwRootImpl@849c0db[Toast]: dispatchDetachedFromWindow
D/inputTransport: input chAnnel destroyed: 'f168fa7',fd=85
D/VIEwRootImpl@dd42505[MainActivity]: VIEwPostIme pointer 0
D/VIEwRootImpl@dd42505[MainActivity]: VIEwPostIme pointer 1
W/ActivityThread: handleWindowVisibility: no activity for token androID.os.binderProxy@f9a1e8d
D/PhoneWindow: forcelight changed to true [] from com.androID.internal.policy.PhoneWindow.updateForcelightNavigationbar:4238 com.androID.internal.policy.DecorVIEw.updatecolorVIEws:1510 com.androID.internal.policy.PhoneWindow.dispatchWindowAttributesChanged:3216 androID.vIEw.Window.setFlags:1148 com.androID.internal.policy.PhoneWindow.generateLayout:2444 
I/MultiWindowDecorSupport: updateCaptionType >> DecorVIEw@da2d966[],DecorVIEw = DecorVIEw@da2d966[]
D/RelinkerlibraryLoader: Beginning load of sinch-androID-rtc...
D/RelinkerlibraryLoader: sinch-androID-rtc (3.17.6) was loaded normally!
I/SinchClIEnt: RebRTC revision:616f2e312
E/m.example.nhar: No package ID ff found for ID 0xffffffff.
E/m.example.nhar: No package ID ff found for ID 0xffffffff.
I/Org.webrtc.Logging: EglBase14Impl: SDK version: 29. isEGL14Supported: true
I/Org.webrtc.Logging: EglBase14Impl: Using OpenGL ES version 2
I/Org.webrtc.Logging: Eglrenderer: Initializing Eglrenderer
W/m.example.nhar: Accessing hIDden method Ljava/lang/invoke/LambdaMetafactory;->Metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; (blackList,linking,denIEd)
D/AndroIDRuntime: ShutTing down VM
E/AndroIDRuntime: FATAL EXCEPTION: main
    Process: com.example.nhare,PID: 32112
    java.lang.NoSuchMethodError: No static method Metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; in class Ljava/lang/invoke/LambdaMetafactory; or its super classes (declaration of 'java.lang.invoke.LambdaMetafactory' appears in /apex/com.androID.runtime/javalib/core-oj.jar)
        at org.webrtc.Eglrenderer.init(UnkNown source:61)
        at org.webrtc.Eglrenderer.init(UnkNown source:1)
        at org.webrtc.SurfaceEglrenderer.init(UnkNown source:18)
        at org.webrtc.SurfaceVIEWrenderer.init(UnkNown source:12)
        at org.webrtc.SurfaceVIEWrenderer.init(UnkNown source:7)
        at com.sinch.androID.rtc.internal.clIEnt.vIDeo.DefaultVIDeoController.<init>(UnkNown source:57)
        at com.sinch.androID.rtc.internal.clIEnt.DefaultSinchClIEnt.<init>(UnkNown source:314)
        at com.sinch.androID.rtc.internal.clIEnt.InternalSinchClIEntFactory.createSinchClIEnt(UnkNown source:60)
        at com.sinch.androID.rtc.DefaultSinchClIEntBuilder.build(UnkNown source:38)
        at com.example.nhare.ChatsActivity.onCreate(ChatsActivity.java:111)
        at androID.app.Activity.performCreate(Activity.java:7955)
        at androID.app.Activity.performCreate(Activity.java:7944)
        at androID.app.instrumentation.callActivityOnCreate(instrumentation.java:1307)
        at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:3531)
        at androID.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3703)
        at androID.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
        at androID.app.servertransaction.transactionExecutor.executeCallBACks(transactionExecutor.java:135)
        at androID.app.servertransaction.transactionExecutor.execute(transactionExecutor.java:95)
        at androID.app.ActivityThread$H.handlemessage(ActivityThread.java:2216)
        at androID.os.Handler.dispatchmessage(Handler.java:107)
        at androID.os.Looper.loop(Looper.java:237)
        at androID.app.ActivityThread.main(ActivityThread.java:7948)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.androID.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:1075)

任何可以提供帮助的人请帮忙,下面是我的活动代码

    package com.example.nhare;


import androID.content.Context;
import androID.content.DialogInterface;
import androID.content.Intent;
import androID.os.bundle;
import androID.text.Editable;
import androID.text.TextUtils;
import androID.text.TextWatcher;
import androID.vIEw.LayoutInflater;
import androID.vIEw.VIEw;
import androID.Widget.EditText;
import androID.Widget.Imagebutton;
import androID.Widget.ImageVIEw;
import androID.Widget.ScrollVIEw;
import androID.Widget.TextVIEw;
import androID.Widget.Toast;

import androIDx.appcompat.app.AlertDialog;
import androIDx.appcompat.Widget.Toolbar;



import androIDx.Annotation.NonNull;
import androIDx.appcompat.app.Actionbar;
import androIDx.appcompat.app.AppCompatActivity;
import androIDx.recyclervIEw.Widget.linearlayoutmanager;
import androIDx.recyclervIEw.Widget.RecyclerVIEw;

import com.Google.androID.gms.tasks.OnCompleteListener;
import com.Google.androID.gms.tasks.Task;
import com.Google.firebase.auth.FirebaseAuth;
import com.Google.firebase.auth.FirebaseUser;
import com.Google.firebase.database.ChildEventListener;
import com.Google.firebase.database.DataSnapshot;
import com.Google.firebase.database.DatabaseError;
import com.Google.firebase.database.DatabaseReference;
import com.Google.firebase.database.FirebaseDatabase;
import com.Google.firebase.database.ValueEventListener;
import com.sinch.androID.rtc.PushPair;
import com.sinch.androID.rtc.Sinch;
import com.sinch.androID.rtc.SinchClIEnt;
import com.sinch.androID.rtc.SinchClIEntListener;
import com.sinch.androID.rtc.calling.Call;
import com.sinch.androID.rtc.calling.CallClIEntListener;
import com.sinch.androID.rtc.calling.CallListener;
import com.sinch.androID.rtc.internal.natives.jni.CallClIEnt;
import com.squareup.piCasso.PiCasso;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ChatsActivity extends AppCompatActivity
{

    private String messageReceiverID,messageReceivername,messageReceiverImage,messageSenderID;

    private TextVIEw userLastSeen,username;
    private ImageVIEw userImage,ChatsBACk,ChatsCallbutton;


    private FirebaseAuth mAuth;
    private DatabaseReference RootRef;

    private Imagebutton ChatsSendmessagebutton;
    private Imagebutton ChatsSendAudiobutton;
    private EditText Chatsusermessageinput;
    private Toolbar ChatToolbar;
    private Imagebutton Sendmessagebutton,Attachfile,Emojibutton;

    private final List<messages> messagesList = new ArrayList<>();
    private linearlayoutmanager linearlayoutmanager;
    private messageAdapter messageAdapter;
    private RecyclerVIEw usermessagesList;

    private SinchClIEnt sinchClIEnt;
     Call call;

    private String currentChatname,saveCurrentTime,saveCurrentDate;


    @OverrIDe
    protected voID onCreate(Bundle savedInstanceStatE) {
        super.onCreate(savedInstanceStatE);
        setContentVIEw(R.layout.activity_chats);

         mAuth = FirebaseAuth.geTinstance();
         messageSenderID = mAuth.getCurrentUser().getUID();
         RootRef = FirebaseDatabase.geTinstance().getReference();

          messageReceiverID = geTintent().getExtras().get("visit_user_iD").toString();
          messageReceivername = geTintent().getExtras().get("visit_user_name").toString();
          messageReceiverImage = geTintent().getExtras().get("visit_image").toString();

        InitializefIElds();

        username.setText(messageReceiverName);

        //SetTing up the Sinch API for calls
        sinchClIEnt = Sinch.getSinchClIEntBuilder()
                .context(this)
                .userID(messageReceiverID)
              .applicationKey("fc7fcfab-c116-4BAC-a346-c23f14342577")
              .applicationSecret("OuOgjnyZfUe+2TGSCobfog==")
              .environmentHost("clIEntAPI.sinch.com")
              .build();

        //Set up Sinch to start Listening for incoming calls
        sinchClIEnt.setSupportCalling(true);
        sinchClIEnt.startListeningOnActiveConnection();

        sinchClIEnt.getCallClIEnt().addCallClIEntListener(new SinchCallClIEntListener());

        sinchClIEnt.start();

        ChatsSendmessagebutton.setonClickListener(new VIEw.onClickListener() {
            @OverrIDe
            public voID onClick(View view)
            {
                Sendmessage();
            }
        });


        displayLastSeen();

        ChatsCallbutton.setonClickListener(new VIEw.onClickListener() {
          @OverrIDe
          public voID onClick(View view)
            {
              // make a call!
              if(call == null)
              {
                  call = sinchClIEnt.getCallClIEnt().callUser(messageReceiverID);
                  call.addCallListener(new SinchCallListener());

                  openCallerDialog(call);
              }

          }
        });

        ChatsBACk.setonClickListener(new VIEw.onClickListener() {
            @OverrIDe
            public voID onClick(VIEw v)
            {
                Intent ChatBACkbutton = new Intent(ChatsActivity.this,MainActivity.class);
                startActivity(ChatBACkbutton);
            }
        });


        Chatsusermessageinput.addTextChangedListener(new TextWatcher() {
            @OverrIDe
            public voID beforeTextChanged(CharSequence s,int start,int count,int after)
            {

            }

            @OverrIDe
            public voID ontextChanged(CharSequence charSequence,int before,int count)
            {
                String message=charSequence.toString();

                ExchangeSendAudioWithASendmessage(messagE);
            }

            @OverrIDe
            public voID afterTextChanged(Editable s)
            {

            }
        });

    }

    private voID openCallerDialog(final Call call)
    {
            AlertDialog alertDialogCall = new AlertDialog.builder(ChatsActivity.this).create();
            alertDialogCall.settitle("ALERT");
            alertDialogCall.setmessage("CALliNG");
            alertDialogCall.setbutton(AlertDialog.button_NEUTRAL,"Hang Up",new DialogInterface.onClickListener() {
                @OverrIDe
                public voID onClick(DialogInterface dialog,int which)
                {
                    dialog.dismiss();
                    call.hangup();
                }
            });
    }

    private voID ExchangeSendAudioWithASendmessage(String messagE)
    {
        if (message.isEmpty())
        {
            ChatsSendAudiobutton.setVisibility(VIEw.VISIBLE);
        }
        else
        {
            ChatsSendAudiobutton.setVisibility(VIEw.INVISIBLE);

            ChatsSendmessagebutton.setVisibility(VIEw.VISIBLE);
        }

    }


    private voID InitializefIElds()
    {
            ChatToolbar = (Toolbar) findVIEwByID(R.ID.chat_toolbar);
            setSupportActionbar(ChatToolbar);

            Actionbar actionbar = getSupportActionbar();
            actionbar.setdisplayHomeAsUpEnabled(false);
            actionbar.setdisplayShowCustomEnabled(true);
            actionbar.setdisplayShowtitleEnabled(false);

            LayoutInflater layoutInflater = (LayoutInflater) this.getSystemservice(Context.LAYOUT_INFLATER_serviCE);
            VIEw actionbarVIEw = layoutInflater.inflate(R.layout.custom_chaT_Bar,null);
            actionbar.setCustomVIEw(actionbarVIEw);

            ChatsSendmessagebutton = (Imagebutton) findVIEwByID(R.ID.chats_send_message_button);
            ChatsSendAudiobutton = (Imagebutton) findVIEwByID(R.ID.chats_send_audio_button);
            Attachfile = (Imagebutton) findVIEwByID(R.ID.attach_button);
            Emojibutton = (Imagebutton) findVIEwByID(R.ID.emoji_button);
            ChatsBACk = (ImageVIEw) findVIEwByID(R.ID.chats_BACk);
            Chatsusermessageinput = (EditText) findVIEwByID(R.ID.chats_input_group_messagE);


            username = (TextVIEw) findVIEwByID(R.ID.custom_profile_name);
            userLastSeen = (TextVIEw) findVIEwByID(R.ID.custom_user_last_seen);

            ChatsCallbutton = (ImageVIEw) findVIEwByID(R.ID.chats_menu_call);

            messageAdapter = new messageAdapter(messagesList);
            usermessagesList = (RecyclerVIEw) findVIEwByID(R.ID.chats_private_messages_List_of_users);
            linearlayoutmanager = new linearlayoutmanager(this);
            usermessagesList.setLayoutManager(linearlayoutmanager);
            usermessagesList.setAdapter(messageAdapter);

            Calendar calendar = Calendar.geTinstance();

            SimpleDateFormat currentDate = new SimpleDateFormat("MMM dd,yyyy");
            saveCurrentDate = currentDate.format(calendar.getTime());

            SimpleDateFormat currentTime = new SimpleDateFormat("hh:mm a");
            saveCurrentTime = currentTime.format(calendar.getTime());

    }


    private voID displayLastSeen()
    {
        RootRef.child("Users").child(messageReceiverID)
                .addValueEventListener(new ValueEventListener() {
                    @OverrIDe
                    public voID onDataChange(DataSnapshot dataSnapshot)
                    {
                        if (dataSnapshot.child("userState").hasChild("state"))
                        {
                            String state = dataSnapshot.child("userState").child("state").getValue().toString();
                            String date = dataSnapshot.child("userState").child("date").getValue().toString();
                            String time = dataSnapshot.child("userState").child("time").getValue().toString();

                            if (state.equals("online"))
                            {
                                userLastSeen.setText("online");
                            }
                            else if (state.equals("offline"))
                            {
                                userLastSeen.setText("Last Seen: " + date + " " + timE);
                            }
                        }
                        else
                        {
                            userLastSeen.setText("offline");
                        }
                    }

                    @OverrIDe
                    public voID onCancelled(DatabaseError databaseError) {

                    }
                });
    }


    @OverrIDe
    protected voID onStart()
    {
        super.onStart();

        RootRef.child("messages").child(messageSenderID).child(messageReceiverID)
                .addChildEventListener(new ChildEventListener() {
                    @OverrIDe
                    public voID onChildAdded(DataSnapshot dataSnapshot,String s)
                    {
                        messages messages = dataSnapshot.getValue(messages.class);

                        messagesList.add(messages);

                        messageAdapter.notifyDataSetChanged();

                        usermessagesList.smoothScrollToposition(usermessagesList.getAdapter().getItemCount());
                    }

                    @OverrIDe
                    public voID onChildChanged(DataSnapshot dataSnapshot,String s) {

                    }

                    @OverrIDe
                    public voID onChildRemoved(DataSnapshot dataSnapshot) {

                    }

                    @OverrIDe
                    public voID onChildMoved(DataSnapshot dataSnapshot,String s) {

                    }

                    @OverrIDe
                    public voID onCancelled(DatabaseError databaseError) {

                    }
                });
    }



    private voID Sendmessage()
    {
        String messageText = Chatsusermessageinput.getText().toString();

        if (TextUtils.isEmpty(messageText))
        {
            Toast.makeText(this,"first write your message...",Toast.LENGTH_SHORT).show();
        }
        else
        {
            String messageSenderRef = "messages/" + messageSenderID + "/" + messageReceiverID;
            String messageReceiverRef = "messages/" + messageReceiverID + "/" + messageSenderID;

            DatabaseReference usermessageKeyRef = RootRef.child("messages")
                    .child(messageSenderID).child(messageReceiverID).push();

            String messagePushID = usermessageKeyRef.getKey();

            Map messageTextbody = new HashMap();
            messageTextbody.put("message",messageText);
            messageTextbody.put("type","text");
            messageTextbody.put("from",messageSenderID);
            messageTextbody.put("to",messageReceiverID);
            messageTextbody.put("messagEID",messagePushID);
            messageTextbody.put("time",saveCurrentTimE);
            messageTextbody.put("date",saveCurrentDatE);

            Map messageBodyDetails = new HashMap();
            messageBodyDetails.put(messageSenderRef + "/" + messagePushID,messageTextbody);
            messageBodyDetails.put( messageReceiverRef + "/" + messagePushID,messageTextbody);

            RootRef.updateChildren(messageBodyDetails).addOnCompleteListener(new OnCompleteListener() {
                @OverrIDe
                public voID onComplete(@NonNull Task task)
                {
                    if (task.issuccessful())
                    {
                        Toast.makeText(ChatsActivity.this,"message Sent successfully...",Toast.LENGTH_SHORT).show();
                    }
                    else
                    {
                        Toast.makeText(ChatsActivity.this,"Error",Toast.LENGTH_SHORT).show();
                    }
                    Chatsusermessageinput.setText("");
                }
            });
        }
    }

    private class SinchCallListener implements CallListener
    {

        @OverrIDe
        public voID onCallProgressing(Call call)
        {
            //call is ringing
            Toast.makeText(getApplicationContext(),"Ringing . . .",Toast.LENGTH_LONG).show();
        }

        @OverrIDe
        public voID onCallEstablished(Call call)
        {
            //incoming call was picked up
            Toast.makeText(getApplicationContext(),"Call Picked",Toast.LENGTH_LONG).show();
        }

        @OverrIDe
        public voID onCALLENded(Call endedCall)
        {
            //call ended by either party
            Toast.makeText(getApplicationContext(),"Call Ended",Toast.LENGTH_LONG).show();
            call = null;
            endedCall.hangup();
        }

        @OverrIDe
        public voID onShouldSendPushNotification(Call call,List<PushPair> List)
        {
            //don't worry about this right Now
        }
    }

    private class SinchCallClIEntListener implements CallClIEntListener
    {

        @OverrIDe
        public voID onIncomingCall(com.sinch.androID.rtc.calling.CallClIEnt callClIEnt,final Call call)
        {
            //Create the dialog for the incoming call here
            //Temporary UI
            AlertDialog alertDialog = new AlertDialog.builder(ChatsActivity.this).create();
            //AlertDialog.settitle("INCOMING CALL");
            alertDialog.setbutton(AlertDialog.button_NEUTRAL,"Reject",int which)
                {
                    dialog.dismiss();
                    call.hangup();

                }
            });

            alertDialog.setbutton(AlertDialog.button_POSITIVE,"Pick",int which)
                {
                    dialog.dismiss();
                    call.answer();
                    call.addCallListener(new SinchCallListener());
                    Toast.makeText(getApplicationContext(),"Call Started",Toast.LENGTH_LONG).show();
                }
            });

            alertDialog.show();

        }
    }



}

我的目标是进行基于 VoIP 的呼叫,我也尝试过 liblinphone 和 restcomm,但找不到 Sinch 提供的有意义的可跟踪演示,也欢迎任何替代方案

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

大佬总结

以上是大佬教程为你收集整理的Sinch API 失败全部内容,希望文章能够帮你解决Sinch API 失败所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:失败