reboot

SDK Android : How to open Shutdown/Reboot dialog for the device

人走茶凉 提交于 2020-01-07 06:16:08
问题 I'm new here. I have a problem, i try to shutdown a 4.2.2 android device (not root). I know that ACTION_SHUTDOWN not works with unroot device. So i want to open the existing shutdown/reboot/airplane dialog, the same we get when we maintain the on/off button. Then the user just have to click shutdown button. I try to create by this way, without result... Intent intent = new Intent(Settings.ACTION_DISPLAY_SETTINGS); // or others settings startActivity(intent); Thanks, 回答1: The is no public sdk

Proximity Alerts not working after phone reboot

蹲街弑〆低调 提交于 2020-01-05 09:25:46
问题 I am using proximity alerts in one of my applications, however it seems that whenever I reset my phone (via battery pull) or just in general, the proximity alerts are no longer active. The only way they work once again is if I uncheck and recheck the checkbox (which removes, then re-adds the proximity alert) Any idea's or reason? 回答1: You must reset the alerts. The Android OS does not persist your alerts when rebooting, that's up to your app. Create a BroadcastReceiver (I called mine

forever does not start on server reboot [duplicate]

◇◆丶佛笑我妖孽 提交于 2020-01-03 03:45:18
问题 This question already has answers here : Using forever with Node.js (2 answers) Closed 6 years ago . I have added some processes to forever ( forever start script.js ) but when server reboot forever list is empty and of course none of them was started. Any idea to fix this because I thought forever was made to run for ever... 回答1: The simplest way is to start forever from /etc/rc.local. There are more complete ways to do this so you can start/stop/etc... or use something like monit (but this

Android phone reboots on uninstall

别等时光非礼了梦想. 提交于 2020-01-02 05:04:48
问题 I am developing an app and when I uninstall the phone kind of semi-reboots. This is my old post: I have a strange problem with my phone. I am using SAMSUNG GALAXY 5 (GT-I5500) with Android 2.2 on it (not rooted). I am an android developer and I have been doing pretty advanced apps. However, sometimes when I am testing and installing an application the phone reboots. I'm starting it trough Eclipse but I do not know what exactly what causes the phone to reboot. It is not heat for sure, as I

ansible reboot 2.1.1.0 fails

自闭症网瘾萝莉.ら 提交于 2020-01-02 02:38:49
问题 I've been trying to create a really simple Ansible playbook that will reboot a server and wait for it to come back. I've had one in the past on Ansible 1.9 that worked, but i've recently upgraded to 2.1.1.0 and it fails. The host i'm rebooting is called idm and has an IP of 192.168.200.23. the playbook is being run from my host 192.168.200.1 with the command $ ansible-playbook reboot.yml -vvvv This is the playbook i'm using --- - hosts: idm tasks: - name: Restart server become: yes shell:

How do I detect if a Windows server is available after a reboot?

試著忘記壹切 提交于 2020-01-01 05:31:28
问题 I want to automate a Windows 2000+ server reboot process using Task Scheduler or similar tool to remotely reboot a server and wait for it to come back up. I can issue shutdown or psshutdown to remotely reboot, but I want something better than sleep to wait for it to come back. I need to verify it is back online within n minutes or throw an error. By 'back online', I would like to verify more than just that it can be pinged, but perhaps its RFC service is responding or some other determinate

Objective-C restart iphone or possibly another method?

霸气de小男生 提交于 2019-12-25 12:49:06
问题 I read that there was no method to restart the iPhone (at least that will go through the app store), so I am wondering if you have any other ideas. Basically, at my desk, I receive "No Service"... When I go out to my car (in a service area), I remain in No Service without being able to make a call until I restart my iPhone. I've tried respringing winterboard, I've tried airplane mode on/off and that doesn't work either. The only way I've found is to restart the iPhone completely. Does anyone

How do I mark a directory to be deleted after reboot?

孤人 提交于 2019-12-24 16:01:28
问题 I've got an uninstaller that performs some actions and then prompts the user to reboot. I'd like a directory to be deleted after the reboot takes place. I know there's a way to do this, I'm just not sure how. I'm using a WiX installer, and I'd imagine I could use that to do so, somehow, but I'm open to alternatives (whatever's simplest is just fine with me). My target platform is Windows 7, though it would be nice if this worked with older versions of Windows as well. What's the simplest way

Reboot in Recovery Android

六眼飞鱼酱① 提交于 2019-12-24 08:08:26
问题 I've finally managed to get the Reboot code work. I used following code : Runtime runtime = Runtime.getRuntime(); Process proc = null; OutputStreamWriter osw = null; StringBuilder sbstdOut = new StringBuilder(); StringBuilder sbstdErr = new StringBuilder(); String command="/system/bin/reboot"; try { // Run Script proc = runtime.exec("su"); osw = new OutputStreamWriter(proc.getOutputStream()); osw.write(command); osw.flush(); osw.close(); } catch (IOException ex) { ex.printStackTrace(); }

Resetting alarms on reboot

六月ゝ 毕业季﹏ 提交于 2019-12-23 05:41:51
问题 User can create different alarms. So it's up to user when to keep alarm and he can keep multiple alarms and I maintain all the scheduled alarms in a database and show to the user for further reference. Below is my code. if("CREATEONCE".equals(strparam1)) { am.set(AlarmManager.RTC_WAKEUP, l2, pi);// l2 is time in millis }else if("CREATEREPEAT".equals(strparam1)) { am.setRepeating(AlarmManager.RTC_WAKEUP, l2, 86400000 , pi); //l2 is time in millis } So this is the code which sets the alarms.