Custom Font and Map Markers not showing in Android Enterprise build

I have been building an application with Corona SDK over the last couple months and just this week moved it into a Corona Enterprise project. Before using Enterprise I had a custom barcode font in the app and custom map markers in my mapView but in Enterprise neither of these will show up.

Is there some configuration that I need to do in the Android project to enable my custom font and map marker images? 

Any help you can give will be appreciated.

Thank you,

Brandon

No help on this at all? Is there anything I need to do different to add a font in an Enterprise build version Corona SDK?

I’ll see if I can get you an answer.

Rob

Thank you Rob. I have been looking online and in the documentation but I haven’t found anything yet.

We had an engineer test this using Android Enterprise and it worked as expected. Can you give us more details? Are there any errors in your adb logcat console log?

Rob,

Thank you for looking into this. I did find an error message in the console when I try to load the font on a device. The font file is named BarcodeFont.ttf and it is in the main directory of my Corona project. If I build an apk with the Corona SDK simulator it appears in the app as expected. When I build the app out using Android Studio and Corona Enterprise I get the following error. 

I/System.out: WARNING: Could not load font BarcodeFont.ttf. Using default.

I have tried to load the font multiple ways based on the documentation I found. I get the above error when attempting to load the font like this: 

local barcodeString = display.newText(user\_data["barcode\_string"], 0, 0, "BarcodeFont.ttf", 220)

Or if I load in the newText params in a table like this:

stringTextParams["text"] = user\_data["barcode\_string"] stringTextParams["fontSize"] = 220 stringTextParams["font"] = "BarcodeFont.ttf" local barcodeString = display.newText( stringTextParams )

Any thoughts about what I may be missing?

Thank you.

Are you sure it’s a good font? Devices are also case sensitive. Is it really named BarcodeFont.ttf?

Rob

Yes. It appears on the device correctly if I build the exact same code through the Corona Simulator. It’s when I build using the Corona Enterprise project that the font doesn’t appear.

The only other thing I can think of that may be causing the issue is that I’m using Android Studio and not the build script to build my Corona Enterprise project. Maybe that is causing an issue.

You can unzip the .apk file and make sure the font is in there.

I didn’t think of inspecting the apk. 

I unzipped the APK file and found the Font file in the assets directory along with all the other Corona assets. It is also present in a fonts directory inside the assets directory.

Should it be anywhere else?

No help on this at all? Is there anything I need to do different to add a font in an Enterprise build version Corona SDK?

I’ll see if I can get you an answer.

Rob

Thank you Rob. I have been looking online and in the documentation but I haven’t found anything yet.

We had an engineer test this using Android Enterprise and it worked as expected. Can you give us more details? Are there any errors in your adb logcat console log?

Rob,

Thank you for looking into this. I did find an error message in the console when I try to load the font on a device. The font file is named BarcodeFont.ttf and it is in the main directory of my Corona project. If I build an apk with the Corona SDK simulator it appears in the app as expected. When I build the app out using Android Studio and Corona Enterprise I get the following error. 

I/System.out: WARNING: Could not load font BarcodeFont.ttf. Using default.

I have tried to load the font multiple ways based on the documentation I found. I get the above error when attempting to load the font like this: 

local barcodeString = display.newText(user\_data["barcode\_string"], 0, 0, "BarcodeFont.ttf", 220)

Or if I load in the newText params in a table like this:

stringTextParams["text"] = user\_data["barcode\_string"] stringTextParams["fontSize"] = 220 stringTextParams["font"] = "BarcodeFont.ttf" local barcodeString = display.newText( stringTextParams )

Any thoughts about what I may be missing?

Thank you.

Are you sure it’s a good font? Devices are also case sensitive. Is it really named BarcodeFont.ttf?

Rob

Yes. It appears on the device correctly if I build the exact same code through the Corona Simulator. It’s when I build using the Corona Enterprise project that the font doesn’t appear.

The only other thing I can think of that may be causing the issue is that I’m using Android Studio and not the build script to build my Corona Enterprise project. Maybe that is causing an issue.

You can unzip the .apk file and make sure the font is in there.

I didn’t think of inspecting the apk. 

I unzipped the APK file and found the Font file in the assets directory along with all the other Corona assets. It is also present in a fonts directory inside the assets directory.

Should it be anywhere else?