aspose file tools*
The moose likes Android and the fly likes Broadcast Receiver and Activities Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Broadcast Receiver and Activities" Watch "Broadcast Receiver and Activities" New topic
Author

Broadcast Receiver and Activities

Rakesh Jhamb
Ranch Hand

Joined: Jun 18, 2003
Posts: 154
Hi,

I have following code in BroadCastREceiver to start an Activity



This works fine and my activity does start, but it starts on top of my main activity (which is some other activity, for example B). What I want is that from my broadcast receiver I should be able start an Activity A, such that when I press back button from there, the control should not go to B Activity.

Please let me know what I am missing.


SCJP2, SCWCD
Hardik Trivedi
Ranch Hand

Joined: Jan 30, 2010
Posts: 252
I guess that Activity B is the activity of your application only and not of other app.

How about using onBackPressed method in your activity A ???
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Broadcast Receiver and Activities
 
Similar Threads
Need to run application on phone start uo
Activity Expired Time Out From BroadcastReceiver (need ASAP solution)
how to start application after pressing a particular number?
Problem in starting activity from broadcast receivers
Start activity in broadcast receiver