Closed kevinchalet closed 2 months ago
This PR introduces built-in support for Android API 21+ (Android 5.0 and higher).
Note: unlike the iOS integration, Android requires defining a custom Activity to handle callbacks. E.g on MAUI:
Activity
[Activity(NoHistory = true, LaunchMode = LaunchMode.SingleTop, Exported = true)] [IntentFilter([Intent.ActionView], Categories = [Intent.CategoryDefault, Intent.CategoryBrowsable], DataScheme = "com.openiddict.sandbox.maui.client")] public class CallbackActivity : Activity { protected override async void OnCreate(Bundle? savedInstanceState) { base.OnCreate(savedInstanceState); if (Intent is not Intent intent) { return; } var provider = IPlatformApplication.Current?.Services ?? throw new InvalidOperationException("The DI provider cannot be resolved."); var service = provider.GetRequiredService<OpenIddictClientSystemIntegrationService>(); try { await service.HandleCustomTabsIntentAsync(intent); } finally { Finish(); } } }
This PR introduces built-in support for Android API 21+ (Android 5.0 and higher).
Note: unlike the iOS integration, Android requires defining a custom
Activity
to handle callbacks. E.g on MAUI: