I want to setup an Activity that can be chosen to navigate a captive portal.
When I select a WiFi network that is captive I want to be able to choose my app as the handler instead of starting the CaptivePortalLogin app that's preinstalled on every Android phone.
This works on a Pixel 2 and on a OnePlus 6t but it doesn't on any of the Samsung phones I have laying around here (S10 (9.0.0), S8 (8.0.0), A6 (8.0.0)). On the Samsung phones it instantly opens the CaptivePortalLogin app.
The CaptivePortalLogin app is not set as a default app on the Samsung phones.
I have setup the activity in the standard way:
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.net.conn.CAPTIVE_PORTAL"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
Is there a way to make Samsung phones behave the way all other phones behave?