Android :: Droid Background Service Stops Processing Broadcas Events / Solve It?

Nov 6, 2010

I've a problem with my android application.
I'm using a background service (with notification on the status bar) which performs an audio sample every hour. To perform this sample I generate a broadcast event every hour and when I capture the event the audio recording starts. During the day, when I'm using the phone, I've no problems. The strange behavior happens during night, when it seems like if the phone goes to an "idle" state: the broadcast events are no more processed. From the log file I understood that the events are generated and putted in a queue... and when I start using again the phone, all those events are raised in the same moment.
Do u have any idea about how to solve this problem? How can I force the phone to continue processing my events? do I have to set any variable of flag to avoid the phone going in this kind of "idle" state?

Android :: Droid background service stops processing broadcas events / Solve it?


Android :: Processing Events In SurfaceView

Jun 10, 2009

I am creating a custom Widget which extends SurfaceView and I am planning to use it for camera preview.In the main activity I tried to implement some event listeners but can't catch any event.If I press a button the LogCat outputs "Continuing to wait for key to be dispatched" line.Does anyone know how to implement event listeners in main activity using SurfaceView classes?

View 3 Replies View Related

Android :: Activity Background Processing

Apr 17, 2010

"Note that when you write an activity, you can make it stop or continue running when it is moved to the background (see onStop() in Activity Lifecycle). For activities that download data from the network, it's recommended to let them continue downloading so the user can multi-task." As far as I was aware I had to create a service if I wanted to have a background activity such as a media player, internet download, or processing of data in files on the SD card continue when the activity was no longer in the foreground.I went and reread the onStop information on the "Activity Lifecycle" page, which was referred to. But I didn't find any mention of how an activity might continue to run in the background after onStop was called.

View 3 Replies View Related

Android :: Droid Screen Locked - Service Stop / Can I Solve It

Sep 18, 2009

I had the program I wrote a service, and in service has written a timer, change the timer for one minute cycle time, but why the program in the phone standby (screen lock) were time, I have the timer will be stop running, when I click the menu, get back to normal mode when the timer will automatically have to run? What is the reason, how to solve?

View 2 Replies View Related

Android :: Droid Could Not Access Published Rest Service / Solve It?

Nov 18, 2010

I published the rest service.. but the android app is showing null pointer exception.. but if it access my local machine's service its working well.. the service hosted has anonymous access..

this is my android code...

View 1 Replies View Related

Android :: MapView Stops Generating - Or Receiving? - Events

Oct 2, 2010

I'm working on an Android class that extends MapActivity. I have set the OnTouchListener and everything works okay for the first MotionEvent. After the first MotionEvent, the system stops either generating MotionEvents or receiving them or both.

Does anybody know what I have to do to keep receiving MotionEvents?

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

View 1 Replies View Related

Motorola Droid X :: Battery Stops Charging When USB Service Dies

Jul 27, 2010

I'm the author of SystemPanel, which includes task management (killing) features. I've recently noticed a problem with my Droid X where it suddenly will stop accepting a charge. For example, the screenshot below shows that the phone plugged in overnight, yet battery continues to drain: With a bit of testing, it appears that killing the app "usb" results in this behavior occurring. Once it has been killed, the phone will never accept a charge until it the phone is rebooted.

I would greatly appreciate if a fellow Droid X owner could verify this for me. To do this, use SystemPanel (Lite version will work fine, as will ANY task killer, or the OS' own task killer) to terminate the "usb" program. The full name of the process is "com.motorola.usb". Any task manager should also reproduce the behavior if you perform a "end all" or "kill all" operation. Then unplug the device from USB/AC power (if it was plugged in) and then reconnect it. You should see no indication of a USB connection and/or charging if your device suffers the same problem. The issue can then be corrected by rebooting the phone. Here is the process as shown by SystemPanel: It appears that Motorola has incorrectly allowed this process to be user-killable and/or has failed to automatically restart it in the event that it terminates or otherwise fails. Would greatly appreciate feedback on this problem, if this is not unique to my device, I'll be modifying SytemPanel immediately to avoid ever killing this process.

View 10 Replies View Related

Android :: View Stops Receiving Touch Events When Parent Scrolls / Continue It?

Sep 8, 2010

I have a custom Android view which overrides onTouchEvent(MotionEvent) to handle horizontal scrolling of content within the view. However, when the ScrollView in which this is contained scrolls vertically, the custom view stops receiving touch events. Ideally what I want is for the custom view to continue receiving events so it can handle its own horizontal scrolling, while the containing view hierarchy deals with vertical scrolling.

Is there any way to continue receiving those motion events on scroll? If not, is there any other way to get the touch events I need?

View 1 Replies View Related

Android :: Service Stops When Activity Is Closed

Nov 23, 2010

If I understand it correctly, bindService() with BIND_AUTO_CREATE will start a service and will not die until all bindings are all unbinded.

But if I bindService(BIND_AUTO_CREATE) at onCreate() and hit back button to close the activity, the service calls onDestroy() and dies also.

I don't call unbind() at anytime. So is that mean when the Activity got destroyed, the binding got destroyed also and the service gets destroyed also?

What if I want the service to be always running, at the same time when the activity starts I want to bind it so that I can access the service?

If I call StartService() and then bindService() at onCreate(), it will restart the service at every launch of Activity. (Which I don't want).

So I could I start service once and then bind next time I launch the activity?

View 1 Replies View Related

Android :: Capture Key Events While In Background

Dec 2, 2009

I am planning to port an application from Symbian to Android and I'm looking at the possibilities of the Android platform.

My application runs in background and needs to detect when the user presses and holds a button (for 3-4 seconds) on the phone even when the phones key lock is on.

I am in the process of learning Android programming but so far what I understand is that if my application runs as a service it would be able to receive broadcast such as ACTION_MEDIA_BUTTON. Am I looking in the right direction?

I had a quick look at the list of native android broadcast actions and I could only find broadcast actions for Camera, Media and Call buttons. What about the other buttons?

View 6 Replies View Related

Android :: How To Find What Service Running On Background On Droid?

Apr 27, 2010

How to find what service running on background on Android? Maybe I have to ask in another way? Does the service be presented as one "process", then we can use "ps" or "top" command to find it?

View 1 Replies View Related

Android :: Keep Droid Music Background Service Running?

Aug 21, 2009

I have an android main activity which starts a service (class extending service).

The services onStart creates a Mediaplayer and starts playing an mp3 file.

Then when you click something in my main layout (from the main activity), I call startActivity to fire another screen. I would assume my music background service keeps running, however it finishes. How can I achieve my goal then? code...

View 3 Replies View Related

Android :: Write A Background Service In Droid Which Is Undetectable?

Oct 8, 2010

Is it possible to write a background service in android which is undetectable ? it should not me present is app manager also.

View 7 Replies View Related

Android : How To Detect Launch Of An App In Droid From A Background Service?

Mar 3, 2010

I want to create an app or background service that just listens for the launch of a 'default' app, say Contacts or the built-in Gmail app. If the contact app is clicked, I want to transfer control to my app temporarily (e.g. present a Yes/No popup to the user or increment an internal counter of my app ) and then redirect the user back to the app that was clicked. I want to do this only for a couple of 'well-known' built-in default apps, not any third party apps..

View 3 Replies View Related

Android :: Service Stops Working When Phone Locked

Nov 9, 2010

I have an application which starts a service. The service has a timer and pops a notification every 30 seconds. I notice the following behavior: if the screen is on the notifications are shown ok (even if the app is in background). if the screen is off (by power button or by itself) the notifications won't show. if the screen is off but I have the debugging running the notifications appear. How can I make the service run with the screen off. (The actual app only checks if a notification should be checked every 30 seconds, but for testing purposes, the above scenario is ok)

View 2 Replies View Related

Android :: Service Stops Running In Standby Mode

May 23, 2009

I'm trying to log the phone's cell movement. So I created a PhoneStateListener that is being called when the CellLocation has been changed. Then it informs a logging service to write that new cell information to a log file.

This works as long as the screen is on. But when the screen goes off, the logging stops.

I have two classes:

The PhoneStateListener gets loaded on boot time public class CellStateListener extends PhoneStateListener { public void onCellLocationChanged(CellLocation location) {...this is the logging service which is informed when the cell location changes listener.onCellChanged(mcc, mnc, lac, cid); ... }

View 3 Replies View Related

General :: Android YouTube Apps Stops Playing Music If Screen Is Off Or Going To Background

Mar 17, 2013

When playing music with the stock Music Player application on my phone and turning the phone screen off or multitasking, the music is still able to play in the background. Is it possible to do the same with the stock YouTube app? I want to let the audio of the YouTube video I am watching to keep playing when I either exit out of the app or when I press the power button on my phone to turn off the screen to save battery. Although I can just set my phone screen to not go off when idle for a certain amount of time, but then again, that is battery consuming.

Phone information:

-Samsung Galaxy S Relay 4G from T-Mobile
-Ice Cream Sandwich 4.0.4
-Rooted
-No Custom Rom Installed

View 3 Replies View Related

Android :: How To Get Events Out Of Service

Sep 9, 2009

I understand how to call methods on a service (aidl, etc...), but how does a service event information out. how does it generate events back to the application?

View 7 Replies View Related

Android :: Keeping Notification At The Status Bar After Service That Spawned Stops

Mar 9, 2010

I have a main application, that at some point spawns a service that checks for updates, if it finds any, it posts a notification with the ink to the update, and then the update service stops. Through the debugger I've noticed that the notification pops up but then disappears once my service is stopped, which I guess makes sense since the Notification object was instantiated within that service. What would be the best practice of keeping that notice available until the user clicks it?

1) somehow attaching the notification to my top service - which might get really ugly --> since that update service is spawned by another sub-service that is spawned by a broadcast receiver... so even if i wanted to somehow pass the object of my top level service it would mess the entire abstraction of my app structure and would force me to keep pointers to it through every event and service that I use... Perhaps there is some other way to get that service through the app's context? or any other alternative?

2) Finding a way to keep my update-service alive until the user presses the notification, but I'm not sure if there is any intent broadcasted that I could listen to...

View 2 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 :: Service That Injects Key Events?

Mar 17, 2010

Is it possible to have a service running in the background that

a) Finds the current foreground activity. b) Sends key press or touch events to it?

