最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to turn on and off gps in android using cordova - Stack Overflow

programmeradmin3浏览0评论

Im working on a phonegap/cordova project.Im trying to turn on or off in my app.I got code in native android app gps turn off and on.I dont know how to convert this in cordova/phonegap code.Is there any way to make gps on or off using cordova or phonegap.I used below link for native code:

Im working on a phonegap/cordova project.Im trying to turn on or off in my app.I got code in native android app gps turn off and on.I dont know how to convert this in cordova/phonegap code.Is there any way to make gps on or off using cordova or phonegap.I used below link for native code: http://www.helloandroid./tutorials/calling-system-settings-android-app-gps-example

Share Improve this question asked Sep 12, 2014 at 4:52 dps235dps235 631 silver badge10 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 7

i just made a plugin that do that.

cordova-dialog-gps

I hope you serve if so , remember to provide some feedback .

You can create plugin in native code for your cordova project, in that plugin place gps on off code. Pass the parameter from JavaScript to this plugin, based on the parameter value on or off the GPS

some links where you can learn creating plugins

http://devgirl/2013/09/17/how-to-write-a-phonegap-3-0-plugin-for-android/

http://devgirl/2013/09/17/how-to-write-a-phonegap-3-0-plugin-for-android/

http://www.plotprojects./developing-a-cordova-phonegap-plugin-for-android/

发布评论

评论列表(0)

  1. 暂无评论