+ 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
15 Answers
+ 2
https://www.npmjs.com/package/cordova-plugin-android-wifi-manager
+ 4
what do you need to do in js?
+ 4
thats something of 100 % impossibility on this code playground.I doubt if this is even possible with JavaScript
+ 3
wait so you want the toggle to actually turn on your phones Wi-Fi on and off?
+ 1
i need to link the toggle with system operation like toggle wifi on or off. Sorry it's hard for me to explain
+ 1
Yep, i need to do that.
+ 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.
+ 1
Adam, Can you help me ? đ
+ 1
If you have access to device api through js, yes its possible
+ 1
So, how can i access it ? From where can i get that API ?
+ 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
+ 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.
+ 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
0
Yep, I'm using Cordova and Phonegap to compile my app is that good to allow API access ?
0
thanks, i will check it now.