Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions packages/firebase_dynamic_links/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.0+5

* Fix the bug below properly by allowing the activity to be null (but still registering the plugin). If activity is null, we don't get a latestIntent, instead we expect the intent listener to grab it.

## 0.4.0+4

* Fixed bug on Android when a headless plugin tries to register this plugin causing a crash due no activity from the registrar.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ public class FirebaseDynamicLinksPlugin implements MethodCallHandler {

private FirebaseDynamicLinksPlugin(Registrar registrar) {
this.registrar = registrar;
latestIntent = registrar.activity().getIntent();
if (registrar.activity() != null) {
latestIntent = registrar.activity().getIntent();
}

registrar.addNewIntentListener(
new PluginRegistry.NewIntentListener() {
Expand All @@ -41,9 +43,6 @@ public boolean onNewIntent(Intent intent) {
}

public static void registerWith(Registrar registrar) {
if (registrar.activity() == null) {
return;
}
final MethodChannel channel =
new MethodChannel(registrar.messenger(), "plugins.flutter.io/firebase_dynamic_links");
channel.setMethodCallHandler(new FirebaseDynamicLinksPlugin(registrar));
Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_dynamic_links/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: firebase_dynamic_links
description: Flutter plugin for Google Dynamic Links for Firebase, an app solution for creating
and handling links across multiple platforms.
version: 0.4.0+4
version: 0.4.0+5

author: Flutter Team <[email protected]>
homepage: https://github.com/flutter/plugins/tree/master/packages/firebase_dynamic_links
Expand Down