Closed yoobi closed 9 months ago
Thanks @yoobi great suggestion, odd how I just never considered making the dependency transitive due to how I already used it in my projects π
Providing custom parser should be possible since there's a contract for EmojiManager https://github.com/AniTrend/android-emojify/blob/develop/emojify/src/main/kotlin/io/wax911/emojify/manager/IEmojiManager.kt is a public API and the parser applies extension on it, what exact usecase did you have in mind
NB: Also any reason why minSdk is 23 ? To be honest no real reason, it was mostly motivated by the Android API Distribution charts
I was thinking of something like
interface IEmojiDeserializer {
/**
* Decodes the given [inputStream] to an object of type List<[Emoji]>
*/
fun decodeFromStream(inputStream: InputStream): List<Emoji>
}
interface IEmojiManager {
....
val serializer: IEmojiDeserializer
}
So that each user can implement their own serializer (in my project I often user Moshi, but other might prefer gson etc....)
Also would it be possible to revert the minSdk to 21 ?
I have managed a way to do it simply but there would be a breaking change, user will need to declare in the manifest of their app the EmojiInitializer
I'll provide a PR
Tell me what you think about my PR :)
Hey, sorry for getting back to you after so long. I haven't been well.
No worries ! This PR can wait for you to feel better
Thanks, feeling a lot better now! Thank you for taking the time to implement these changes and addressing the many comments π appreciate the help
Glad to hear you're feeling better :) No worries ! It was fun, I'll rename the abstract class tomorrow
Feel free to merge the PR whenever you're ready \π/
Thanks ! It seems I don't have the right to merge the pull request
Description of Bug
Kotlinxserialization is missing in 1.7.1 package which cause the emojiManager to fail loading and parsing the
emoji.json
Here is the logs:Reproduction Steps
Implement the library via jitpack and start the app.
To solve
In order to solve this issue there are multiple solution I have in mind:
implementation(libs.jetbrains.kotlinx.serialization.json)
intoapi(libs.jetbrains.kotlinx.serialization.json)
NB: Also any reason why minSdk is 23 ?