Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 20    Views: 80

Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
05/23/13 06:58 PM (12 years ago)

Would anyone know why sometimes my apps...

mostly open like this (which is how it should look): https://dl.dropboxusercontent.com/u/56760890/2013-05-24%2002.37.43.png but occasionally it re-opens like this: https://dl.dropboxusercontent.com/u/56760890/2013-05-24%2002.36.38.png and regularly re-opens like this: https://dl.dropboxusercontent.com/u/56760890/2013-05-10%2002.26.25.png Nothing obvious in logcat. It's been happening for at least six months, and maybe longer without my noticing, on all apps and on multiple devices.
 
BuzzingSteve
Aspiring developer
Profile
Posts: 526
Reg: Jun 24, 2011
Vancouver, Cana...
11,660
like
05/23/13 07:13 PM (12 years ago)
LOL...is that the splash screen? :-)
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/23/13 07:16 PM (12 years ago)
Hi BuzzingSteve, no it's the home screen. I've read of similar sorts of issues when a splashscreen is used, but the same thing happens with or without.
 
BuzzingSteve
Aspiring developer
Profile
Posts: 526
Reg: Jun 24, 2011
Vancouver, Cana...
11,660
like
05/23/13 08:27 PM (12 years ago)
Which plugin are you using for the home screen? Cheers
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
05/23/13 09:56 PM (12 years ago)
I'm guessing the Android device gets confused about resolution and size? It's almost like when you create an Android app and it looks good on one size device then run the app on a different size device and things totally change. not that i have a solution:)
 
BuzzingSteve
Aspiring developer
Profile
Posts: 526
Reg: Jun 24, 2011
Vancouver, Cana...
11,660
like
05/23/13 09:58 PM (12 years ago)
@Ian. The joys of developing for Android...that was what I was thinking :-)
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/24/13 01:47 AM (12 years ago)
Hi @raveyd Looks like a full page advert? Can you provide an example of what your apps should look like when they open?
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/24/13 03:59 AM (12 years ago)
@BuzzingSteve, it's a modified button menu @AlanMac, the top screenshot is how it should look. The middle screenshot happens occasionally, I'm pretty sure it's reading the config data for a large device instead of a small device as those 2 big buttons are in my large device settings. The worst one is the bottom one which regularly opens to a black screen. When the buttons are pressed an alert pops up - "No screen is connected to this item?". These things may or may not happen on re-opening an app some time (maybe 30+ minutes?) after closing it.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/24/13 04:33 AM (12 years ago)
I have seen something like the 2nd screen-shot effect. My diagnosis is similar to yours, I suspect that sometimes the app thinks it is running on a 'small' device instead of a 'large' device (or vice versa). Why this happens I don't know, could be memory leaks or something like that? I haven't seen it for a long time. One thing I pay a lot more attention to now than I used to on Android is image sizes. I make sure that that every button, icon, header and all other images are all sized to be the smallest they can be, I found I have less instabilities this way. Alan
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/24/13 05:03 AM (12 years ago)
Yes, images are a pain, it's like garbage collection sometimes works and sometimes doesn't. An app will run fine then the next time there are out of memory errors. That's probably an android issue rather than bt. Dunno, it's frustrating. The errors I'm getting are preventing users from picking up where they left off in the game, which is sort of fundamental for a game type app.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/24/13 05:11 AM (12 years ago)
I wish I could write games apps!
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/24/13 05:14 AM (12 years ago)
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
05/24/13 06:07 AM (12 years ago)
Pretty heavy mods. That looks awesome!
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/24/13 06:12 AM (12 years ago)
Yeah, looks very good. Lots of graphics, might be part of what is going on?
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/24/13 06:14 AM (12 years ago)
haha! Thanks @mysps - stackoverflow.com is my new best friend! Can't figure out the problems though.. @AlanMac, you're probably right. I've tried to re-use as many graphics as possible and they're compressed to ridiculously small sizes using http://tinypng.org/ (that site was posted on here recently by GoNorthWest?, it does some amazing compression), but there are a lot of them.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/24/13 06:36 AM (12 years ago)
I use tinypng.com too - it's great. Do you also change the image dimensions e.g if you use a 64 x 64 image in a button, but the original artwork is 256 x 256?
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/24/13 06:55 AM (12 years ago)
I usually do it the other way around in image intensive apps, for example a 200 x 200 button using a 100 x 100 image, but I make 2 seperate images for small vs large devices, instead of one large image for both and forcing the dimensions down. I did used to do it your way around but got a lot of 'out of memory' errors, I get them much less frequently now, but it takes longer to develop as I'm always checking for pixilation. When there aren't so many images, or the same image is repeated many times I do it your way around.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/24/13 07:10 AM (12 years ago)
I was just thinking perhaps if Android had to work at resizing it might be part of the problem. If you make them the exact right size and you got of 'out of memory' errors, it all points to image handling being an issue somewhere. I did a little plugin test for@chris1 at the weekend and he sees image issues too.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/24/13 07:18 AM (12 years ago)
I'm wondering if forcing garbage collection at various points in the classes is a good idea or it might make performance worse? Only one way to find out I guess..
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/24/13 07:43 AM (12 years ago)
Oops, I don't really code, you hit the edge of my comfort zone...
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/24/13 07:52 AM (12 years ago)
Same with me Alan, but the clump of spagetti I used to see now looks sort of understandable... in parts...
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.