Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#504 closed defect/bug (invalid)

Turn on GPS sensor automatically

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


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 13 years ago by skliarie

  • Cc skliarie added

comment:2 Changed 13 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 13 years ago by skliarie

You are correct. See the following link for details:

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 13 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 :

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 13 years ago by

  • 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.