flutter-webrtc / dart-sip-ua

A dart-lang version of the SIP UA stack.
MIT License
339 stars 269 forks source link

Registration does not work on release - android #491

Closed Artemshchurev closed 4 weeks ago

Artemshchurev commented 1 month ago

I'm trying to build example project from this repository. I can register on debug and call works, but not on release.

Flutter 3.24.3 • channel stable

compileSdk 34 ndkVersion = '27.0.12077973'

buildTypes {
    release {
        signingConfig = signingConfigs.debug
        minifyEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

proguard-rules.pro: -keep class com.cloudwebrtc.webrtc.* { ; } -keep class org.webrtc.* { ; }

Please, help

Tin-Primas commented 1 month ago

Check for permissions i built an application and published it on the google store all functionality work except for Hold

Artemshchurev commented 1 month ago

@Tin-Primas Here's all the permissions I have `

`

stgni commented 1 month ago

İzinleri kontrol et Bir uygulama oluşturdum ve Google Store'da yayınladım, Hold hariç tüm işlevler çalışıyor

Do both Android and iOS work properly in the background? And can you make video calls?

Tin-Primas commented 1 month ago

@Tin-Primas Here's all the permissions I have <uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.camera.autofocus" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

This is what you put in your manifest but you haven't asked for the permission yet. You must have the code to ask for microphone access:

static Future<void> _requestMicPermission() async {
    if (defaultTargetPlatform == TargetPlatform.android ||
        defaultTargetPlatform == TargetPlatform.iOS) {
      await Permission.microphone.request();
      return;
    }
  }

İzinleri kontrol et Bir uygulama oluşturdum ve Google Store'da yayınladım, Hold hariç tüm işlevler çalışıyor

Do both Android and iOS work properly in the background? And can you make video calls?

We don't actually use the video call functionality. And it work properly on Android in background (not terminated state). I'm actually developing using flutter background service to make it work in terminated state

Artemshchurev commented 1 month ago

@Tin-Primas Thanks a lot, I'll try I guess the whole sip-dart community needs a new example app

Tin-Primas commented 1 month ago

@Artemshchurev ngl i clone this project and develop on my self now cause of the poor communication on this repo. Sadly but it is what it is

stgni commented 1 month ago

@Tin-PrimasÇok teşekkürler, deneyeceğim sanırım tüm sip-dart topluluğunun yeni bir örnek uygulamaya ihtiyacı var

There are many deficiencies in the application, it needs to be updated especially with features such as background callkit, no one can use the application properly right now.

Artemshchurev commented 1 month ago
static Future<void> _requestMicPermission() async {
    if (defaultTargetPlatform == TargetPlatform.android ||
        defaultTargetPlatform == TargetPlatform.iOS) {
      await Permission.microphone.request();
      return;
    }
  }

@Tin-Primas I've requested permission for mic, but there is still no connection on release apk. May be I should not to consider an example app from 'example' folder? Is there any article or some pieces of tutorial? Or may be there any chance I could message you directly and ask for help?

Tin-Primas commented 1 month ago
static Future<void> _requestMicPermission() async {
    if (defaultTargetPlatform == TargetPlatform.android ||
        defaultTargetPlatform == TargetPlatform.iOS) {
      await Permission.microphone.request();
      return;
    }
  }

@Tin-Primas I've requested permission for mic, but there is still no connection on release apk. May be I should not to consider an example app from 'example' folder? Is there any article or some pieces of tutorial? Or may be there any chance I could message you directly and ask for help?

You can DM me through my reddit account: https://www.reddit.com/user/Yukary

Artemshchurev commented 4 weeks ago

So, I don't know why, but example app does not work on release But I've built a new small app And method _sipuaHelper.start(uaSettings) works fine