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

Android :: Keeping notification at the status bar after service that spawned stops


Android :: Access Original Activity's Views From Spawned Background Service?

Jul 21, 2009

I have an activity called A, and on the selection of menu item 0, it spawns service B, which starts a runnable C in a new thread. I have a TextView in activity A, which I want to access in thread C.

I've tried making the TextView a public static field, but that generates the following error:...........................

View 5 Replies View Related

General :: Lock Apps In Memory Without Keeping Icon In Status Bar?

Nov 21, 2013

Any way to lock apps in memory without keeping icon in status bar? I guess I have problem with Lux auto brightness and Keep Screen On. I turned off icon of this apps in bar, and they are stopping working I guess that is because android JB is killing them when there is no icon.

View 6 Replies View Related

Android :: Keeping Service Alive Across Configuration Changes

Apr 7, 2010

The default way configuration changes (i.e., rotates) are handled is to destroy the activity & recreate it with a new one. What is the recommended way to handle these changes in an activity that binds / unbinds to a service (that is possibly heavy/slow to start)? When the activity gets destroyed, it unbinds & causes the service to be destroyed. When the new activity is created, it binds & recreates the service.

The only choices seem to be:
-- override onConfigurationChanged in the activity. Feels ok, but non - conformant.
-- explicitly start the service & only stop it when the last activity gets an onDestroy that's not due to a config change (i.e., there was no call to onRetainNonConfigurationInstance). Feels icky.
-- explicitly start the service & don't stop it until some amount of time after the last unbind. Ickier.

On a related note, what happens between activity switches within a process, where the first activity (A) starts the next activity (B) & then calls finish() -- is there a guarantee that B.onCreate is called before A.onDestroy? If not, and the activities share a service, the same issue of keeping the service alive during this window exists, but with only the icky workarounds.

View 7 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 :: 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

Android :: How To Add Flags To A Notification Status Bar Notification?

Oct 19, 2010

im following the tutorial from developers guide but i have a problem tutorial says: "To clear the status bar notification when the user selects it from the Notifications window, add the "FLAG_AUTO_CANCEL" flag to your Notification object" buT how i can add the flag to my notification?notification doesn't have any kind of function to add flags then? how i can do it?

View 1 Replies View Related

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?

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

Motorola Droid X :: Media Sound Stops After Notification

Jul 20, 2010

It has NOT been this way from the beginning. When I am listening to music or playing a game, the sound will stop after a notification sound. If the screen is off like when I am playing music, then pushing the power button will start the sound again when the screen comes on.

View 1 Replies View Related

Android :: Can Service Report Back To Calling Activity With Status

Jun 29, 2010

Is there a way that a Service can report back to the calling activity when the Service has reached a particular stage of processing? Consider a music player activity that initiates the actual music playing in the background as an Android Service. I want to detect and inform the Activity when the Service has reached the Mediaplayer's onPrepared. Is there a way that the Service can tell the calling Activity when the MediaPlayer's onPrepared is called, to let the Activity know that the audio is prepared and ready to play?I am basically looking to see if there is work around, rather than having a thread in the activity, pinging constantly to check if the Service has reached onPrepared.

View 2 Replies View Related

Android :: Set Solid Background To Spawned Activity

Sep 9, 2010

I'm not very familiar with the android SDK yet. I have an application (game), which is developed mainly using the NDK, and uses egl to render. i have an activity which handles the egl swapbuffer and runs the games native main loop, pretty straight forward I guess.

Now I have made another activity which host a TableLayout containing an EditText as well as a button (simply for text-input later used by the game). I spawn this activity from my main activity using startActivityForResult. The small problem I'm having now is that I can't manage to make this "popup" activity to have a background, so my paused game will reside in the background, with the various widgets just overlaid. This is not very pretty in my opinion, and I would like to at least have a solid background color for my spawned activity while it's active. I *could* just simply go into some state in the games main loop which clears the gl-screen just before I spawn the new activity. But I don't like this solution and it's a tad more work then I'm prepared to put in just at this time in the project. I'm pretty sure there is some simple way to just set a background color somehow, I just can't find *any* way to do it, I've looked around in the SDK resources and tried to search for any hints towards this, but i'm just not familiar enough with the java SDK to find what i'm looking for.

On a side note I would also like to be able to center the EditText widget as well as the button on the screen once the Activity is active, I haven't looked very deeply into it yet, but from a quick glance of the documentation I couldn't really find any suitable positioning methods in the tablelayout class. But as I said, haven't looked very hard. Can probably solve that one easy, but i'm just throwing this in as well :)

View 2 Replies View Related

Android :: How To Do A Notification In Status Bar For Icon?

Oct 20, 2010

How can i do a notification in the status bar but without the expanded message in the "Notifications" window? i mean, i need just the icon, nothing more. there is a way to do that?

View 1 Replies View Related

Android :: Handling Status Bar Notification

Mar 8, 2010

in my app a background service starts and from that service i want to set Status bar notification, that the service has Started following is the Notification is displayed in Status bar But whin i click on that MyClass.class is not fired.And in log cat it shows
"Input Manager Service Window already focused ignoring focusing ...." Code...

View 2 Replies View Related

Android :: Service Restarted With All Unfinished Intents That Returned Start Status START_REDELIVER_INTENT?

Nov 1, 2010

