Skip to content

Commit

Permalink
Merge pull request #622 from hiennguyen92/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
hiennguyen92 authored Jan 4, 2025
2 parents fd7dd0d + 7acfdbc commit 4b656fa
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
## 2.5.0
* update jvmToolchain(17) for Android

## 2.0.4+2
* add func `requestFullIntentPermission` (Android 14+) thank @Spyspyspy https://github.com/hiennguyen92/flutter_callkit_incoming/pull/584
* set Notification call style (Android) thank @AAkira https://github.com/hiennguyen92/flutter_callkit_incoming/pull/553
* Many other issues
1. add prop `accepted` in activeCalls (iOS) thank @vasilich6107
2.

## 2.0.4+1
* Removed `Telecom Framework` (Android)
Expand Down
4 changes: 4 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ android {
if (project.android.hasProperty("namespace")) {
namespace "com.hiennv.flutter_callkit_incoming"
}

kotlin {
jvmToolchain(17)
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ class CircleTransform : Transformation {
if (squaredBitmap != source) {
source.recycle()
}
val bitmap = Bitmap.createBitmap(size, size, source.config)
val config = source.config ?: Bitmap.Config.ARGB_8888
val bitmap = Bitmap.createBitmap(size, size, config)
val canvas = Canvas(bitmap)
val paint = Paint()
val shader = BitmapShader(
Expand Down
21 changes: 12 additions & 9 deletions ios/Classes/SwiftFlutterCallkitIncomingPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,18 @@ public class SwiftFlutterCallkitIncomingPlugin: NSObject, FlutterPlugin, CXProvi
}
}

// private func checkUnlockedAndFulfill(action: CXAnswerCallAction, counter: Int) {
// if UIApplication.shared.isProtectedDataAvailable {
// action.fulfill()
// } else if counter > 180 { // fail if waiting for more then 3 minutes
// action.fail()
// } else {
// DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
// self.checkUnlockedAndFulfill(action: action, counter: counter + 1)
// }
// }
// }


public func provider(_ provider: CXProvider, perform action: CXEndCallAction) {
guard let call = self.callManager.callWithUUID(uuid: action.callUUID) else {
Expand Down Expand Up @@ -662,15 +674,6 @@ public class SwiftFlutterCallkitIncomingPlugin: NSObject, FlutterPlugin, CXProvi
print("Call is on hold")
return
}
self.outgoingCall?.endCall()
if(self.outgoingCall != nil){
self.outgoingCall = nil
}
self.answerCall?.endCall()
if(self.answerCall != nil){
self.answerCall = nil
}
self.callManager.removeAllCalls()

self.sendEvent(SwiftFlutterCallkitIncomingPlugin.ACTION_CALL_TOGGLE_AUDIO_SESSION, [ "isActivate": false ])
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_callkit_incoming
description: Flutter Callkit Incoming to show callkit screen in your Flutter app.
version: 2.0.4+2
version: 2.5.0
homepage: https://github.com/hiennguyen92/flutter_callkit_incoming
repository: https://github.com/hiennguyen92/flutter_callkit_incoming
issue_tracker: https://github.com/hiennguyen92/flutter_callkit_incoming/issues
Expand Down

0 comments on commit 4b656fa

Please sign in to comment.