Hi Joao,
Cool, that's similar to what we've done.
I think I'm going to ignore this problem until I get a few more bug reports
- hopefully with more details.
Thanks for helping out!
-Chad
On Thu, Sep 29, 2011 at 2:44 PM, Joao Braga wrote:
> I see...
> Well I don't know the style of your game a
I see...
Well I don't know the style of your game and how it was developed.
I'm developing a game engine myself and for the memory issue, we are
building a Memory Manager that knows exactly when to allocate, when to free
and when to reuse an object of the game.
The result of it is less load time a
On some phones, like the small screen Motorola's, we've found that we really
push the memory limitations. If a user has a lot of junk of the screen
(in-game), then they risk OOM exception. We are aggressively calling
bitmap.recycle() whenever an image is no longer being used - and that has
been rea
I see, but it souldn't be a problem since the phones have enough memory to
load a image like that.
I'm just talking about the image, I don't know how the rest of your engine
is managing the memory.
But you said something about 200k sessions...how this sessions work?
The clients connect to a server
It's a game.
At a certain part it loads a large transparent png - about 900x300 or
something like that.
This issue seems to happen only with the larger images, which is why I was
thinking it had to do with possible low memory situation.
-Chad
On Thu, Sep 29, 2011 at 2:05 PM, Joao Braga wrote:
Hi Joao,
Yes that code works for me - actually I was already doing something similar
in a different part of my code.
Unfortunately, since it's such a rare bug I won't know if it really fixed
the problem until I deploy it to my users.
-Chad
On Thu, Sep 29, 2011 at 2:01 PM, Joao Braga wrote:
>
It's an architectural problem.
What's your application about?
What does it do?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send em
Thanks for the responses guys,
Just a note: My code always works when I test it.
The bug is happening once every 200k sessions (as reported via Android
Market).
-Chad
On Thu, Sep 29, 2011 at 1:58 PM, Chad Ata wrote:
> Thanks for the response Joao,
>
> Interesting. Do you think there's a bug in
Maybe, but I can't tell since I never used it.
Did the code work for you?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email t
Can you get to your resource through R.drawable. ?
You can get errors if you store pictures with invalid names for the
resources (spaces, special chars, numbers etc).
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, s
Thanks for the response Joao,
Interesting. Do you think there's a bug in the decodeResource() when using
BitmapFactory.Options?
-Chad
On Thu, Sep 29, 2011 at 1:49 PM, Joao Braga wrote:
> Try this:
>
> Bitmap bitmap;
> bitmap = BitmapFactory.decodeResource(res, R.drawable.image);
> bitmap = Bit
ops, I forgot the resources:
Bitmap bitmap;
bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.image);
bitmap = Bitmap.createScaledBitmap(bitmap, bitmap.getWidth(),
bitmap.getHeight(), false); //if you want to make it scaleble
Note: If you are creating this bitmap from the class o
I got a null pointer when my PNG file was incorrectly saved. Since I was
developing on Linux, I loaded it into GIMP and saved it back out and it
loaded. So you might check using one of the image files supplied in the
SDK.
--
You received this message because you are subscribed to the Googl
Try this:
Bitmap bitmap;
bitmap = BitmapFactory.decodeResource(res, R.drawable.image);
bitmap = Bitmap.createScaledBitmap(bitmap, bitmap.getWidth(),
bitmap.getHeight(), false); //if you want to make it scaleble
--
You received this message because you are subscribed to the Google
Groups "Android
Hi Joao,
Here it is:
BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inScaled = false;
Bitmap b = BitmapFactory.decodeResource( context.getResources(),
R.drawable.testImage, opts );
b.getWidth(); // < NPE
This always works for me when I test it.
Thanks,
Chad
On Sep 29, 1
15 matches
Mail list logo