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?

Android :: programatically detect foreground application / screen?


Android :: Method To Detect Widget Is Visible - Foreground Or Background?

Aug 6, 2009

It would appear on a G1 (with the latest software update) that onUpdate () runs even when the widget is not visible. Is there a way of sensing that the widget is or is not visible or is otherwise in foreground? That is, running the code below shows a logcat message at whatever interval the Widget is scheduled to update, whether it's in foreground or not, whether even the screen is dim or otherwise in deep sleep. It would seem onUpdate should only be scheduled to run when the Widget is in the foreground or visible. Is this a defect in the G1, or is there some other API call to detect if the Widget is visible?

public class HomeScreenWidget extends AppWidgetProvider { ...

View 2 Replies View Related

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...

View 1 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 :: 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 :: 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 :: How To Check Version Of My Application On Market Programatically

Jun 30, 2010

I want to implement the versioning feature for my application manually. For that I intend to compare the application version currently installed on the device and the application version present on android market. I can get the installed application's version using PackageManager , but how to find out the version of the application on the android market programatically ?

View 2 Replies View Related

Android :: How To Get Droid Application Id Programatically / Communicate It With Other Apps

Aug 12, 2009

In Android, how do I get the application's id programatically (or by some other method), and how can I communicate with other applications using that id?

View 3 Replies View Related

Android :: Programatically Get Path To Databases/files An Application?

May 3, 2010

Is there a way to programatically get the path to the databases/files an application uses instead of hardcoding "data/data/mypackage.com/database.db" ?

View 1 Replies View Related

Android :: Unlock Screen Lock Programatically

Apr 21, 2009

We are writing an app to substitute screen/pattern lock on G1. Unfortunately, it is impossible to substitute the original screen lock app with a 3rd party one. The only option left is if we can UNLOCK the phone from a service running in the background when G1 is locked. Is it possible? Is there interface to Pattern/Screen lock? What is KeyguardManager for?

View 8 Replies View Related

Android :: Want To Detect Application Idle Time

Nov 2, 2010

In my application there are three activities A -> B -> C -> A. I want to detect application's idle time, so that after 15 mins it will pop up a message irrespective of activity. what is the best method to implement this.

View 2 Replies View Related

Android :: Detect If User Using Application First Time?

Sep 21, 2010

I would like to know if the user is using the application for the first time. I am using SharedPreferences, but I am not sure if I have the right logic. How can I set my isFirstLaunched boolean to true when the user first launches, and then immediately set to false after work has been done?

protected void onStart() {
super.onStart();

if(isFirstLaunch()){
populateDefaultQuotes();
//Save the preferences, isFirstLaunch will now be false
SharedPreferences settings = getSharedPreferences(Constants.PREFS_NAME, 0);....................

View 1 Replies View Related

Android :: Detect Application Heap Size

Apr 13, 2010

How do you programmatically detect the application heap size available to an Android app?

I heard there's a function that does this in later versions of the SDK. In any case, I'm looking for solution that works for 1.5 and upwards.

View 3 Replies View Related

Android :: Detect Another Application Started Playing Audio

Aug 26, 2010

My music application constantly plays music in the background, however I'd like to be able to detect when another application starts playing audio (such as the YouTube app) so I can pause/mute/stop the audio in my application. This will allow a user to continue browsing the web whilst listening to music, but then if they wish to watch a video at any point, they can do so without audio conflict.

One solution might be to listen for a broadcast which states when an application begins using the AudioManager. Does such an Intent Action exist? Edit: As in the answer provided below, there appears to be a method of detecting the loss of audio focus in 2.2 with AudioManager.OnAudioFocusChangeListener.

View 1 Replies View Related

Android :: Detect Application Launch And Shutdown Events?

May 22, 2010

How to detect application launch and shutdown events?

I have used BroadcastReceiver for detecting incoming message, outgoing call and so on. but now I want to use Application Launch and its Shut Down event from my application..

Kindly waiting for any suggestion/link/source code....

View 3 Replies View Related

Android :: Detect Any Tap On Screen?

Aug 2, 2010

I am looking for a way in which I can detect any tap on the screen (not just in my app), I don't mind not having the information of what the tap was (control/letter), just the fact that a tap was made will suffice for me for now. Is there any possible way to achieve this?

View 4 Replies View Related

Android : How To Detect When Screen Is On?

Apr 4, 2010

As mentioned in a previous question, I am having difficulty intercepting all android.intent.action.SCREEN_ON events without a long-lived service (discouraged). I may be able to work around the need if I can simply work out when the screen is on at any given time, in the service.

View 3 Replies View Related

Android : How To Detect Screen Is On / Off?

Mar 29, 2010

How can I detect the screen is on or off?

View 3 Replies View Related

Android :: Detect Screen Backlight On / Off

Jul 31, 2010

I am trying to detect Screen backlight On / Off.

I've found android.intent.action.SCREEN_OFF related its event.

But I don't know how to use this.

Can you suggest me about how to detect screen backlight on / off ?

I missing some example or sample code.

View 2 Replies View Related

Android :: How To Detect That Wi-Fi Turns Off While Screen Is Off

Apr 18, 2010

I recently bought a HTC Desire which I've become exceedingly fond of.I've read (and been told by a colleague who owns a HTC Legend) that wifi should automatically turn off while the screen is off to conserve battery. I have the impression that I should be able to see the wifi icon turn on as I turn on the screen and unlock the phone. However, I haven't noticed that happening: The icon seems to just be on always.I have then tried observing my router's DHCP table when the the screen is off, but I haven't observed the entry for my phone disappearing (and I don't really know how much time has to pass before the table not showing my phone.Are there any settings that can cause this behaviour? What about programs? I current use smart monitor to log data usage as well as locale (using a SSID plugin and not the locale "location" condition). The only services I can see apart from those I think are OS services, are the ones for locale, smart monitor lite and the SSID plugin.

View 5 Replies View Related

Android :: How To Detect If Widget Is On / Off Screen?

Sep 28, 2010

I'm writing a customized view similar to Grid which will be used to hold a large amount of images. I'm using ImageButton to display the images, and I only want to load images onto the buttons once they are on the screen (and just display a static background image when they are not). The reason for it is that I'm fetching images from some back-end service and I only want to fetch them when the buttons are on the screen.To do that, I'd like to know if the widget is on the screen. Is it possible to detect if a widget like button is on/off screen? If not, any suggestions on how to achieve what I'm trying to do?

View 1 Replies View Related

Android : Way To Detect Screen Size?

Mar 19, 2009

How do I get the current screen resolution (width and height)?

View 10 Replies View Related

Android : Detect Finger Going Off Screen?

Jan 3, 2010

I have a motion listener to detect finger down, finger drag, and finger up. I start my action at finger down and finish my action at finger up. When the action is finished, I store it in a stack for allowing undo. My problem is that if I don't get a finger up event, I can't finish my action to add it to the stack for undo.

How can I detect that the user's finger has left the screen?

I tried using the emulator to see if getEdgeFlags() ever returned anything useful, and the result was always 0.

Basically, if a finger leaves the screen, then nothing is touching the screen anymore and I would like to detect that as a finger up event. How can I do this?

View 3 Replies View Related

Android :: Detect Where On Screen OnTouchevent Happened

Jul 27, 2010

I've got an onTouchEvent boolean on a Surfaceview, I've got openGL objects drawn on the view and I'm wondering is there anyway to detect where on the screen the onTouch happened? e.g (x,y) co-ordinates.

View 1 Replies View Related

Android :: Detect / Intercept Screen Turning Off

Nov 27, 2009

Is there any way where I can detect that the screen is about to turn off, so I can do some work *before* it happens?I need this to work around bug 3755: OpenGL apps sometimes crash when the screen gets turned off because they don't get surfaceDestroyed /surfaceCreated() events. Simply put, I need to shut down OpenGL before the phone has a chance to detach the GPU. The only events I seems to be getting when the screen turns off are onPause() and onWindowFocusChanged both of which turn up *after* the GPU detaches, by which time it's too late.

View 7 Replies View Related

Android :: How To Detect Home Screen Sliding?

Jan 14, 2010

I've checked the WallpaperService.Engine class and don't see anything.What's the best practice for detecting home screen sliding?

View 3 Replies View Related

Android :: Detect Screen Not Belonging To App Comes Into Visibility?

Aug 26, 2010

I have an application that has many screens. Is it possible to detect if the screen NOT belonging to the application (not defined in my android manifest) comes into visibility?

View 1 Replies View Related

Android :: Detect If Screen Is Locked (Live Wallpaper)

May 9, 2010

I'm currently implementing a live wallpaper. This is also visible, when the device is locked. Now I want to show different content, when it is locked but can't find a way to detect this. PowerManager can only change the settings and the wallpaperEngine only gives me a general onVisibiltyChanged() method, which triggers every time you return to the home screen.Dos anybody know a way to detect if the device is locked?

View 2 Replies View Related

Android :: How To Detect User Has Screen Unlock Pattern?

Feb 15, 2010

Is there a way, some API one can call to detect if the user has set a screen unlock pattern or not?

View 2 Replies View Related

Android :: Detect Current Screen Vertical Or Horizontal?

Jun 3, 2009

I need to set different content view after rotating device screen. Is there any method to detect the direction of current screen is vertical or horizontal?

View 6 Replies View Related







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