Android, Text / Font renders as Squares - android

When I try sharing an image through my program, the share menu sometimes comes out looking like this.
Some Notes:
1) It doesn't seem to occur on the first run, but only after I have paused the application and gone back in.
2) My app uses OpenGL extensively. It is possible I am changing a shared setting, then not returning the value back to the original.
3) Everything else in my application works fine.
4) I have tried removing all the calls that allow transparencies, and I am still having this problem.

I have this problem too. I am using a GLES 2.0 context, the only way I have been able to get rid of this... (it's going to sound weird) is by NOT calling
GLES20.glDeleteTextures ( hTextures.length, hTextures, 0 );
It wasn't happening before I started clearing up my textures, and it hasn't happened again since removing it. I have no idea why that would be though?
I'm also not sure of the ramifications of not releasing my textures.
If anyone can shed light on the matter, that'd be great, there's a few versions of questions floating around. Appears it's a problem in Unity for android and everything.

I have sometimes this problem, and not happens ever, just randomly.
I have cleaned my project and uninstall from device, compile and install again, to me works fine.
Hope this helps.

Related

Android C4droid Sfml not rendering anything after minimizing and reopening program

I am using the Sfml library on C4droid which has official sfml support. Everything works just fine, I can run the program normally and it renders graphics normally. But after i like minimize the app for a second and then open it back up again, for some reason it doesn't render anything at all, not even the window. Although everything else in the program runs normally like the sound,touch input, calculations etc. And I know it's not because C4droid is doing something wrong because every other graphics library i tried doesn't have that problem. Only sfml has it. I even tried it with Cxxdroid and I get the same problem.
I ran the sample programs so it's not a coding error. I tried using the the onlostfocus event to reload the files after it loses focus, I tried using only sfml shapes and no textures. But still the same thing happened. But after I tried to create a new window onlostfocus by using window.create(), It actually did render the new window even after minimizing and reopening but it only did that and didn't render/draw anything.
Is there a reason why it is happening and is there a way to fix it?
I FOUND THE SOLUTION!
I went to the sfml discord server and a really NICE person helped me out. All you need to do is just window.setActive(false) on lost focus and window.setActive(true) on gained focus AND IT WORKS FLAWLESSLY!!!

Ionic - Videogular Fullscreen and Android

again I got a really strange Bug on Android devices for my app with the use of videogular.
I also use a Fullscreen-Plugin, and a plugin for Screen-Orientation to make sure which orientation is in use.
But anyway, the problem now is, that when I play a video and change to "FullScreen"-Mode, go to landscape-mode, and then cancel the Fullscreen-Mode I see my app in the "Ultimate Zoom-Mode" (not real, I only call it in that way). Which means everything is too big and in fact I only see the upper left corner of my app.
That is kind of a strange thing. And I have no idea where it comes from or what I can do against it.
First I fixed the issue by change to landscape mode when the user go to fullscreen. But now I found out, when the user click on the "Hardware-Back-Button" instead of the "Cancel Fullscreen"-Button on the screen, the "Ultimate Zoom..." returns.
Does anybody have an idea what I can do against it?
Thank you, and sorry for the long post.

Android screen stops reading inputs

First off, this has never happened before on any other android device I've used (multiple devices have been tried and tested before this).
Now I have an app that I have worked on for a little over a year now, it is called AutomatedId (on the app store) and it has worked quite well for my company for quite some time.
Recently I have been given a device to add compatibility to the app (specifically for reading UHF tags) but that isn't the problem.
The problem comes whenever you open the app, the screen stops reading inputs completely, as well as buttons cease to function. I turned on developer options to see the screen inputs and as i suspected, it completely stops and does not read any of the inputs after the app is opened. Clicks don't work, buttons don't work, keyboard doesn't open, hardware buttons on the device stop working. It's a mess, does anyone know what could have caused this?
This is a S98 from here: http://www.wepoy.com/product_view_18.html
moved my comment to the answer as you said. This may be due to memory leak. Here are some references that may help you fix them: Fixing-Memory-Leaks-in-Android-Studio & use this library from square to detect memory leaks early: leakcanary

Air for Android: Black Screen after device-alarm

I do have a problem and have very little to go on. I'm about to release an App (created with Air for Android As3) on the Samsung App Store and just got a list of issues that have to be resolved after the app has been tested by samsung staff before the app could be released.
I did manage to solve almost all of the issues, but 1 very important one is beyond me. They say the screen turns/stays black, when returning after the device alarm interrupted the app. This issue practivally happend on all their devices, including a group including the phones I own (e.g. Galaxy S3).
I do have "OnDeActivate" and "OnActivate" listeners in place that are there to pause the app, disable sound etc. if it loses focus, gets minimized etc., yet I checked on my devices and I can't reproduce this error. Meaning if the app gets interrupted on my device by the alarm, I can resume it without any problems. no black screens.
So the question is: Is there any way for me to fix that at all? I do have to work within AirForAndroid AS3 so I guess possibilities are limited. Any clues where I can look? Any listeners to set, or is there a way to maybe "force" the app to reinitialize or refresh the display? Or to listen for the system alarm? Help would be much appreciated. Thanks in advance!
I am trying to overcome the same issue, I read somewhere that setting the stage quality to something else on both the activate and deactivate events might solve the issue.
So just set your stage quality to medium or whatever different in the deactivate and set it back to what it needs to be in the activate.
This should make AIR snap out of that black screen for the alarm (I hope)
An app of mine is with this fix is currently undergoing testing on the Samsung App Store.
I hope it fixes it.
Good news, the dirty fix of toggling the stage quality seems to have worked for Samsung, it has not shown up in their latest certification report of my app.
by the way, this is not for a stage3D app, that's different
It's for a GPU app
When the app loses focus on Android (goes into background) it will lose the context, which among other things mean that you lose all the created graphics, cached objects and like.
You didn't specify what kind of app it is. If you're using Stage3D, that means you'll have to recreate all your textures, and if you're on plain old displaylist, you'll have to recreate any bitmaps that were created at runtime, and redraw your screen at least once (so the vector graphics get redrawn too).
Now, if you're using Starling, for example, it can take care of recreating context for you (there's a flag for enabling that), although you'll still have to recreate dynamically created bitmaps.

View is not properly refreshed, previous "frame" still appear

A very strange problem that cause the app to draw ontop of itself without cleaning the previous frame.
Its a bit hard to explain, see the next image:
Some other symptoms of this problem:
If I start it on emulator with GPU, the problem occur.
However if I start the emulator without GPU, it does not.
The actual device that I use is connected to a monitor using HDMI. Maybe it is related.
Any help will be highly appreciated.
This looks like a very similar problem I've posted before (link here) .
The problem is that I tried to use 2 tricks for optimization - have an empty background for both the window and its views.
The reason is that there is the window of the activity already has a default background, but when you remove it, and the views don't have a background, Android doesn't "clear" the content with the background, so it smears...
Do note that this "bug" might occur on some devices yet on others it would work fine.
In short, the solution is to set a background to either the window or its views.

Categories

Resources