View 2 Replies View Related

Android :: Handling Events From One Service For Multiple Activities

Jun 10, 2010

I have a class A which extends TabActivity and creates Activities B, C and D as tabs in its onCreate() function. Also, class A initializes another service handler class S which is responsible for establishing a connection to a service and implementing callback handlers for the service. Any of the Activities B, C and D should be able to receive events from the service and update accordingly. If I receive any event in class S from the the service then I want to call a function in Activity B which would be responsible to update the UI elements in Activity B based on the event received. You can assume that the user is in Activity B when the event arrives.

Can I call an activity function like the following in the stub handler for the callback in my class S -

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

View 4 Replies View Related

Android : Need To Always Run A Service In Background

Apr 2, 2010

I am in the process of creating an app that is similar to the build-in SMS app. What I have tried: - running a regular service which worked just fine until android kills the service - using the AlarmManager the make the 5 min. interval call to a service. But I was not able to make this work.

View 2 Replies View Related

Android :: Want To Develop A Service That Needs To Be Run In Background

Jul 15, 2009

I'm trying to develop a service, which needs to be run in background as a low priority task and does some complex processing . I need to gracefully quit my service when their is a resource shortage( like CPU running low on memory). Was there any APIs available to know the CPU resource usage, Objectives of my service is to - 1. Exit service when a high priority application(s) is running and which might need entire CPU resources. 2. Should store my states before onDestroy() of my service is called.

View 3 Replies View Related

Android :: Show Pop Up From Background Service

Sep 15, 2010

it is possible in android to show pop-up dialog from background running service?

View 1 Replies View Related

Android : Is It Possible To Use Accelerometer In A Background Service?

Sep 9, 2009

It seems trivial to use GPS in a background service, but how can you do the same with the accelerometer? Everything I've tried seems to require a context, but a background service doesn't have a context?

View 5 Replies View Related

Android : Way To List Background Service

Apr 22, 2010

I like to check my service status, e.g. live or be killed. so, I hope there is a command like "ps -ef " of linux.

View 2 Replies View Related

Android : Background Service Is Not Working

Nov 24, 2009

I wish to use implement Service in my application to display a message on the screen. This service should run while my application is running. But right now, i just want to test the service function and the Service doesn't seem to work well. In the main java file, i call startService(new Intent (this,testing.class)).

View 8 Replies View Related

Android : Why Use Service For Background Tasks?

Nov 2, 2010

An activity can use AsyncTask or Handler framework for background work. Both will continue to work even after user has moved away from the activity that started them and the onDestroy for the activity has been called. In other words, an activity is fully capable of doing background work even after its GUI has been shutdown.In this scenario, use of Service for background work seems like redundancy. What does Service bring to the table that an activity can not do?

View 3 Replies View Related

Android :: Get Performance Increases Using Processing For Droid?

Oct 14, 2010

I have converted a few of my Processing sketches into Android apps, but they seem to run really slowly in the emulator and on my device.

Are there any tips on how to increase the speed and performance of my sketch running as an Android app? Are there things or parts of the Processing API I should avoid?

View 1 Replies View Related







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