Can any body give me HTML coding for auto switch off for phone? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can any body give me HTML coding for auto switch off for phone?

27th Oct 2016, 2:16 PM
Ethical Guy.
Ethical Guy. - avatar
14 Answers
+ 4
You cannot switch off the mobile device on the gound of HTML coding. HTML is used to develope web page structure and content only. There is no behavior by HTML.
27th Oct 2016, 3:00 PM
AlamSirji
AlamSirji - avatar
+ 4
In case of Android Development (Device can be switched off) No other ways will help you to do so.
27th Oct 2016, 3:23 PM
AlamSirji
AlamSirji - avatar
+ 4
Dear Ethical Guy, Above stated script is Java Script embedded in HTML web page and you cannot switch off device with JS. To do so may use one of following languages - Java C++ Python Corona Apache Cordova etc.. However JS with combined of other language may be used to do so. such as Apache Cordova in Vb.Net + Java Script
27th Oct 2016, 3:35 PM
AlamSirji
AlamSirji - avatar
+ 2
Dear Ethical Guy, A good programmer shouldn't make mistakes while typing on digital keyboard , kindly update your comment to "These are codes for vibration" Have a nice day, I hope you don't mind...
27th Oct 2016, 3:57 PM
AlamSirji
AlamSirji - avatar
+ 2
@Ethical Guy I am from Delhi, India. May I know about you ?
27th Oct 2016, 4:03 PM
AlamSirji
AlamSirji - avatar
+ 2
@Ethical Guy Its I, Alam Sirji (alamsirji6928@gmail.com) Have a look at my coded phase in playground. I hope you will like one of them.
27th Oct 2016, 4:16 PM
AlamSirji
AlamSirji - avatar
0
So by Java or anyother language ?
27th Oct 2016, 3:20 PM
Ethical Guy.
Ethical Guy. - avatar
0
I have seen some codes which auto vibrate phone on start up. so i thought is there something which can switchoff too?
27th Oct 2016, 3:25 PM
Ethical Guy.
Ethical Guy. - avatar
0
body> <script type="text/javascript"> navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate; navigator.vibrate([1000, 500, 1000, 500, 1000, 500, 1000, 500, 1000, 500, 1000, 500, 1000, 500, 1000, 500, 1000, 500, 1000, 500, 1000, 500]); </script> <img width="100%" src="phone.png" onclick="window.location.href='tel:09098790815';" /> <audio autoplay="autoplay"> <source src="ring.mp3" /> </audio> </body>
27th Oct 2016, 3:29 PM
Ethical Guy.
Ethical Guy. - avatar
0
These are codes for vibration
27th Oct 2016, 3:29 PM
Ethical Guy.
Ethical Guy. - avatar
0
Thank you soo much bro
27th Oct 2016, 3:53 PM
Ethical Guy.
Ethical Guy. - avatar
0
btw where are you from?
27th Oct 2016, 3:59 PM
Ethical Guy.
Ethical Guy. - avatar
0
I'm from India too!
27th Oct 2016, 4:04 PM
Ethical Guy.
Ethical Guy. - avatar
0
bro can we exchange our email?
27th Oct 2016, 4:05 PM
Ethical Guy.
Ethical Guy. - avatar