6 hours ago, frob said:
The official end of support for Android devices is 3 years after product launch or 18 months after first sale, which ever is longer. After that you're entirely on your own.
I am testing on as many as I can find. With a samsung galaxy 2.7 made in 2012 I think, as my oldest; android.
Although I am not aiming to get it working on all of them, just on most off them.
The problem isn't the devices it's my images. At 6mb in memory and 60 of them I would use 360mb normally. Except Unity isn't normal, it uses 720mb of memory to have them all loaded.
Even on a new device that is scary, especially because it kept building without cleaning the memory.
I found out why. Unity loads the texture to the scene and to the UI image, making two instances. The level instance was also why I could not clear the memory of them once I was done with them.
The pointer the scene kept was preventing the garbage disposal from collecting it. There also appears to be no way of removing that scene pointer.
To fix this I am using a separate level that is streamed over the other(additive scene). The level holds 5 slides, once I am done I destroy() the level and make a new one holding the next 5. This works for most mobiles and as a IEnumerator I can load it without the player noticing.
So it's kind of fixed. Except than now I can't resist finding a way to make it work on the old galaxy. I also think I know how:
In my search for clearing the memory I learned Unity has a resource loading function. This could be used at the start of the game to choose between two slide packs. One with 6mb images and the other with say around 500kb images. The APK will be larger yet if t works I will be able to make a game that almost anyone could play.
The only problem I can think with this is detecting the players device. I think that the DPI check can be used then if the player has <200 DPI the smaller texture is loaded. In the options I will allow the player to also set the texture pack if they know there mobile can use it.