[android-developers] Re: Android Service

2013-03-13 Thread bob
On Friday, March 1, 2013 1:39:59 AM UTC-6, Amith Salian wrote: > > I have a strange situation with my Service in Activity. > My service calls a background method every 20 sec when active. In the > development environment the time elapse between successive calls is exactly > 20 sec,* however in

[android-developers] Re: Android Service

2013-03-13 Thread Dan
On Friday, March 1, 2013 2:39:59 AM UTC-5, Amith Salian wrote: > > I have a strange situation with my Service in Activity. > My service calls a background method every 20 sec when active. In the > development environment the time elapse between successive calls is exactly > 20 sec, however in an

[android-developers] Re: android service

2011-07-15 Thread Christine
What exactly do you want to achieve? When the user stops your service, they have a reason to do so, so I don't think the app should automatically restart it. On Jul 15, 9:31 am, yanamala siddaiah wrote: > If service stopped by user or any other situation . I want to start > the service again . >

[android-developers] Re: Android:: Service::OnDestroy being called late..

2010-12-22 Thread JC
Thanks again Mark. I am exploring all 3 option one by one by searching examples on google. I will update here on status. Thanks JC On Dec 22, 1:00 pm, Mark Murphy wrote: > On Wed, Dec 22, 2010 at 2:13 AM, JC wrote: > > thanks mark, > > > I am starting service in myactivity::OnDestroy. > > Th

Re: [android-developers] Re: Android:: Service::OnDestroy being called late..

2010-12-22 Thread Mark Murphy
On Wed, Dec 22, 2010 at 2:13 AM, JC wrote: > thanks mark, > > I am starting service in myactivity::OnDestroy. That is a bad idea, since onDestroy() is not guaranteed to be called. > When i am stopping service(2nd time activity get started and service > running) I require latest value two integer

[android-developers] Re: Android:: Service::OnDestroy being called late..

