Skip to content

Conversation

@kris-opti
Copy link
Contributor

@kris-opti kris-opti commented Jan 12, 2026

  • SessionHelper.isLaunchActivity: Add null check for activity.getComponentName() to prevent NullPointerException when component name is null

  • DeviceInfoProvider.getCityNameFromLocation: removed this now redundant method

Description of Changes

Adding in defensive checks when it comes to validating latitude/longitude values and potential null checks in getComponentName where it could be possible in some edge cases

Breaking Changes

  • None

Release Checklist

Prepare:

  • Detail any breaking changes. Breaking changes require a new major version number, and a migration guide in wiki / README.md

Bump versions in:

  • CHANGELOG.md
  • gradle.properties
  • add links to newly created wiki pages to readme
  • Update major version numbers in wiki (basic integration + push guides)

Integration tests

T&T Only

  • Init SDK with only optimove credentials
  • Associate customer
  • Associate email
  • Track events

Mobile Only

  • Init SDK with all credentials
  • Track events
  • Associate customer (verify both backends)
  • Register for push
  • Opt-in for In-App
  • Send test push
  • Send test In-App
  • Receive / trigger deep link handler (In-App/Push)
  • Receive / trigger the content extension, render image and action buttons for push
  • Verify push opened handler

Deferred Deep Links

  • With app installed, trigger deep link handler
  • With app uninstalled, follow deep link, install test bundle, verify deep link read from Clipboard, trigger deep link handler

Combined

  • Track event for T&T, verify push received
  • Trigger scheduled campaign, verify push received
  • Trigger scheduled campaign, verify In-App received

Release Procedure

  • Squash and merge dev to master
  • Delete branch once merged

- SessionHelper.isLaunchActivity: Add null check for activity.getComponentName()
  to prevent NullPointerException when component name is null

- DeviceInfoProvider.getCityNameFromLocation: Add coordinate validation
  to prevent IllegalArgumentException from Geocoder when latitude/longitude
  values are out of valid range (latitude: -90 to 90, longitude: -180 to 180)
@kris-opti kris-opti changed the title Add defensive null/validation checks to prevent crashes AB#271221 - Add defensive null/validation checks to prevent crashes Jan 12, 2026
…oadcastReceiver

- Add initialization checks in Optimobile.trackEvent() and related methods
- Add null check in PushBroadcastReceiver.maybeTriggerInAppSync()
- Remove getCityNameFromLocation() method from DeviceInfoProvider
- Update EventGenerator to pass null for location city name
@kris-opti kris-opti changed the title AB#271221 - Add defensive null/validation checks to prevent crashes AB#271221 - Add defensive null and remove redundant city code Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants