Hi friends..
I am using Button in main Activity. When i clicked this button it will go for another Activity. My question is.. when i clicked the Button it should not display another Activity window..For example..in my case when i clicked the button it will start another activity and in that Activity i have added functionality of Receiving Notification..Here What i want is When i clicked the button i should receive notification and it should display another Activity window. how can i do this..?I can do this my adding functionality of receiving Notification in Onclick. But I wont want in that way. I require two Activities..Please can any one suggest me how to do this.?
[CLARIFYING TEXT].
With in my first Acticity i had a Button. when i click that button it will start new Activity..ie.
Intent intent = new Intent(this, SecondActivity.class);
startActivity(intent);
with in this second Activity i added the code for receiving notification..
Now my question is when i am clicking the button in first Activity a new window will be displayed as i am starting second activity..What i want is i wont want a new window to be displayed..But i have to receive notification..