Can't display any kind of text on my android device

Hi,

I’ve spent one day reading tutorials, etc … because on my Android device (a crappy one with Android version 4.0.4 on it) my app did not showed any text.

I’ve followed this tutorial -> http://coronalabs.com/blog/2013/01/16/faq-wednesday-custom-fonts/

And then tried this way too -> http://stackoverflow.com/questions/19681054/how-do-you-integrate-custom-fonts-in-an-app

So after spending a day, compiling, recompiling, trying different things, and all of them failing,I finally discarded custom fonts and tried ‘native.systemFont’ and to my surprise it didn’t work either.

Finally I build a one single line project taken from the Corona Guides:

local myTextObject = display.newText( “Hello World!”, 160, 240, “Arial”, 60)

But to my despair it didn’t worked too.

I forgot to say that:

  • Everything just worked fine in the Corona simulator and in my iOS devices.

  • I use CoronaSDK Version 2014.2393 (2014.8.5)

  • I use OS X Version 10.9.4

  • XCode Version 5.1.1 (5B1008)

I can not use png’s to substitute all my fonts, because I use textboxes and textfields to add Chat functionality to the app.

Any kind of support would be very much appreciated.

Best regards, 

An exhausted Ignacio Ric

I guess that you’ve already tried native.systemFont instead of “Arial” in that one-line project?

Otherwise I’m stumped. Could it be that your device doesn’t support OpenGL 2?

I didn’t try just that.

I’ve done now and it’s failing again in the device.

Here is the new single line project:

local myTextObject = display.newText( “Hello World!”, 160, 240, native.systemFont, 60)

Maybe I should try pre 2.0 graphics mode, don’t know if that’s possible at all.

Its really strange. What is your config.lua file look like ?

You can go here:

https://developer.coronalabs.com/downloads/archive

Graphics 1.0 builds are the ones with a build number < 2000

BTW, What Android device are you using (Brandname/model)?

I’ve tested the ‘single line project’ with two ‘confing.lua’ files:

A regular one:

application =

{

content =

    {

    width = 640,

     height = 960,

     scale = “letterbox”

    }

}

And an alternative one:

application =

{

content =

    {

    graphicsCompatibility = 1,

    

    width = 640, 

    height = 960,

    scale = “letterbox”

    }

}

It failed on both of them.

I don’t know if I should try an archived release(don’t know what will happen with my game in stability, etc) or to forget what happens in my device.

My Android device is an ‘UNUSUAL Vortex Color’, don’t believe it’s sold outside Spain. But it fit with the typical cheap android device many people buys around here, as it runs most of the games I download in Google Play just fine. (with the exception of the typical High end Graphics game with hundreds of MBs in size.)

You should definitely not ship a new app with an old Graphics 1.0 build in my opinion, however it would be interesting if you would try with a Graphics 1.0 build just to see if it runs on your device.

Your device is “Unusual” indeed  ;), I found some tech specs (only in Spanish), however the data was very meager and didn’t provide any helpful info. I’d recommend testing your app on another device also, if possible.

:D Yes it is!

I’m gonna test it in another Android device and if it works I will act as if this bug never happened. It’s is just to much pain in the  :ph34r:  to make it works on every device.

I don’t think an archived release is the way to go too. Besides, I would have to make many changes in the code I suppose, as several functions, etc … have changed.

UPDATE:

I could not resist and after reading this two threads:

http://forums.coronalabs.com/topic/42581-black-screen-loading-hello-world-sample-app-on-android-20132099/

http://forums.coronalabs.com/topic/43261-horrible-text-bug-in-20142130-no-text-just-rectangles/

I decided to give it a go and try the CoronaSDK Version 2013.1202 (2013.8.28) …

The work wasn’t much and now I have the app running in the device displaying the text fonts.

I had another problem also, my .jpg files appeared corrupted, and with this build they show perfectly.

I don’t know if I will be able to release the app with this Corona version, I have to test other things, like textboxes, ads, etc … 

Couple of points:

1.  You cannot deploy an app to Apple/iOS with that build.  It may not be on your roadmap.

2.  You cannot use AdMob or many advertising services on Android without using the latest public build 2014.2393.

3.  We will not be updating the Graphics 1.0 line any more.  It’s in your best interest to use the latest public build where possible.

4.  You can actually use 1262, which is the last build for Graphics 1.0.  I’m pretty sure we enabled it for all tiers, but it has all the issues above.

Unfortunately for Android, too many hardware makers make devices with cheaper chipsets to try and drive down the cost of getting into the Android tablet market, only to find out that software is going the other way needing more and more resources.  I doubt Corona SDK will be the first thing you hit on this device that’s not working as expected.

Rob

@ignacioric

As Rob mentions above there are important reason *not* to release a new app with an old version of Corona SDK. You also need to take into consideration that *many* bugs have been fixed in later builds, and more importantly *continue* to get fixed.

If you decide to use an old G1 build you’re on your own.  Any bugs that you encounter will never get fixed and any issues your users report will not be able to be resolved if it’s within the G1 core.

I think a better approach is to use the latest G2 public build. When you publish to Google Play, you can exclude devices you know are incompatible. That way people with incompatible devices can’t download your app.

(One caveat is that Google doesn’t include every device on the planet in their lists, which means there’s no guarantee that you can block uncommon devices)

iOS is not a problem, I go with the latest available build always, but Android market is a very complex devices multiverse.

Maybe the way to go is to have a list of Android ‘Corona trusted’ devices (don’t know if there is a list like that already available), so when publishing in Google Play, for example, I can enable the app only for those devices.

There are so many new devices being released all the time. Limiting installation to only “trusted” devices will definitely impact an apps installation base negatively over time. I still think it’s better to exclude devices known not to work. 

I don’t exclude any devices. Overall I think that this problem is minor. I have yet to get complaints from users saying that my apps don’t work on Android.

Not sure if this will help, but I have found that for android you need to use a minimum textfield height of 36 and font size of 16 in order for the text to display properly and not scroll horizontally in the native text field…

I guess that you’ve already tried native.systemFont instead of “Arial” in that one-line project?

Otherwise I’m stumped. Could it be that your device doesn’t support OpenGL 2?

I didn’t try just that.

I’ve done now and it’s failing again in the device.

Here is the new single line project:

local myTextObject = display.newText( “Hello World!”, 160, 240, native.systemFont, 60)

Maybe I should try pre 2.0 graphics mode, don’t know if that’s possible at all.

Its really strange. What is your config.lua file look like ?

You can go here:

https://developer.coronalabs.com/downloads/archive

Graphics 1.0 builds are the ones with a build number < 2000

BTW, What Android device are you using (Brandname/model)?