Android :: Notified When Foreground (top) Activity (application) Changes

Oct 6, 2010

I want to write a service for Android platform that is notified when the current foreground activity changes. Basically the service should do some tasks only when the top activity changes. Is there any way to subscribe and to be notified when this kind of event occurs? Or there is no possibility and the service should poll from time to time the list of running activities and to check what is the foreground activity ?Not preferable solution...

Android :: notified when foreground (top) activity (application) changes


Android : Get Activity To Foreground

Mar 3, 2009

Who knows how I can make Activity visible from invisible process? .....

View 2 Replies View Related

Android : Start An Activity WITHOUT It Becoming The Foreground One?

Apr 22, 2010

Is there a way to call startActivity(Intent) without the newly started activity displacing the current one as the active, foreground activity?

If not purely so, are there near approximation to this effect that can be done, such as mimicking a back keypress event right after calling startActivity()? If so, which means is preferred?

View 5 Replies View Related

Android : Activity Not Coming To Foreground

May 2, 2010

I'm getting the outgoing number using BroadCastReceiver and then starts a Activity. but my activity runs in the background??? how can i bring it to foreground? ...

View 5 Replies View Related

Android :: Activity Get Notified When External Storage State Changes?

Jul 24, 2010

I would like my Activity to be informed when the SD card is removed, since it relies on files from the SD card (to keep apk size down) but for compatibility reasons is not targeted at Froyo. I'd like to close the application when the SD card is removed/mounted (giving the user a dialog message to inform them of course) so that I don't get IOExceptions etc (I'd quite like to not have to check everytime I load a file to see if the external storage is available, I already do a check on application launch). There doesn't seem to be any attribute in the manifest for this (like configChanges) that I can find.

View 5 Replies View Related

Android :: Get Foreground Activity Displayed On Screen

Apr 22, 2009

Is it possible to get listed the apps or activity which are actually displayed on the screen of the android mobile. I need to display a text box on some event when no acitivity is displayed, excepting the home screen.

View 3 Replies View Related

Android : Get The Current Foreground Activity (from A Service)?

Oct 6, 2010

Is there a native android way to get a reference to the currently running Activity from a service?

I have a service running on the background, and I would like to update my current Activity when an event occurs (in the service). Is there a easy way to do that (like the one I suggested above)?

View 2 Replies View Related

Android : Inform Activity From A BroadcastReceiver ONLY If It Is In The Foreground

Feb 17, 2010

Maybe it's easy, but I couldn't really figure this out right so far... I got a BroadcastReceiver waiting to get triggered by the AlarmMangager - this works fine.

Now: because the event, if it occurs, needs to refresh some elements on screen of the main Activity, I would like to send an Intent from that background BroadcastReceiver to my Activity - but only if it is currently in the foreground, aka active.

If it is not running or not visible, I don't care - and the last thing I want to do is start the Activity by my intent! I handle repainting of the views in my onResume method, so I don't care at all.

EDIT: my BroadcastReceiver is waiting for alarms that must be notified to the user. So, it must be there and declared in the manifest. The problem is: it will have to decide whether the mentioned Activity is currently up in front or not.

View 3 Replies View Related

Android : How To Bring An Activity To Foreground (top Of Stack)?

Feb 9, 2010

I defined an activity ExampleActivity.

When my application was launched, an instance of this activity was created, say it is A. When user clicked a button in A, another instance of ExampleActivity, B was created. Now the task stack is B, A, with B at the top. Then, user clicked a button on B, another instance of ExampleActivity, and C was created. Now the task stack is C, B, A, with C at the top.

Now, when user click a button on C, I want the application to bring A to the foreground, i.e. make A to be at the top of task stack, A, C, B.

View 4 Replies View Related

Android :: How To Bring Stop Activity To Foreground (restart) By Itself ?

Sep 22, 2010

How to bring stop activity to foreground (restart) by itself?i use Broadreceiver and intent to restart my activity.but always start two activity (include original activity)how to restart my original activity?

View 4 Replies View Related

Android : Webview - OnCreate Always Get Called When Activity Comes To Foreground

Mar 29, 2009

I launch my TestWebView activity. After my web page is loaded, I put the app in the background by pressing the Home key. Then I bring the TestWebActivity back to the foreground. Unexpectedly, TestWebView's onCreate() is called when I bring the activity to the foreground. But onDestroy is never called. This same thing happens every time I tested. It appears the old TestWebView was not completely killed so there are possibly duplicate web clients running.

My code: .....

View 7 Replies View Related

Android : Bring An Activity To Foreground From Background Manually?

Oct 19, 2009

In my application i wait on socket for network events.On some events i have to bring activity into foreground(make activity as running) if at all it is not in the foreground.

View 17 Replies View Related

Android : Create A Surface Object Without A Foreground Activity

Jul 6, 2010

I have a function that needs a Surface object to work. I'd like to be able to call that function from a background Service without starting a foreground Activity. Every Surface source in the API that I can see, though, requires a View that's laid out before the Surface becomes available. Are there other ways to create a Surface that I am missing, and can you point me to them?

View 5 Replies View Related

Android : Send Touch Events To Foreground Activity

Jul 21, 2010

I'm trying to figure out a way to send touch events to the foreground activity. Essentially I want to write something that allows me to run it from the shell and just say "I touched this co-ordinate", so that I can automate some UI tasks for testing. Essentially what Monkey does, but application agnostic.

I think that android.view.MotionEvent holds the key, but I'm not sure how to run something without view so that I don't interfere with what is on the screen. Perhaps with a service, but I'm unclear how that would work.

View 5 Replies View Related

Android : Bring My Activity To Foreground Automatically From Address Book

Sep 25, 2010

My Activity is running on the foreground and my Activity is getting pushed to background when I hit on the home button... I am trying to display the pop up at certain intervals, in this case as my activity is running on background when I try to display the pop up but thats not shown on the foreground.

View 1 Replies View Related

Android : Bringing Activity To Foreground Via The Call Button (Green Key)

Feb 4, 2010

I currently have an application that naturally gets pushed to the background when the home key is pressed.

The activity losses focus but continues running in the background.

So I want to know is it possible to bring the application back to the foreground when the user presses the green key (call button) on the device?

View 3 Replies View Related

Android :: Recent Apps Change In 2.2 / Brings Main Activity To Foreground

Jul 24, 2010

The recent apps display seems to function quite differently from earlier versions on 2.2. Try the following for instance: 1) Open an app 2) Click on something that takes you to another activity in the same app 3) Press the home button 4) Press and hold the home button to get the recent list of apps - select the app you chose in step 1 5) You'll be taken to whatever activity in that app is specified as the main/launcher Activity, rather than the Activity on top of the stack (as it was previously) It makes it appear to the user that the application has exited when the home screen button was pressed. I don't have my app set to clear history on launch or anything like that, and I can replicate it on the emulator and with any app on my device (Contacts, Gmail, Engadget etc) Anyone else notice this? Anyone know any reason for the changes? I must admit I quite dislike the new method.

View 10 Replies View Related

Android : By Clicking On My App's Launcher Icon, Bring My App To Foreground And Not Launch New Activity

Feb 28, 2010

My app has 2 activities - A and B. From homescreen I launch A, from A I launch B. The activity stack looks like this: A-B. Now I press HOME button, and from homescreen click again on my app icon, which launches A and adds it on top of the activity stack, which now looks like this: A-B-A. But I just want to bring my application to foreground, is that possible in Android?

View 2 Replies View Related

Android :: New Version Of Application - How User Get Notified?

Mar 12, 2009

If I upload a new version of the application. Does the user knows that there is a new version of the app?

View 3 Replies View Related

Android : Multiple Activity Instances Launched By Same Intent. Bring One Uniquely To Foreground?

Nov 12, 2010

I'm struggling with my app that launches multiple instances of the same Activity using the same intent. My main activity is of class type A and it does a startActivity() of two children that are of the same class type B. So we have B1 and B2 launched. If B1 and B2 are both paused (by pushing back button and making sure finish() is not invoked on them so they are truly paused), how can A uniquely bring either B1 or B2 to the foreground again? I do want to launch a new B activity. I want to uniquely bring B1 or B2 to the foreground.

so both B1 and B2 were created like this... Intent intent = new Intent(context, B.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent);

