Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package | permission package #23

Open
wants to merge 36 commits into
base: flutter-3-migration
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
44f0a96
chore : test flutter 3 support
pranavo72bex Nov 4, 2022
4865ca0
fix : typo
pranavo72bex Nov 7, 2022
1fac689
chore : update code
pranavo72bex Nov 7, 2022
e1201f9
Test : crashing of app in android 12
pranavo72bex Nov 7, 2022
4eea496
chore : update permission package test
pranavo72bex Nov 7, 2022
d498cba
chore : crashing of android test
pranavo72bex Nov 8, 2022
1c473d3
Revert "chore : crashing of android test"
pranavo72bex Nov 8, 2022
344a610
fix : bluetooth crash in flutter 3
pranavo72bex Mar 24, 2023
8f72cff
chore : uncomment crashing code
pranavo72bex Mar 27, 2023
8e02ff7
test : asking bluetooth permission
pranavo72bex Mar 27, 2023
5911728
testing
pranavo72bex Mar 27, 2023
184aba6
chore : fix
pranavo72bex Mar 27, 2023
39f49e8
chore : minor change
pranavo72bex Mar 27, 2023
a821dae
handled bluetooth adapter as null
CrestNiraj12 Mar 27, 2023
9212e80
chore : uncomment code
pranavo72bex Mar 27, 2023
03a3803
Revert "chore : uncomment code"
pranavo72bex Mar 28, 2023
67e76e3
chore: disbale bluetoothpreferred
pranavo72bex Mar 28, 2023
329661a
test : disabe applyBluetoothSettings()
n3rdkid Mar 28, 2023
1930b2d
Merge pull request #5 from pranavo72bex/fix-flutter-3-support
n3rdkid Apr 4, 2023
6575609
twilio video バージョン更新
KohsakuOnozawa Nov 4, 2023
8b196cf
Merge pull request #17 from wesionaryTEAM/onozawa/update_twilio_video
n3rdkid Nov 9, 2023
246dc58
バージョンを固定にする
KohsakuOnozawa Dec 2, 2023
18d28d9
[test]chore: update kotlin version
pranavo72bex Dec 6, 2023
4a6d601
chore: replace android-extensions with parcelize
pranavo72bex Dec 6, 2023
ebd0193
Merge pull request #18 from wesionaryTEAM/onozawa/update_twilio_video-2
n3rdkid Dec 6, 2023
b42e50d
Merge branch 'master-flutter-3' of github.com:wesionaryTEAM/twilio_pr…
bibek-magar Dec 28, 2023
60470a4
fix: fix kotlin version
bibek-magar Dec 28, 2023
8ffd360
fix: remove unused bluetooth code
bibek-magar Dec 28, 2023
5d2608b
fix: comment remove unused code
bibek-magar Dec 28, 2023
3d6894e
fix: revert changes for testing
bibek-magar Dec 28, 2023
8472e46
fix: revert changes
bibek-magar Dec 28, 2023
e4b9796
fix: remove bluetooth preffered
bibek-magar Dec 28, 2023
5576300
fix: remove bluetooth preffered
bibek-magar Dec 28, 2023
e741541
Merge pull request #21 from wesionaryTEAM/bluetooth-permission-fix
pranavo72bex Dec 28, 2023
68eb22a
Merge pull request #20 from wesionaryTEAM/update-kotlin-version
n3rdkid Dec 28, 2023
b10cc28
feat: update packages
pranavo72bex May 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions programmable_video/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ group 'twilio.flutter.twilio_programmable_video'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.4.0'
ext.twilio_video_version = '6.4.+'
ext.kotlin_version = '1.8.0'
ext.twilio_video_version = '7.6.4'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -24,10 +24,10 @@ rootProject.allprojects {

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-parcelize'

android {
compileSdkVersion 28
compileSdkVersion 31

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -44,6 +44,10 @@ android {
sourceCompatibility 1.8
targetCompatibility 1.8
}
buildFeatures {
viewBinding true
}

}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ class AudioNotificationListener() : BaseListener() {
}

override fun onServiceConnected(profile: Int, proxy: BluetoothProfile?) {
debug("onServiceConnected => profile: $profile, proxy: $proxy")
// if (profile == BluetoothProfile.HEADSET) {
// bluetoothProfile = proxy
// if (bluetoothProfile!!.connectedDevices.size > 0 &&
// TwilioProgrammableVideoPlugin.pluginHandler.audioSettings.bluetoothPreferred) {
// TwilioProgrammableVideoPlugin.pluginHandler.applyAudioSettings()
// }
// }
// debug("onServiceConnected => profile: $profile, proxy: $proxy")
// if (profile == BluetoothProfile.HEADSET) {
// bluetoothProfile = proxy
// if (bluetoothProfile!!.connectedDevices.size > 0 &&
// TwilioProgrammableVideoPlugin.pluginHandler.audioSettings.bluetoothPreferred) {
// TwilioProgrammableVideoPlugin.pluginHandler.applyAudioSettings()
// }
// }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ class AudioSettings(speakerEnabled: Boolean = true, bluetoothPreferred: Boolean

fun reset() {
speakerEnabled = true
bluetoothPreferred = true
bluetoothPreferred = false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,38 @@ import io.flutter.plugin.platform.PlatformViewFactory
class ParticipantViewFactory(createArgsCodec: MessageCodec<Any>, private val plugin: PluginHandler) : PlatformViewFactory(createArgsCodec) {
private val TAG = "RoomListener"

override fun create(context: Context, viewId: Int, args: Any?): PlatformView? {
override fun create(context: Context?, viewId: Int, args: Any?): PlatformView {
var videoTrack: VideoTrack? = null
val params = args as? Map<*, *> ?: throw IllegalStateException("args cannot be null")

if (args != null) {
val params = args as Map<String, Any>
if (params.containsKey("isLocal")) {
debug("create => constructing local view")
val localParticipant = plugin.getLocalParticipant()
if (localParticipant != null && localParticipant.localVideoTracks != null && localParticipant.localVideoTracks?.size != 0) {
videoTrack = localParticipant.localVideoTracks!![0].localVideoTrack
}
if (params["isLocal"] == true) {
debug("create => constructing local view with params: '${params.values.joinToString(", ")}'")
val localVideoTrackName = params["name"] as? String ?: ""
if (localVideoTrackName != "" && localVideoTrackName in TwilioProgrammableVideoPlugin.localVideoTracks) {
videoTrack = TwilioProgrammableVideoPlugin.localVideoTracks[localVideoTrackName]
} else {
debug("create => constructing view with params: '${params.values.joinToString(", ")}'")
if (params.containsKey("remoteParticipantSid") && params.containsKey("remoteVideoTrackSid")) {
val remoteParticipant = plugin.getRemoteParticipant(params["remoteParticipantSid"] as String)
val remoteVideoTrack = remoteParticipant?.remoteVideoTracks?.find { it.trackSid == params["remoteVideoTrackSid"] }
if (remoteParticipant != null && remoteVideoTrack != null) {
videoTrack = remoteVideoTrack.remoteVideoTrack
}
val localParticipant = plugin.getLocalParticipant()
if (localParticipant?.localVideoTracks?.isNotEmpty() == true) {
videoTrack = localParticipant.localVideoTracks.firstOrNull()?.localVideoTrack
}
}

if (videoTrack != null) {
val videoView = VideoView(context)
videoView.mirror = params["mirror"] as Boolean
return ParticipantView(videoView, videoTrack)
} else {
debug("create => constructing view with params: '${params.values.joinToString(", ")}'")
if ("remoteParticipantSid" in params && "remoteVideoTrackSid" in params) {
val remoteParticipant = plugin.getRemoteParticipant(params["remoteParticipantSid"] as String)
val remoteVideoTrack = remoteParticipant?.remoteVideoTracks?.find { it.trackSid == params["remoteVideoTrackSid"] }
if (remoteParticipant != null && remoteVideoTrack != null) {
videoTrack = remoteVideoTrack.remoteVideoTrack
}
}
}

return null
if (videoTrack == null) {
throw IllegalStateException("Could not create VideoTrack")
}
val videoView = VideoView(context as Context)
videoView.mirror = params["mirror"] as Boolean
return ParticipantView(videoView, videoTrack)
}

internal fun debug(msg: String) {
Expand Down
Loading