build: (deps): bump unifiedpush from 5.0.2 to 6.0.2
Bumps unifiedpush from 5.0.2 to 6.0.2. --- updated-dependencies: - dependency-name: unifiedpush dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
d879c27e3a
commit
1503f89357
6 changed files with 29 additions and 48 deletions
|
|
@ -16,6 +16,22 @@ dependencies {
|
||||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4") // For flutter_local_notifications // Workaround for: https://github.com/MaikuB/flutter_local_notifications/issues/2286
|
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4") // For flutter_local_notifications // Workaround for: https://github.com/MaikuB/flutter_local_notifications/issues/2286
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Workaround for https://pub.dev/packages/unifiedpush#the-build-fails-because-of-duplicate-classes
|
||||||
|
configurations.all {
|
||||||
|
// Use the latest version published: https://central.sonatype.com/artifact/com.google.crypto.tink/tink-android
|
||||||
|
val tink = "com.google.crypto.tink:tink-android:1.17.0"
|
||||||
|
// You can also use the library declaration catalog
|
||||||
|
// val tink = libs.google.tink
|
||||||
|
resolutionStrategy {
|
||||||
|
force(tink)
|
||||||
|
dependencySubstitution {
|
||||||
|
substitute(module("com.google.crypto.tink:tink")).using(module(tink))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "chat.fluffy.fluffychat"
|
namespace = "chat.fluffy.fluffychat"
|
||||||
compileSdk = flutter.compileSdkVersion
|
compileSdk = flutter.compileSdkVersion
|
||||||
|
|
|
||||||
|
|
@ -135,20 +135,6 @@
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<receiver android:name="org.unifiedpush.flutter.connector.UnifiedPushReceiver"
|
|
||||||
tools:replace="android:enabled"
|
|
||||||
android:enabled="false">
|
|
||||||
</receiver>
|
|
||||||
|
|
||||||
<receiver android:exported="false" android:enabled="true" android:name=".UnifiedPushReceiver">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="org.unifiedpush.flutter.connector.MESSAGE"/>
|
|
||||||
<action android:name="org.unifiedpush.flutter.connector.UNREGISTERED"/>
|
|
||||||
<action android:name="org.unifiedpush.flutter.connector.NEW_ENDPOINT"/>
|
|
||||||
<action android:name="org.unifiedpush.flutter.connector.REGISTRATION_FAILED" />
|
|
||||||
</intent-filter>
|
|
||||||
</receiver>
|
|
||||||
|
|
||||||
<!-- Don't delete the meta-data below.
|
<!-- Don't delete the meta-data below.
|
||||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||||
<meta-data
|
<meta-data
|
||||||
|
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
package chat.fluffy.fluffychat
|
|
||||||
|
|
||||||
import io.flutter.embedding.engine.FlutterEngine
|
|
||||||
import io.flutter.embedding.engine.dart.DartExecutor
|
|
||||||
import org.unifiedpush.flutter.connector.UnifiedPushReceiver
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
|
|
||||||
class UnifiedPushReceiver : UnifiedPushReceiver() {
|
|
||||||
override fun getEngine(context: Context): FlutterEngine {
|
|
||||||
var engine = MainActivity.engine
|
|
||||||
if (engine == null) {
|
|
||||||
engine = MainActivity.provideEngine(context)
|
|
||||||
engine.localizationPlugin.sendLocalesToFlutter(
|
|
||||||
context.resources.configuration
|
|
||||||
)
|
|
||||||
engine.dartExecutor.executeDartEntrypoint(
|
|
||||||
DartExecutor.DartEntrypoint.createDefault()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
return engine
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -94,7 +94,7 @@ class BackgroundPush {
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
await UnifiedPush.initialize(
|
await UnifiedPush.initialize(
|
||||||
onNewEndpoint: _newUpEndpoint,
|
onNewEndpoint: _newUpEndpoint,
|
||||||
onRegistrationFailed: _upUnregistered,
|
onRegistrationFailed: (_, i) => _upUnregistered(i),
|
||||||
onUnregistered: _upUnregistered,
|
onUnregistered: _upUnregistered,
|
||||||
onMessage: _onUpMessage,
|
onMessage: _onUpMessage,
|
||||||
);
|
);
|
||||||
|
|
@ -352,7 +352,8 @@ class BackgroundPush {
|
||||||
.registerAppWithDialog();
|
.registerAppWithDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _newUpEndpoint(String newEndpoint, String i) async {
|
Future<void> _newUpEndpoint(PushEndpoint newPushEndpoint, String i) async {
|
||||||
|
final newEndpoint = newPushEndpoint.url;
|
||||||
upAction = true;
|
upAction = true;
|
||||||
if (newEndpoint.isEmpty) {
|
if (newEndpoint.isEmpty) {
|
||||||
await _upUnregistered(i);
|
await _upUnregistered(i);
|
||||||
|
|
@ -412,7 +413,8 @@ class BackgroundPush {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _onUpMessage(Uint8List message, String i) async {
|
Future<void> _onUpMessage(PushMessage pushMessage, String i) async {
|
||||||
|
final message = pushMessage.content;
|
||||||
upAction = true;
|
upAction = true;
|
||||||
final data = Map<String, dynamic>.from(
|
final data = Map<String, dynamic>.from(
|
||||||
json.decode(utf8.decode(message))['notification'],
|
json.decode(utf8.decode(message))['notification'],
|
||||||
|
|
@ -446,7 +448,7 @@ class UPFunctions extends UnifiedPushFunctions {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> registerApp(String instance) async {
|
Future<void> registerApp(String instance) async {
|
||||||
await UnifiedPush.registerApp(instance, features);
|
await UnifiedPush.register(instance: instance, features: features);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
12
pubspec.lock
12
pubspec.lock
|
|
@ -2005,26 +2005,26 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: unifiedpush
|
name: unifiedpush
|
||||||
sha256: "6dbed5a6305ca33f1865c7a3d814ae39476b79a2d23ca76a5708f023f405730f"
|
sha256: "1418375efb580af9640de4eaf4209cb6481f9a48792648ced3051f30e67d9568"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.2"
|
version: "6.0.2"
|
||||||
unifiedpush_android:
|
unifiedpush_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: unifiedpush_android
|
name: unifiedpush_android
|
||||||
sha256: "7443dece0a850ae956514f809983eb2b39fc518c2c7d24dbfe817198bec89134"
|
sha256: "2f25db8eb2fc3183bf2e43db89fff20b2587adc1c361e1d1e06b223a0d45b50a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.0"
|
version: "3.1.1"
|
||||||
unifiedpush_platform_interface:
|
unifiedpush_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: unifiedpush_platform_interface
|
name: unifiedpush_platform_interface
|
||||||
sha256: dd588d78a8b2bfc10430e30035526e98caa543d0b7364a6344b5eb4815721c6d
|
sha256: bb49d2748211520e35e0374ab816faa8a2c635267e71909d334ad868d532eba5
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.2"
|
version: "3.0.1"
|
||||||
unifiedpush_ui:
|
unifiedpush_ui:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ dependencies:
|
||||||
sqlcipher_flutter_libs: ^0.6.7
|
sqlcipher_flutter_libs: ^0.6.7
|
||||||
swipe_to_action: ^0.3.0
|
swipe_to_action: ^0.3.0
|
||||||
tor_detector_web: ^1.1.0
|
tor_detector_web: ^1.1.0
|
||||||
unifiedpush: ^5.0.1
|
unifiedpush: ^6.0.2
|
||||||
unifiedpush_ui: ^0.1.0
|
unifiedpush_ui: ^0.1.0
|
||||||
universal_html: ^2.2.4
|
universal_html: ^2.2.4
|
||||||
url_launcher: ^6.3.2
|
url_launcher: ^6.3.2
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue