Can someone learn my how to control in phone from app ( Description ) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can someone learn my how to control in phone from app ( Description )

{H,i:C*OodersS }; Absl. You have seen a toggle button in any app but i don't need the style of toggle i need the mission that he do for example the toggle in the status bar that control Wifi On or Off i need this order code I think that it's needs JS so can anyone learn me or give me a link that explain what to do finally, this is my code i have finished the main HTML and CSS but my whole problem is JS. ==> https://code.sololearn.com/WNod4L0KpS1P/?ref=app

16th Apr 2018, 9:41 PM
Abdelrahman Ashref
Abdelrahman Ashref - avatar
15 Answers
+ 2
https://www.npmjs.com/package/cordova-plugin-android-wifi-manager
16th Apr 2018, 11:36 PM
KrOW
KrOW - avatar
+ 4
what do you need to do in js?
16th Apr 2018, 9:46 PM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
+ 4
thats something of 100 % impossibility on this code playground.I doubt if this is even possible with JavaScript
16th Apr 2018, 10:02 PM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
+ 3
wait so you want the toggle to actually turn on your phones Wi-Fi on and off?
16th Apr 2018, 9:55 PM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
+ 1
i need to link the toggle with system operation like toggle wifi on or off. Sorry it's hard for me to explain
16th Apr 2018, 9:49 PM
Abdelrahman Ashref
Abdelrahman Ashref - avatar
+ 1
Yep, i need to do that.
16th Apr 2018, 9:58 PM
Abdelrahman Ashref
Abdelrahman Ashref - avatar
+ 1
i know my freind it's 100B % impossibility in sololearn i needed the code to add it to my application codded with HTML5 and JS and CSS and some of PHP to manage databases so i'm asking to know it's possible with JS for app codded in Html5 or it must be A native app, furthermore my app have JS plugin.
16th Apr 2018, 10:06 PM
Abdelrahman Ashref
Abdelrahman Ashref - avatar
+ 1
Adam, Can you help me ? 😅
16th Apr 2018, 10:46 PM
Abdelrahman Ashref
Abdelrahman Ashref - avatar
+ 1
If you have access to device api through js, yes its possible
16th Apr 2018, 11:10 PM
KrOW
KrOW - avatar
+ 1
So, how can i access it ? From where can i get that API ?
16th Apr 2018, 11:13 PM
Abdelrahman Ashref
Abdelrahman Ashref - avatar
+ 1
I want precise that IN DEFAULT BROWSER APP, javascript cannot access to device APIs for security reason... If you want allow access to APIs you can develop native app that use a WebView that implement your Javascript interface or use other methods like NativeScript and Apache Cordova
16th Apr 2018, 11:24 PM
KrOW
KrOW - avatar
+ 1
Abdalrahman Ashref Sorry I've been off the grid for a bit for work. moving servers. KrOW is right. Cordova is the way to go if you dont want to learn Angular.
17th Apr 2018, 1:54 AM
Adam
Adam - avatar
+ 1
Adam Good luck in your work, Ok i will use Codrova now because i'm still learning JS and PHP so i will learn Angular after i finish them, Thanks
17th Apr 2018, 1:59 AM
Abdelrahman Ashref
Abdelrahman Ashref - avatar
0
Yep, I'm using Cordova and Phonegap to compile my app is that good to allow API access ?
16th Apr 2018, 11:27 PM
Abdelrahman Ashref
Abdelrahman Ashref - avatar
0
thanks, i will check it now.
16th Apr 2018, 11:53 PM
Abdelrahman Ashref
Abdelrahman Ashref - avatar