Pages

Monday, May 30, 2011

Hopefully...

Hopefully I have fixed the Generic Error issue with SMS Text Auto Responder FREE (link)! sorta: I don't know if this will fix the LG Ally issue. If someone with an LG Ally could test it out and let me know if it works or not I would be eternally grateful :)

YAY!!!

The only time I could get it to reproduce the error was when there were SMS messages coming in and the auto responder was trying to send one out at the exact same time. The stock app would attempt to automatically resend the message and retrieve the incoming message at the same time... however what winds up happening is they both keep blocking each other.
Think two people facing each other attempting to go through the same door and each time one moves one way the other inadvertently moves the same direction thus blocking the doorway.

Hopefully it doesn't do this any longer!

Friday, May 13, 2011

AndEngine: Thoughts and Background How-To

I started using AndEngine for Android (link) and I must say, WOW! I'm impressed!

I will say this though...
With all due respect, as amazingly awesome and powerful as this library is it is extremely hindered by its lack of clear and easy to find documentation. It is like pulling teeth trying to figure this thing out! Oh well, if it was easy it wouldn't be fun right!?!??!

Anyway, one of the things I was trying to do was set a static background.
There is probably a better way of doing this but this worked for me.

The way I've done it is as follows...
Landscape mode
I have the camera width and height set at: 854x480
The .jpg image that I use as a background is 854x480

Note: because you need to use a texture that is a power of 2 I had to set the texture area at 1024x512. This didn't seem to affect it.....yet!

@Override
public void onLoadResources() {


    // Create a texture to load our sprite into
    this.mBackgroundTexture = new Texture(1024, 512, TextureOptions.DEFAULT);




    // Create a region to load the image asset into
    this.mBackgroundRegion = TextureRegionFactory.createFromAsset(this.mBackgroundTexturethis, "gfx/YOUR_IMAGE.JPG", 0, 0);


    // Load the texture (with the region that holds the asset) into the engine
    this.mEngine.getTextureManager().loadTexture(this.mBackgroundTexture);
}


@Override
public Scene onLoadScene() {


    // Do scene work...


    // Might not need this but I did it anyway...
    this.setBackground(new ColorBackground(0, 0, 0, 1));


    // Create sprite
this.mBackground = new Sprite(0, 0, this.mBackgroundRegion);

    //Attach the sprite to the scene. I use getFirstChild() so that I can ensure that the background sprite is the "bottom" child
    scene.getFirstChild().attachChild(this.mBackground);


    // Do some other work maybe...


    return scene;
}


I will write up a more thorough tutorial soon!


Hope this helps :)

Blogger Buzz: Blogger is back

Blogger Buzz: Blogger is back: "What a frustrating day. We’re very sorry that you’ve been unable to publish to Blogger for the past 20.5 hours. We’re nearly back to normal..."