Um..
I really don't mean to be rude here. I really and truly don't.
But the reality is that you probably shouldn't be doing any of this without learning more about how Android works.
That's going to take some time, and patience, and will require that you do a significant amount of reading.
For your specific question, I'd suggest starting
here.
I'd also have a look over
here.