android - The behavior of onSurfaceTextureDestroyed is different on some devices -


i encountered strage thing when use textureview on work. implemented 4 methods of surfacetexturelistener:

onsurfacetextureavailable onsurfacetexturesizechanged onsurfacetexturedestroyed onsurfacetextureupdated 

doing such thing quite easy, it's unnecessary paste code.

there no doubt onsurfacetextureavailable called when activity started , onsurfacetexturedestroyed called when activity destroyed.

but things changed in case of foreground , backgroud switching.

for devices, onsurfacetextureavailable , onsurfacetexturedestroyed not called during foreground , backgroud switching.

but devices such coolpad 8670 android 4.4.2, onsurfacetexturedestroyed called when activity go backgroud , onsurfacetextureavailable called when activity return foregroud.

i don't know why.

is there way of avoiding calling of onsurfacetexturedestroyed when activity go background devices?


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -