Recent

Author Topic: Access the GPS  (Read 5334 times)

LittleBritaly

  • New Member
  • *
  • Posts: 24
Access the GPS
« on: September 18, 2013, 09:45:10 am »
Is there currently any way to access the GPS sensor ?






LittleBritaly

  • New Member
  • *
  • Posts: 24
Re: Access the GPS
« Reply #1 on: September 20, 2013, 05:22:31 pm »
Managed to answer my own question, there's a code snippet in androidlcltest, which I couldn't get to compile.

Look for PositionInfo.RequestPositionInfo(pmGPS);





BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Access the GPS
« Reply #2 on: September 20, 2013, 06:22:36 pm »
Nice. Somebody who looks for things himself and even posts back success!

Welcome to the forum, LittleBritaly!  8)

Don't do any Android dev myself, but perhaps this page is useful as well:
http://wiki.lazarus.freepascal.org/LazDeviceAPIs

Thanks,
BigChimp
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

LittleBritaly

  • New Member
  • *
  • Posts: 24
Re: Access the GPS
« Reply #3 on: September 23, 2013, 10:18:10 am »
Thanks BigChimp but shouldn't everyone do that ? (posts any solutions they find).

The link you sent (I'd already been there), that's where I found my first glimmer of hope, where it mentioned permissions for PositionInfo, I then searched all the few examples that exist for "Positioninfo".


I've found the documentation scattered around and hard to locate, is there any form of help file for Android under Lazarus ?



BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Access the GPS
« Reply #4 on: September 23, 2013, 10:32:27 am »
Thanks BigChimp but shouldn't everyone do that ? (posts any solutions they find).
Yes, but apparently it's not so obvious to a lot of people...

I've found the documentation scattered around and hard to locate, is there any form of help file for Android under Lazarus ?
Not as far as I know. There is an Android category in the wiki that lists relevant articles:
http://wiki.lazarus.freepascal.org/Category:Android

In general, IMO, documentation is a weak point for Lazarus and FPC. It is scattered around the wiki, manuals and snippets in the forum. I try to collect as much stuff on the wiki as I can as that seems to me to be the best compromise between ease of editing/updating and structure. Others have different views...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018