I have an app which shows two activities at the same time;
I'm not sure what you mean by this because Android only allows 1 activity to run a time.
When you start Activity B from Activity A, A gets paused.
My Question:
Usual Activity B is faster than Activity A because A is not focused,
just showing
Some devices (Galaxy S2 that I know) Activity B is slower than
Activity A
Again I'm not sure what this means, but as it looks like you're making a game I'd suggest you read this blogpost: http://www.rbgrn.net/content/54-getting-started-android-game-development
Maybe buy this book: http://www.amazon.com/Beginning-Android-Games-Mario-Zechner/dp/1430230428/ref=sr_1_1?ie=UTF8&qid=1304580271&sr=8-1
and look at the development process/source for this game:
http://www.rbgrn.net/content/215-light-racer-3d-development-journal
It was written by the author of LibGDX which is one of the most popular android game engines. The book teaches you everything you need to know to build a complete game.
If you dont know much about making a game the read this book
http://www.amazon.com/dp/1430230428/?tag=stackoverfl08-20
It will teach you EVERYTHING you should need to know to do what you want. It also sets up OpenGL ES for you so your app will be nice and smooth
I really would suggest OpenGL, using the Canvas class will not only be slower but it is going to be limited as well
If you are interested in android games(2d), I recommend this book http://www.amazon.com/dp/1430230428/
I'm not sure what you mean by this because Android only allows 1 activity to run a time. When you start Activity B from Activity A, A gets paused.
Again I'm not sure what this means, but as it looks like you're making a game I'd suggest you read this blogpost: http://www.rbgrn.net/content/54-getting-started-android-game-development
Maybe buy this book: http://www.amazon.com/Beginning-Android-Games-Mario-Zechner/dp/1430230428/ref=sr_1_1?ie=UTF8&qid=1304580271&sr=8-1
and look at the development process/source for this game: http://www.rbgrn.net/content/215-light-racer-3d-development-journal
I'l recomend you read https://code.google.com/p/beginning-android-games/
Very helpfull for 2D game development and 3D games.
And book link http://www.amazon.com/Beginning-Android-Games-Mario-Zechner/dp/1430230428/ref=sr_1_1?ie=UTF8&s=books&qid=1299265138&sr=8-1
Getting started with OpenGL... in Android
Pro Android Games
Beginning Android Games
Also check Related Links regarding to your question, which are bottom right of your question.
You can start using the official resources:
2 Great books from Pragmatic Bookshelf:
Other Books:
Google should be your best friend.
I have Beginning Android Games by one of the guys behind libgdx. I found it really easy to work through. It covers 2d game programming pretty well and even gets into some of the basic open gl stuff.
It gave me enough knowledge to branch off and start a project of my own with confidence.
I can't say anything about the 'best' way, but you can use
andengine,
Corona,
Maoi,
Unity3d,
OpenGL ES 1.0/1.1/2.0, or
Draw to a Canvas or View.
Beginning Android Games is probably the single best resource (especially chapters 3&4). You should also look at the SDK samples (snake, lunar lander). Practical Android 4 Games Development is... not good (the copyediting is particularly shameful), but it is at least devoted to game development with OpenGL ES.
Without a doubt the best answer to this question is:
Buy and read this book: http://www.amazon.com/Beginning-Android-Games-Mario-Zechner/dp/1430230428
It was written by the author of LibGDX which is one of the most popular android game engines. The book teaches you everything you need to know to build a complete game.