In my previously mentioned quest to bring better emoji to my app's users, I'm using the JoyPixels font. There is a specific Android version of the font, called joypixels-android.ttf, which is in the files folder of my project. It's a large file - 22MB.
As part of the app startup, it's initialised along with other fonts, originally in a code module. SInce this error first appeared, I've tried moving it to Application_Resume as well, so the code I have there now says
The font file loads perfectly on my main test device with Android 8, and I thought everything was fine, until I tried the latest build on my backup phone, which is Android 6.
Whether I try loading the font in the Main module, or the code module, I get a runtime exception:
I'm curious as to whether there's anything in Android 6 that is causing this problem, or anything I can do to fix the problem directly. Obviously, If this is going to be a problem (and Play console reports the same error on an Android 5 device), I can simply check the android level, and not use the font on older devices, but I'd rather like to have the same visual experience for everyone, which is the main reason for using JoyPixels.
As part of the app startup, it's initialised along with other fonts, originally in a code module. SInce this error first appeared, I've tried moving it to Application_Resume as well, so the code I have there now says
B4X:
If joypixels.IsInitialized = False Then
joypixels = Typeface.LoadFromAssets("joypixels-android.ttf")
End If
The font file loads perfectly on my main test device with Android 8, and I thought everything was fine, until I tried the latest build on my backup phone, which is Android 6.
Whether I try loading the font in the Main module, or the code module, I get a runtime exception:
B4X:
java.lang.RuntimeException: Font not found /data/user/0/com.bluf.navigator/files/virtual_assets/joypixels-android.ttf.unpacked
I'm curious as to whether there's anything in Android 6 that is causing this problem, or anything I can do to fix the problem directly. Obviously, If this is going to be a problem (and Play console reports the same error on an Android 5 device), I can simply check the android level, and not use the font on older devices, but I'd rather like to have the same visual experience for everyone, which is the main reason for using JoyPixels.