Suppose you have a download service that downloads files asynchronously. For each download intent received it will put the URL of the file to download and the start ID into a job queue and return START_REDELIVER_INTENT. A worker thread then processes that list and calls stopSelf with the start ID it just processed. My question is: If the service's process gets killed and the service restarted, will the service receive all the intents (with the URLs) it hasn't called stopSelf on before it was killed or does the service receive the last intent only? It seems the API docs are ambiguous on this.

The docs say

"if this service's process is killed while it is started [...], then it will be scheduled for a restart and the last delivered Intent re- delivered to it again [...]", indicating that only the last intent gets redelivered (which would be terrible in this use case), but they also say "The service will [...] be re-started if it is not finished processing all Intents sent to it (and any such pending events will be delivered at the point of restart)."

View 4 Replies View Related

Android :: Displaying Notification Icon In Status Bar

May 14, 2010

I am displaying an icon in status bar depending up on my condition .upto this it is ok.Now problem in my application is when i come back to application still the icon is displayed in the status bar.I don't want the icon when i come back from the application.For this give me some suggestions

View 1 Replies View Related

Android :: Place An Icon In Status Bar / Not Notification?

Oct 20, 2009

I want to place an icon in the status bar when my service is started. I know how to send notifications to the status bar, but what I want is to show only an icon at the right, like the WIFI icon when WIFI is on, the antenna icon when "GoogleMaps" is on, etc. My service will send notifications to the status bar when needed, but also I want the user to know that the service is running placing an icon at the right. Is that possible?

View 2 Replies View Related

Android :: Intents To Activity From Notification Status Bar?

Sep 22, 2010

I am trying to start an activity from the notification bar but it needs to get an int. From activity to activity I would just put an int into the intent but I can't seem to figure out where to add the extra for the notification bar? Is this possible? If not is there a better way to do it?public void notifyMe()Code...

View 1 Replies View Related

Android :: Empty Red Circle In Notification Status Bar

Nov 2, 2010

When I have a status bar notification with a number inside, it shows the number fine. But later if I show another notification to replace this one, with no number, it shows an empty red circle. This circle shouldn't be there. How do I remove the red circle? See image here: http://jump.fm/UYHGV.

View 1 Replies View Related

Android :: No Root - Battery Status In Notification Bar APK

Oct 21, 2010

Finally available for non root guys. Here's the screenshot of my phone. And just email yourself this .apk and install from your phone.
circular_battery_indicator.apk

View 18 Replies View Related

Android :: Group Notification In Status Bar But Not In List

Sep 20, 2010

Does anyone know if there is a way to group a notification in the status bar but not in the list of notifications? I want to show only one icon in the status bar but when the user drags down the "notifications list" it should be several notifications with different intents. As I understood there is only possible to either group both notifications on both places or to create several notifications which will cause several notifications in the status bar.

View 1 Replies View Related

Android :: Remove Notification Icon From Status Bar

May 15, 2010

I am displaying an icon in status bar.Now i want to remove that icon immediately when i open that content , after some time if we receive any alert ,that icon will be displayed again.For this what can i do?

View 1 Replies View Related

Android : Want To Create A Notification Without Icon In Status Bar

May 18, 2010

I wanted to create a notification without the icon in the status bar (the state that is not expanded). I tried the custom expanded view and set the icon for this view only. But it did not work. When I give 0 as icon to the constructor, the icon disappears but notification also does not appear in the expanded view.

Notification notification = new Notification(0, "", 0); I tried a lot of combinations but didn't come out with a solution. By the way, I know it is working because I saw this feature in some apps. Thanks.

View 1 Replies View Related

Android :: Notification Icon / One For Status And One For Pull Down List?

Jul 2, 2010

Is it possible to show one icon in the status bar, but when the user pulls down the Notification List, to have a different icon display there? (ie, one for the Intent and one for the status bar?)

View 3 Replies View Related

Android :: How To Create A Status Notification Bar In Home Page?

Oct 18, 2010

I am new to android.I want to now how to create a status notification bar in the home page.can anyone help me with some codes.

View 3 Replies View Related

Android :: Display Notification As Activity Instead Of Adding It To Status Bar?

Nov 9, 2010

I m a newbie to android development and i wanna know a right way to get notification as an activity instead of statusbar notification.

To be clear, i wanna display an notification on screen instead of adding it to status bar.

View 2 Replies View Related

Android : How To Hide / Remove Icons From Notification / Status Bar?

Nov 19, 2010

I've looked all over the forum, but don't see any recent posts for my question. So I'm hoping someone can help... I would like to hide or remove unwanted icons from the left side of the notification/status bar. I realize most programs give you this option, but some don't (such as the latest version of Norton security program). It just sits up there and hogs up real estate. Ideally, it would also be nice to be able to rearrange the icons, or make them larger if desired..

View 1 Replies View Related

Android :: Get Latest Notification Title And Data From Status Bar?

Aug 3, 2010

I am creating an App that gives sound notification to user when he gets msg from gtalk.
Thought there is no direct access to gtalk,
is there any way to get the latest notification title and data from notification status bar?

View 1 Replies View Related

Android :: Create Only Status Bar Notification Like Alarm Clock - Battery

Nov 1, 2010

I dont drawer type notification.. i only want only an icon as notification.

View 1 Replies View Related







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