Now I want A to bring B1 (or B2) to the foreground/front so I use the below code, but how do I distinguish B1 or B2 when starting the activity? This only brings the last instance of B that was on top to the foreground.

Intent intent = new Intent(context, B.class); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(intent);

I've tried keeping around references to B1 and B2 and doing something like this, but this also only goes to the last instance of activity class B that was on top...

Intent intent = new Intent(B1context, B.class); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); B1context.startActivity(intent);

I even tried this, but it still doesnt get me my unique B1 or B2... Intent intent = B1.getIntent(); // i.e. the original intent that started me startActivity(intent); // still only brings to front the last B that was on top.

View 3 Replies View Related

Android :: Programatically Detect Foreground Application / Screen?

Aug 20, 2009

Is there any way for a backfround task to programmatically detect or recognize by learned id which application or screen (different package) is showing?

View 5 Replies View Related

Android :: Application That Has To Capture The Key Events Both In Foreground And In Background

Jul 26, 2010

I am developing an application that has to capture the key events both in foreground and in background. I used the following code. But am unable to capture the keys in background.

CODE:............

I used broadcast reciever..

CODE:.................

View 1 Replies View Related

Android :: Determining Current Foreground Application From Background Task Or Service

Jan 30, 2010

I wish to have one application that runs in the background, which knows when any of the built-in applications (messaging, contacts, etc) is running. So my questions are: How I should run my application in the background. How my background application can know what the application currently running in the foreground is.

View 4 Replies View Related

Android :: Application Menu Rather Than Each Activity In Application?

Jul 27, 2009

Is it possible to attach Menu to an application rather than each activity in the application? I have 20-23 activities in my application and it doesn't make sense me to add same menu to all the activities.

View 5 Replies View Related

Android :: Way To Change What To Get Notified For?

Jun 24, 2010

Finally bought my Droid last week, and am very glad to have done so. My first smart phone, and I'm having a blast. One question about FB notifications. Is there any way to change what you get notified for? Right now i only get notified for pokes. It'd be nice to hear "Droid" when someone posts on my wall or something. Any ideas?

View 1 Replies View Related

Android :: Getting Notified Of Installs

Nov 5, 2009

I'm wondering if there is any way to get notified when applications are installed. I'd like to install my app as a service which just waits to be notified on app installation.

View 2 Replies View Related

Android : How Can I Be Notified When It's About To Change?

Sep 30, 2010

Can I be notified of the following events for an Activity: I realize that I can probably override the main View's onSizeChanged() and be notified when the View has changed, but how can I be notified when it's about to change?

View 1 Replies View Related

Android :: How To Get Notified (Listen) For Changes In SD Card?

Aug 13, 2009

I am creating an app and the requirement is - I have to listen to the SD card for new data comes in. Whenever a new file is downloaded into SD card , I want to be notified. (or say , I want to listen for changes). Any code sample, link will be nice to have.

View 7 Replies View Related

Android :: How To Get Notified For Incoming Call Or SMS?

Oct 16, 2010

I'd like to implement a feature that monitors incoming calls and SMS and blocks them if necessary. But I don't know how to capture such events, could someone tell me how to do that?

View 2 Replies View Related

Android :: Sensor Not Being Notified When In Standby

May 28, 2009

I am listening events from accelerometer sensor and everything is going right. The problem occurs when phone gets in standby mode and I am not being notified by sensors anymore. Does Anyone know if it's possible to get sensor notifications, by implementing a listener, even if phone is in standby?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved