Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for new UnifiedPush specifications, and fallback to the previous ones. #98

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

p1gp1g
Copy link

@p1gp1g p1gp1g commented Nov 12, 2024

The specifications where updated recently: https://codeberg.org/UnifiedPush/specifications/pulls/1

Mainly it adds

  • Add the capacity to set a default distributor per system (with the Link Activity)
  • VAPID support
  • Ability to raise the connected app to the foreground
  • Reduce ability to impersonate another app to create a topic, used to rate limit number of registrations per user
  • Clarify some stuff, like the reasons why a registration fail

@redstrate
Copy link

Note that in order for BRING_TO_FOREGROUND to work in modern Android without being blocked by PackageManager, you need this in the AndroidManifests.xml:

    <queries>
        <intent>
            <action android:name="org.unifiedpush.android.distributor.RAISE_TO_FOREGROUND" />
        </intent>
    </queries>

Otherwise the receiving app is never visible, and it will never end up calling the Service :)

@p1gp1g
Copy link
Author

p1gp1g commented Dec 22, 2024

Indeed, that explain why it failed sometimes. Surprisingly:

  • It don't always fail, maybe it works after the targettted app sends an intent to ntfy ?
  • It works when filtering other actions, for instance the following. This is why I missed it, I didn't have to do it for NextPush
    <queries>
        <intent>
            <action android:name="org.unifiedpush.android.connector.NEW_ENDPOINT" />
        </intent>
    </queries>

@redstrate
Copy link

It don't always fail, maybe it works after the targettted app sends an intent to ntfy ?

In my case it was blocking actions from ntfy to the app, I'm not sure exactly why this specific intent was blocked while the others were fine. Unfortunately PackageManager doesn't explain itself when it blocks :D

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