element-hq / element-hq/element-android

[SDK] How to override with Dagger injections, when everything is INTERNAL

Open
#4,724 3 comments 0 reactions 0 assignees View on GitHub
matrix-sdk T-Enhancement
Dominant language
Kotlin
Stars
3.7k
Forks
917
PR merge metrics
No merged PRs in 30d

Description

### Description

Keanu would like to inject custom HTTP headers in requests (specifically during account registration).

Of course we could do that with Retrofit interceptors, but how to do that, when everything is internal?

https://gitlab.com/keanuapp/keanuapp-ios/-/issues/236#note_645003296

As far as I understand, I would need to do my own `DefaultAuthenticationService` and inject that in my own `Matrix` class. But all the other stuff which I don't want to touch is in the internal namespace, and therefore inaccessible. I would need to copy all the concrete implementations of the interfaces, too.

Or do I miss something here?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.