I have 2 app. running, a browser and b4a app.
I would like to display the b4a app. and let user copy the ID code and then
switch & display the browser and let user paste the Id code.
and again switch to b4a app. and copy the password and switch to the browser
and paste the password.
how to do the switching ???
I'd recommend a completely different user interface solution. Take a look at how KeePassDroid solve it, it's identical to your needs and very quick and simple for the user. (And probably a lot simpler for you to implement also, perhaps using the brand new Clipboard Class from @hatzisn.)