Ibrahim Chowdhury
Ibrahim Chowdhury

Reputation: 31

Problem to integrate Jitsi Meet Sdk with linphone

I am using JItsi meet api for video call on linphone android app open source project. I have followed jitsi meet handbook for integrating on linphone.

Here is my sample code:

public class JitsiActivity extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    URL serverURL;
    try {
        serverURL = new URL("https://meet.jit.si");
    } catch (MalformedURLException e) {
        e.printStackTrace();
        throw new RuntimeException("Invalid server URL!");
    }
    JitsiMeetConferenceOptions defaultOptions =
            new JitsiMeetConferenceOptions.Builder()
                    .setServerURL(serverURL)
                    .setWelcomePageEnabled(false)
                    .build();
    JitsiMeet.setDefaultConferenceOptions(defaultOptions);

    JitsiMeetConferenceOptions options =
            new JitsiMeetConferenceOptions.Builder().setRoom("linphone").build();
    JitsiMeetActivity.launch(this, options);
    finish();
}

}

I have successfully made a call on debug mode, after making an apk on release mode, It refresh activity when I attempt to make a video call and go to home page. can you give me a guideline to solve this problem. I have tested apk on Android 10 OS.

--After Debugging on release mode I have found this error

020-09-24 16:50:12.383 10364-10364/org.linphone E/AndroidRuntime: FATAL EXCEPTION: main Process: org.linphone, PID: 10364 java.lang.IllegalArgumentException: reportSizeConfigurations: ActivityRecord not found for: Token{2329006 ActivityRecord{cf5fae1 u0 org.linphone/.activities.JitsiActivity d-1 s-1 t-1 f}} at android.os.Parcel.createException(Parcel.java:1967) at android.os.Parcel.readException(Parcel.java:1931) at android.os.Parcel.readException(Parcel.java:1881) at android.app.IActivityManager$Stub$Proxy.reportSizeConfigurations(IActivityManager.java:8621) at android.app.ActivityThread.reportSizeConfigurations(ActivityThread.java:3360) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3318) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:113) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:71) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2043) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:224) at android.app.ActivityThread.main(ActivityThread.java:7096) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:536) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:928) Caused by: android.os.RemoteException: Remote stack trace: at com.android.server.am.ActivityManagerService.reportSizeConfigurations(ActivityManagerService.java:10305) at android.app.IActivityManager$Stub.onTransact$reportSizeConfigurations$(IActivityManager.java:12560) at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2357) at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3841) at android.os.Binder.execTransact(Binder.java:750)

Upvotes: 0

Views: 812

Answers (1)

JakeB
JakeB

Reputation: 2113

You need to provide a stacktrace to for anyone to help you debug it, however, this code can be simplified greatly which would lead to easier debugging..

You are supplying Jitsi with it's own default server url "https://meet.jit.si" which isn't necessary as Jitsi will use it's own server anyway. If you were planning on using your own server you can still provide that easily in the JitsiMeetActivity::launch method as the room parameter... JitsiMeetActivity.launch(context, "https://myserver.com/linphone")

Removing all the unnecessary boiler-plate will leave you with this:

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    JitsiMeetActivity.launch(this, "linphone");
}

Upvotes: 1

Related Questions