In my case i have a service running in background which is started by
alarm manager after 5 minutes (i used it because i want CPU keep
running ), For sometimes it works fine becuase i am holding wake lock
but after half an hour it does not .


On Feb 3, 10:04 am, nikhil <[email protected]> wrote:
> I dont have any issues with wifi after holding on to wakelock...but
> yeah
> when I try to forward calls the phone starts rebooting itself ...I
> have to kill the service to stop it from rebooting again and again...
> I have no clue why that happens..
>
> On Feb 3, 11:04 am, himanshu jain <[email protected]> wrote:
>
> > I had the same problem i used wake lock but still i think before i
> > acquire wakelock wifi goes in sleep mode .
>
> > On Feb 2, 11:45 am, nikhil <[email protected]> wrote:
>
> > > It seems there is a conflict between call forwarding and wakelock...
>
> > > Can someone test this out please? If you have a service which
> > > implements a wakelock (partial for my case), try enabling the call
> > > forward option in the settings when the service is running in the
> > > background...
>
> > > and please let me know here if the phone keeps restarting..
>
> > > Please help people...
>
> > > On Feb 2, 10:51 am, nikhil <[email protected]> wrote:
>
> > > > It seems there is some conflict between my service and call
> > > > forwarding. Whenever I have my service running in the background,
> > > > after I enable call forwarding the phone restarts and the keeps
> > > > restarting.
>
> > > > Has anyone experienced this?
>
> > > > On Feb 2, 10:26 am, nikhil <[email protected]> wrote:
>
> > > > > What can cause thephoneto restart ?
>
> > > > > On Jan 28, 11:18 am, nikhil <[email protected]> wrote:
>
> > > > > > Hello Friends,
>
> > > > > > I have a service which holds on to a wakelock and the code is 
> > > > > > similar
> > > > > > to this,
>
> > > > > > public class WakeLockService extends Service {
>
> > > > > > PowerManager.WakeLock wl;
>
> > > > > >         @Override
> > > > > >         public IBinder onBind(Intent arg0) {
> > > > > >                 // TODO Auto-generated method stub
> > > > > >                 return null;
> > > > > >         }
>
> > > > > >         public void onCreate() {
> > > > > >                 PowerManager pm = (PowerManager) getSystemService
> > > > > > (Context.POWER_SERVICE);
> > > > > >                 wl = pm.newWakeLock (PowerManager.PARTIAL_WAKE_LOCK,
> > > > > > "My Tag");
>
> > > > > >                 wl.acquire();
> > > > > >         }
>
> > > > > >         public void onDestroy() {
> > > > > >                 wl.release();
> > > > > >         }
>
> > > > > > For past two days, myphonehas been restarting randomly...Today it
> > > > > > was worse, it kept restarting untill I uninstalled the app.
>
> > > > > > I tried to search about this behaviour online and found that too 
> > > > > > many
> > > > > > wakelocks may coz thephonetorestart. Can there be any other reason?
>
> > > > > > Is the above code right? Should make wl as a final variable? Does 
> > > > > > the
> > > > > > service call onDestroy method whenphoneshuts down?
>
> > > > > > I am using a broadcastreceiver to start my service at boot up as 
> > > > > > well.
>
> > > > > > Any help would be appreciated.
>
> > > > > > Thank You So Much
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to