diff --git a/CHANGELOG.md b/CHANGELOG.md index 434c2b91..635c375b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 7.0.1 +* Fix issue #255: `Attempt to invoke virtual method 'int android.content.Intent.getFlags()' on a null object reference` + ## 7.0.0 ⚠️ This is a major release which contains breaking API changes. ### BREAKING CHANGE diff --git a/android/src/main/java/br/com/rsmarques/flutter_branch_sdk/FlutterBranchSdkPlugin.java b/android/src/main/java/br/com/rsmarques/flutter_branch_sdk/FlutterBranchSdkPlugin.java index d417f09e..a3d668e0 100644 --- a/android/src/main/java/br/com/rsmarques/flutter_branch_sdk/FlutterBranchSdkPlugin.java +++ b/android/src/main/java/br/com/rsmarques/flutter_branch_sdk/FlutterBranchSdkPlugin.java @@ -29,6 +29,7 @@ import io.branch.referral.util.LinkProperties; import io.branch.referral.util.ShareSheetStyle; import io.branch.referral.validators.IntegrationValidator; +import io.flutter.BuildConfig; import io.flutter.embedding.engine.plugins.FlutterPlugin; import io.flutter.embedding.engine.plugins.activity.ActivityAware; import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding; @@ -99,6 +100,7 @@ private void setupChannels(BinaryMessenger messenger, Context context) { private void setActivity(Activity activity) { LogUtils.debug(DEBUG_NAME, "setActivity call"); this.activity = activity; + initialIntent = activity.getIntent(); activity.getApplication().registerActivityLifecycleCallbacks(this); } @@ -182,7 +184,6 @@ public void onActivityCreated(Activity activity, Bundle bundle) { public void onActivityStarted(Activity activity) { LogUtils.debug(DEBUG_NAME, "onActivityStarted call"); if (!isInitialized) { - initialIntent = activity.getIntent(); return; } Branch.sessionBuilder(activity).withCallback(branchReferralInitListener).withData(activity.getIntent().getData()).init(); @@ -445,6 +446,7 @@ private void setupBranch(MethodCall call, final Result result) { Branch.getInstance().disableTracking(true); } this.context.startActivity(initialIntent); + result.success(Boolean.TRUE); } diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 8e908fb6..beb41d1c 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,7 +1,7 @@ PODS: - BranchSDK (3.0.0) - Flutter (1.0.0) - - flutter_branch_sdk (7.0.0-beta.2): + - flutter_branch_sdk (7.0.0): - BranchSDK (~> 3.0.0) - Flutter @@ -22,8 +22,8 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: BranchSDK: e9c0332b2655cf0357d93db479d07152b059e434 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - flutter_branch_sdk: d44ccbe957868d4ff816258a436c23959f6e4cda + flutter_branch_sdk: 1a1b950264cf647d44b221386e64add8a56df78a PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048 -COCOAPODS: 1.13.0 \ No newline at end of file +COCOAPODS: 1.13.0 diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist index 1f92358a..ea27b3bd 100644 --- a/example/ios/Runner/Info.plist +++ b/example/ios/Runner/Info.plist @@ -1,80 +1,80 @@ - - CADisableMinimumFrameDurationOnPhone - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Flutter Branch Sdk - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - flutter_branch_sdk_example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLSchemes - - flutterbranchsdk - - CFBundleURLName - br.com.rsmarques.flutter-branch-sdk-example - - - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - NSUserTrackingUsageDescription - App would like to access IDFA for tracking purpose - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - branch_key - - live - key_live_bkJRqpb15wLqUAgsDVNUIobjyviWi6Wx - test - key_test_ipQTteg11ENANDeCzSXgqdgfuycWoXYH - - branch_universal_link_domains - - flutterbranchsdk.app.link - flutterbranchsdk-alternate.app.link - flutterbranchsdk-alternate.test-app.link - flutterbranchsdk.test-app.link - - UIApplicationSupportsIndirectInputEvents + + CADisableMinimumFrameDurationOnPhone + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Flutter Branch Sdk + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + flutter_branch_sdk_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleURLTypes + + + CFBundleTypeRole + Editor + CFBundleURLSchemes + + flutterbranchsdk + + CFBundleURLName + br.com.rsmarques.flutter-branch-sdk-example + + + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + NSUserTrackingUsageDescription + App would like to access IDFA for tracking purpose + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + branch_key + + test + key_test_ipQTteg11ENANDeCzSXgqdgfuycWoXYH + live + key_live_bkJRqpb15wLqUAgsDVNUIobjyviWi6Wx + + branch_universal_link_domains + + flutterbranchsdk.app.link + flutterbranchsdk-alternate.app.link + flutterbranchsdk-alternate.test-app.link + flutterbranchsdk.test-app.link + + UIApplicationSupportsIndirectInputEvents diff --git a/example/lib/main.dart b/example/lib/main.dart index af9d7d8a..4437fc24 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -27,7 +27,7 @@ void main() async { */ //await FlutterBranchSdk.requestTrackingAuthorization(); await FlutterBranchSdk.init( - useTestKey: false, enableLogging: false, disableTracking: false); + useTestKey: true, enableLogging: true, disableTracking: false); runApp(const MyApp()); } diff --git a/example/pubspec.lock b/example/pubspec.lock index 357fb626..9ed664dd 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -68,7 +68,7 @@ packages: path: ".." relative: true source: path - version: "7.0.0" + version: "7.0.1" flutter_lints: dependency: "direct dev" description: @@ -214,4 +214,4 @@ packages: version: "0.1.4-beta" sdks: dart: ">=3.1.0-185.0.dev <4.0.0" - flutter: ">=3.3.0" \ No newline at end of file + flutter: ">=3.3.0" diff --git a/lib/src/flutter_branch_sdk_method_channel.dart b/lib/src/flutter_branch_sdk_method_channel.dart index 3575708a..ba0e720c 100644 --- a/lib/src/flutter_branch_sdk_method_channel.dart +++ b/lib/src/flutter_branch_sdk_method_channel.dart @@ -9,7 +9,7 @@ import 'objects/branch_universal_object.dart'; /// An implementation of [FlutterBranchSdkPlatform] that uses method channels. class FlutterBranchSdkMethodChannel implements FlutterBranchSdkPlatform { - static const PLUGIN_VERSION = "7.0.0"; + static const PLUGIN_VERSION = "7.0.1"; static const MESSAGE_CHANNEL = 'flutter_branch_sdk/message'; static const EVENT_CHANNEL = 'flutter_branch_sdk/event'; diff --git a/pubspec.lock b/pubspec.lock index 799ac825..f0b6e168 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -199,4 +199,4 @@ packages: version: "0.1.4-beta" sdks: dart: ">=3.1.0-185.0.dev <4.0.0" - flutter: ">=3.3.0" \ No newline at end of file + flutter: ">=3.3.0" diff --git a/pubspec.yaml b/pubspec.yaml index bd3a91b0..1e3835c3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_branch_sdk description: Flutter Plugin for create deep link using Brach SDK (https://branch.io). This plugin provides a cross-platform (iOS, Android, Web). -version: 7.0.0 +version: 7.0.1 homepage: https://github.com/RodrigoSMarques/flutter_branch_sdk environment: