Skip to content

Conversation

@aghontpi
Copy link
Owner

@aghontpi aghontpi commented Feb 24, 2025

AccuRadio ads were no longer being detected because the notification text wasn’t accessible via notification.extras. This PR refactors the detection logic to a more generic approach that:

  1. Inflates the RemoteViews (if available) into a temporary view hierarchy and recursively extracts text from any TextView instances.
  2. Falls back to reflection to read from mActions if the first method fails.

Additionally, it updates the logs to provide more detail on each step and handles exceptions gracefully to avoid crashes.

Changes

  • Added extractTextFromRemoteViews() to inflate and parse RemoteViews.
  • Added extractTextViaReflection() as a fallback method.

Additional Notes

  • These changes should handle any custom notification layouts used by AccuRadio (or similar apps) in future updates.

@aghontpi
Copy link
Owner Author

fix accuradio detection

@aghontpi aghontpi changed the base branch from master to development February 24, 2025 21:49
@aghontpi aghontpi merged commit a2b3e3b into development Feb 24, 2025
1 check failed
@aghontpi aghontpi deleted the fix/accuradio branch February 24, 2025 21:50
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