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 <nik...@gmail.com> 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 <nik...@gmail.com> 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 <nik...@gmail.com> wrote: > > > > What can cause thephoneto restart ? > > > > On Jan 28, 11:18 am, nikhil <nik...@gmail.com> 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en