Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4android > Basic4android Share Your Creations
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Basic4android Share Your Creations Show your creations. Please upload source code if possible. You can use File - Export As Zip to create the zip file.
The first attached image will be displayed as the thread preview image.

GPS Example

Reply
 
LinkBack Thread Tools Display Modes
  #51 (permalink)  
Old 02-02-2012, 10:15 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,461
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Quote:
Originally Posted by sheriffporter View Post
Anybody have a simple routine to convert the GPS speed output from Meters per second to MPH? Or is there a way to format the output with the library?
Just for your information, the speed conversion does already exist in the GPSExample program. When you touch the header of the speed column the speed unit does change from m/s to km/h to miles/h and so on.
It's done in the UpdateDispSpeed routine in the GPSPaths module.

Best regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #52 (permalink)  
Old 02-02-2012, 03:32 PM
Newbie
 
Join Date: Jan 2012
Posts: 4
Default

I'm trying to compile the GPS demo and I'm getting the following error:

Compiling code. Error
Error parsing program.
Error description: Unknown type: webviewextras
Are you missing a library reference?
Occurred on line: 138
Dim MapViewerExtra As WebViewExtras


I've seen the other posts about the additional libraries I need and have created an AddLibraries folder and have ByteConverter, Dialogs, WebViewExtras in there.

Anyone offer any further suggestions?

Edited to add: I just checked and I can compile and run the WebViewExtras demo program.

Last edited by kahonen : 02-02-2012 at 03:35 PM.
Reply With Quote
  #53 (permalink)  
Old 02-02-2012, 04:06 PM
Newbie
 
Join Date: Jan 2012
Posts: 4
Default

Problem fixed. My apologies.

I hadn't used the check boxes to add the libraries.

Amazing the difference reading the manual makes
Reply With Quote
  #54 (permalink)  
Old 02-02-2012, 11:39 PM
Junior Member
 
Join Date: Jan 2012
Posts: 42
Default

OK, thanks you!
Reply With Quote
  #55 (permalink)  
Old 02-03-2012, 09:25 PM
JoanRPM's Avatar
Junior Member
 
Join Date: Dec 2011
Location: Terrassa, Barcelona, Spain
Posts: 32
Default

It's a very good example.
I'll have to look in depth. I'm a beginner and I'm still learning how everything works.
Thanks.
Reply With Quote
  #56 (permalink)  
Old 02-06-2012, 02:37 AM
Newbie
 
Join Date: Feb 2012
Posts: 3
Question Number Format Exception

Morning all
When Running the GPS Example on my Galaxy Tab 10.1 or on my HD2 phone I get the following exception:

Error Occurred
An Error has occurred in sub: main_gps1_locationchanged (java line: 1415)
lava.lang.
NumberFormatException
Continue ?

--
The App sterts Ok and picks up several sattelites in the SATS Tab, but will go no further.

btw: I notice that the Altitude reading is '1,653.1' and it seems that the format of this should not have the ',' (comma) in it. Perhaps this is what is troubling the java NumberFormatException.

Is there perhaps a setting in my phone I can change (ie to make the format of the Altitude returned from my GPS 'correct') or is it an omission in the java library that stops it from properly handling an Altitude (or any other number) that is returned with a ',' in the string ?

I'd appreciate some advice on getting this App to work in the same way everyone else seems to have done.
Reply With Quote
  #57 (permalink)  
Old 02-06-2012, 06:49 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,461
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

The bug was in the format as you suspected.
The code in the first post has been updated.

Best regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #58 (permalink)  
Old 02-07-2012, 12:52 AM
Newbie
 
Join Date: Feb 2012
Posts: 3
Default Works well

Thanks Klaus
It works nicely on both devices now.

I'm really looking forward to learning from your code

I hope I can contribute something every now and again as a gesture of respect and thanks for your very generous code and postings.

Thanks again

Malcolm
Reply With Quote
  #59 (permalink)  
Old 02-07-2012, 04:27 AM
alfcen's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu Islands
Posts: 810
Send a message via Skype™ to alfcen
Awards Showcase
Beta Tester 
Total Awards: 1
Default Splitting hairs

Gruetzi Klaus,

Sorry for splitting hairs once again (I think in French you'd say, "splitting hairs into 4 pieces"). Anyway, there are a couple of undefined variables...

Activity Main
MapYCursor: Line 32 (declares MapXCursor twice)

Activity GPSPaths
GPSFilenameOld: line 106
txt: lines 228/252
MapZoomCalculated: line 260
GPSPathModified: lines 280/785

Activity Satellites
txt5: Line 36
Reply With Quote
  #60 (permalink)  
Old 02-08-2012, 12:16 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,461
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Hallo Robert,
Thank's for having "coupé les cheveux en 4", but I don't consider it like that.
I had'n looked at the code with the IDE version1.8, the new feature showing non declared variables is very useful.
In the first post I updated the program version 1.56

Best regards and thank you.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


All times are GMT. The time now is 10:43 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0