9

I want to write a custom font provider to share fonts between apps. As I understand from docs font provider should be installed as separate application:

A font provider is an application that retrieves fonts

But how this application can be installed on user device? Ask user explicitly to install it from Google Play? It seems not very good user experience.

Bracadabra
  • 3,609
  • 3
  • 26
  • 46
  • 1
    What I would love to see is a way to upload a font provider to Play Store and then tag it as a dependency to an app. That way when the user went to download two of your apps they would (behind the covers) download your fonts provider once and then both apps could share usage of it. – Elliott Aug 22 '17 at 20:22
  • hope your problem is solved, if you can help me sharing font provider app source code – Dream Developer Oct 15 '17 at 04:05
  • What does your implementation look like? It's just a content provider that implements FontsContract right? – dazza5000 Jan 08 '19 at 00:48
  • I did not return to the problem after this question, but I find one implementation on GitHub https://github.com/RikkaApps/FontProvider – Bracadabra Jan 10 '19 at 18:52
  • @Bracadabra Is this app an actual font provider like Google Fonts? – Florian Walther Aug 17 '19 at 08:55

1 Answers1

4

But how this application can be installed on user device?

The same way as any other application, AFAICT.

Ask user explicitly to install it from Google Play?

Or Yandex Store or wherever. Or, negotiate to have it be pre-installed on certain devices.

It seems not very good user experience.

It would be the same user experience as with any other app ever written for Android.

If some other app requires some specific font, which in turn specifically requires some specific font provider app, that would be a bad user experience. However, the problem here is in the app using the font, not the font provider itself.

Given all of the trouble of using a non-standard font provider, beyond the question of whether it is installed (e.g., have to bake in a certificate for it), I do not expect such providers to be very popular, except perhaps Google's own one (and even that I can't recommend using). IMHO, font providers feel very much like a solution in search of a real problem.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • 1
    The part I am struggling with is that it seems that this is accomplished either from another app with a font provider you know about or through some negotiations an OEM includes a font provider in their phones. I would agree with you that this provider pattern seems to be searching for a real world problem. Likely most of us suffer the, **My app is large and I don't want to multi-apk but I need to add a new font** which was what I was hoping they would have solved for when defining font providers. – Elliott Aug 22 '17 at 20:18
  • If it's a custom font, then most likely there won't be many (if any) other apps using that font. Seems like the best thing to do is simply bundle the actual font file as a resource and use it directly – vanshg Oct 20 '17 at 18:54
  • So are there any font providers today besides Google Fonts on Android? – Florian Walther Aug 16 '19 at 17:07
  • @FlorianWalther: I have not heard of any, but, then again, I have not been looking for one either. – CommonsWare Aug 16 '19 at 17:10