Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#504 closed defect/bug (invalid)

Turn on GPS sensor automatically

Reported by: openid-provider.appspot.com/skliarie Owned by: cp15
Priority: major Milestone:
Component: port/android Version: git master
Severity: Keywords:
Cc: skliarie, stefan.soeffing@…

Description

On Android (FreeRunner?), navit is not starting GPS sensor automatically, requiring manual turn on of the sensor before using navit.

Change History (5)

comment:1 Changed 11 years ago by skliarie

  • Cc skliarie added

comment:2 Changed 11 years ago by kazer

Does it still apply? Shouldn't the gps device be powered on by the system when it's being accessed, like on SHR?

comment:3 Changed 11 years ago by skliarie

You are correct. See the following link for details: http://androidforums.com/motorola-droid/45620-gps-bt-wifi-battery-drain-when-not-use-but.html#post354185

The problem is that I want only certain applications to be able to start GPS (as there are too many admob enabled apps that want to know your position to "adjust" ads shown).

Is there a way navit can turn-on usually disabled GPS and turn it off after use?

comment:4 Changed 10 years ago by kazer

  • Resolution set to invalid
  • Status changed from new to closed

I had a quick look at android's documentation and found this : http://developer.android.com/resources/articles/future-proofing.html

Have a look at the second paragraph : "For instance, apps can no longer directly turn on or off GPS. These apps won't crash, but the APIs in question now have no effect, and do nothing. Instead, apps will need to issue an Intent to launch the appropriate Settings configuration screen, so that the user can change these settings manually."

So it looks like we can't do that directly from Navit.

If someone finds a solution, please reopen the ticket.

comment:5 Changed 10 years ago by www.google.com/accounts/o8/id?id=aitoawkyurpdsawwjfavg_hbwr-z9m3uo2mv7s4

  • Cc stefan.soeffing@… added

Navit could do, what this paragraph suggests: Issue an Intent that opens the configuration dialog. The question is whether this is wanted. I personally use Navit as a map tool even without GPS switched on.

I see the following possibilities: 1) Leave as is, user turns on GPS when needed 2) Upon startup: Ask user if he wants to enable GPS if it isn' already (should be easy to implement) 3) In th GUI: Add a menu button: "GPS settings", which brings up the configuration dialog.

In case 2) or 3) is wanted, the ticket should be reopened.

Note: See TracTickets for help on using tickets.