Comments (7)
Hi, I helped solve this issue, sending this PR (df1b174).
Please, update this package for version 1.0.3, and to solve your problem, you just need to run this code below to check if the GPS is turned on:
Template.gps.helpers({
hasGPS: function() {
return !!Geolocation.error();
}
});
and in your template use this snippet:
<template name="gps">
{{#if hasGPS}}
<h1>GPS online!</h1>
{{else}}
<h1>GPS offline, turn the gps on and <a href="#" onclick="window.location.reload();">reload the app</a>.</h1>
{{/if}}
</template>
Now there is a timeout of 10 seconds checking if the GPS is on, if not it throws error.
This code runs on mobile too. I hope this code can help you!
from mobile-packages.
Thanks a lot! That solves the detection problem! Now we only need to find a way to not ask the user for a manual reload, as any production app would not.
from mobile-packages.
I didn't find a way to create a button for turn on gps, but if you find
please share with us!
Att,
Caio Ribeiro Pereira
Software Engineer
http://crpwebdev.com
On May 21, 2015 3:18 AM, "BraveKenny" [email protected] wrote:
Thanks a lot! That solves the detection problem! Now we only need to find
a way to not ask the user for a manual reload, as any production app
would not.—
Reply to this email directly or view it on GitHub
#54 (comment)
.
from mobile-packages.
Hope this might be helpful to who reach here with this GPS problem. Plugin for phonegap/cordova to display a dialog and redirect to GPS settings when the GPS is disable. https://github.com/rodrigo-martinezd/cordova-dialog-gps
from mobile-packages.
Hello @vinaypuppal have you used with meteor? if yes than give me tarball url for installation or any example
from mobile-packages.
@dhavalrajani92 Yes I have used it working perfectly, here is the tarball url https://github.com/rodrigo-martinezd/cordova-dialog-gps.git#f1103143fcf725fb98be8af7cbf98383945225ab
from mobile-packages.
I'm closing this issue as it has been fixed.
from mobile-packages.
Related Issues (20)
- no plugin found for camera.less in mdg:camera HOT 19
- Update and upgrade
- How to localize/translate mdg:camera HOT 1
- geolocation does not work with Meteor 1.4+ HOT 4
- Reset and retrieve again GeoLocation values HOT 1
- geolocation is showing null. HOT 2
- Image quality (mdg:camera) HOT 1
- Camera problems ( mdg:camera)
- After upgrading to Meteor 1.5.1 .latLng() and .currentLocation() return null HOT 3
- Geolocation.currentLocation() not working, giving null value using meteor(1.5.1) & mdg:geolocation(1.3.0) HOT 5
- Decide what to do about mdg mobile-packages HOT 2
- Apple requires me to customize the notification prompt that asks the user for permission HOT 3
- Locale not work in mobile, I use this and work for me HOT 1
- On cordova mdg:geolocation doesn't wait for the cordova-geolocation-plugin to be ready HOT 1
- Still maintained? HOT 3
- mdg:camera using deprecated Chromium API HOT 5
- Will the plugin save the image to the mobile device HOT 1
- Failed to execute 'createObjectURL' HOT 2
- mdg camera uses underscore
- mdg:camera incompatibility with latest meteor version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobile-packages.