views:

25

answers:

1

I have two activities. A and B. A starts B. Both are running in the screen and both are visible. Say now B is visible.

On a special key press, I want to bring the A to the front and make it active. The problem I am facing is when the special key is pressed, another instance of A is launched and the new instance is brought to the front.

But I want the original A to come to the front. I want to make this change in the framework layer rather than application specific by using the singleInstance theme in the launchMode in AndroidManifest file.

Please help me in this regard as this is really urgent for me. Any inputs will be really valuable for me.

A: 

Why don't you want to use the manfiest to achieve that?

If changes in the manifest were possible from the code the application would be able to change it's permissions after installation which doesn't make sense.

Macarse
The change which i want to make should be visible for all applications and not only for a particular application.So I need to change the framework , so that wenever the special key is pressed, the activity at the back should come to the front with out launchng a new instance.
Revathi K J
@Revathi K J: oh, so you are doing a custom rom. Try to see where android parses the xml and hardcode there the `singleInstance` flag.
Macarse