2010-12-21 Thread JC
thanks mark, I am starting service in myactivity::OnDestroy. When activity is opened again, I am maintaining flag in preference that service has started. If that flag is set, then i am stopping service (or starting service with stopself parameter in intent as per yr suggestion in diff. thread in g

Re: [android-developers] Re: Android:: Service::OnDestroy being called late..

2010-12-21 Thread Mark Murphy
On Tue, Dec 21, 2010 at 1:00 AM, JC wrote: > Yes i realize that too. that Service::OnCreate and OnDestroy is called > after Activity::OnCreate and OnDestroy always. > > Then what/how can we get resultant data from service ? What is "resultant data"? Your service can communicate with the activity

[android-developers] Re: Android:: Service::OnDestroy being called late..

2010-12-20 Thread JC
Thanks Mark, Yes i realize that too. that Service::OnCreate and OnDestroy is called after Activity::OnCreate and OnDestroy always. Then what/how can we get resultant data from service ? Thanks in advance. JRC On Dec 20, 12:55 pm, Mark Murphy wrote: > On Mon, Dec 20, 2010 at 1:15 AM, JC wrote

[android-developers] Re: Android service always alive..

2009-08-20 Thread James
I'm using a WakeLock to keep the CPU alive for a few minutes while my timer runs. However, the CPU still seems to go to sleep after 5 minutes if I use PARTIAL_WAKE_LOCK. If I use SCREEN_DIM_WAKE_LOCK, it works as expected. In fact, I can't tell if PARTIAL_WAKE_LOCK does anything at all; the CPU

[android-developers] Re: Android service always alive..

2009-07-29 Thread Mark Murphy
Ne0 wrote: > I wasn't 100% clear, its location updates from telephony manager, so > when the phone gets a new LAC code rather then GPS location updates. Well, I have even less experience with the behavior of all of that under a WakeLock, so I have no particular guidance there. -- Mark Murphy (a

[android-developers] Re: Android service always alive..

2009-07-29 Thread Ne0
Thanks, i will check your examples. > Assuming mWl is the same instance in onDestroy() as you got in > onCreate() Thats correct. > That may be a matter of the GPS radio turning off despite the WakeLock. > Do you have any evidence that GPS is still on? > > I don't know much about that, except th

[android-developers] Re: Android service always alive..

2009-07-29 Thread Mark Murphy
Ne0 wrote: > Can you confirm if i am using WakeLock in the correct way please. > > //My Service > public void onCreate() { > ... > mPm = (PowerManager) getSystemService > (Context.POWER_SERVICE); > mWl = mPm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MGS"); >

[android-developers] Re: Android service always alive..

2009-07-29 Thread Ne0
Thanks Mark. Can you confirm if i am using WakeLock in the correct way please. //My Service public void onCreate() { ... mPm = (PowerManager) getSystemService (Context.POWER_SERVICE); mWl = mPm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MGS"); mW

[android-developers] Re: Android service always alive..

2009-07-29 Thread Mark Murphy
Ne0 wrote: > I am having a similar issue, having my service monitor cell location > changes, but it stops logging them as soon as the power manager turns > everything off. I was just curious as to how the Phone app manages to > know that a call is coming through if the CPU is off? surely it must >

[android-developers] Re: Android service always alive..

2009-07-29 Thread Ne0
I am having a similar issue, having my service monitor cell location changes, but it stops logging them as soon as the power manager turns everything off. I was just curious as to how the Phone app manages to know that a call is coming through if the CPU is off? surely it must have some way to "wa

[android-developers] Re: Android service always alive..

2009-07-29 Thread Archana
I tried in this way.but still not working On Jul 29, 12:46 pm, whitemice wrote: > Maybe this is what you're looking for: > > Its not clear from the documentation the difference between > startService() and bindService().  If you just bind to a service, the > service will be killed after your ac

[android-developers] Re: Android service always alive..

2009-07-29 Thread whitemice
Maybe this is what you're looking for: Its not clear from the documentation the difference between startService() and bindService(). If you just bind to a service, the service will be killed after your activity calls unbind. If you call startService(), then it will (more or less) keep running r

[android-developers] Re: Android service always alive..

2009-07-28 Thread Archana
Hi, I am facing onlowmemory problem in my app... Its working for few minutes and automatically exiting... I am using lots of view in my app,so is it because of that.? I am getting error like this. Low Memory: No more background processes Can anybody tell me how to solve this. Thanks Archana

[android-developers] Re: Android service always alive..

2009-07-02 Thread Todd Sjolander
If you absolutely need it to be running all the time, you need to acquire a PARTIAL_WAKE_LOCK via PowerManager. This will keep the CPU on all the time, and your program running. Be prepared for a shocking decline in battery life. I assume your next question will be "How do I make it run as soon

[android-developers] Re: Android service always alive..

2009-06-30 Thread Mark Murphy
M.Manjunatha wrote: > How do I make my service always alive?? If my service gets killed > because of an exception or if the VM kills my service on low memory, > How do I make sure that my service is always running? Don't do that. Use AlarmManager and have the service perform work periodically. Th

[android-developers] Re: android service utilizing custom usb device

2009-05-27 Thread guruk
do you have a blog or something for your work. I very like the Idea to connect external usb devices. Could be a great improvment to know a page where that stuff is explained a bit, also technicalwise what wires etc.. you know :) greets chris --~--~-~--~~~---~--~~

[android-developers] Re: android service utilizing custom usb device

2009-04-28 Thread dar
Currently there is no usb host in the api. You'll need the ability for android to be a usb host, marked as an enhancement here: http://code.google.com/p/android/issues/detail?id=738 You should star this issue if it is important to you. On Apr 28, 9:57 am, Ke wrote: > Hi Everyone, > > I am look

[android-developers] Re: Android service.

2009-04-23 Thread Dianne Hackborn
Er... call startService(). Or if you want to interact with it through an interface, bindService(). On Thu, Apr 23, 2009 at 8:59 PM, Manjunatha M wrote: > Hi Folks, > > Some please help on this. > > *Class MyService:* > > public class MyService extends Service { > > @Override > public void

[android-developers] Re: android service example

2008-04-15 Thread zenob
hi In API Demos (app.services) package you have some examples how to use services including aidl. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to androi