Calvin-LL / AutoLinkText

A simple library that makes links, emails, and phone numbers clickable in text in Jetpack Compose and Kotlin Compose Multiplatform.
Apache License 2.0
57 stars 2 forks source link

Linkify Addresses #4

Open Tgo1014 opened 1 week ago

Tgo1014 commented 1 week ago

Would it be possible to add default text rules to automatically linkify addresses?

Calvin-LL commented 4 days ago

Unfortunately for Android, there is no built-in address detector. (See https://developer.android.com/reference/androidx/core/util/PatternsCompat) You can use your own though.

Tgo1014 commented 3 days ago

Hello @Calvin-LL, actually there is.

There was this deprecated flag: https://developer.android.com/reference/android/text/util/Linkify#MAP_ADDRESSES and how there's this https://developer.android.com/reference/android/view/textclassifier/TextClassifier#TYPE_ADDRESS which support addresses but also other things like flights, that could also be an option to be added.

Can you take a look and see if it's worth to reopen this issue? Thanks!

Calvin-LL commented 3 days ago

Oh I see, thanks for digging into it. I'll take a look when I have time next week.