Android Question Weather with geolocation

Arnaud

Active Member
Licensed User
Longtime User
Hello,

I search a code example in B4A to receive weather based on GPS position, GPS coordinate.
The best exemple is AHWeather (https://www.b4x.com/android/forum/threads/weather-app.10919/)

I don't find code for weather, only APPs shared in "Share my creation", but without source/code/Example...


I tried ICOSWorldForecast 3.50 but without success...
Maybe anyone can help me please?

Thank you very much.

Arnaud
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Upvote 0

susu

Well-Known Member
Licensed User
Longtime User
You can try Forecast.io API

"The Forecast API allows you to look up the weather anywhere on the globe, returning (where available):
  • Current conditions
  • Minute-by-minute forecasts out to 1 hour
  • Hour-by-hour forecasts out to 48 hours
  • Day-by-day forecasts out to 7 days'
It's free for 1,000 calls/day and after that $0.0001 each.

https://developer.forecast.io
 
Upvote 0

Arnaud

Active Member
Licensed User
Longtime User
Thank you for your help, it is a success, I receive weather depends coordinates !!

Thank you very much, :)
 
Upvote 0

Arnaud

Active Member
Licensed User
Longtime User
Hi Joe,

here an example:

Sub recuperation_meteo

Dim job As HttpJob
job.Initialize("JobMeteo", Me)
job.Download("http://api.wunderground.com/api/xxxxxxxxxxxxxx/geolookup/conditions/lang:FR/q/"&Latitude&","&Longitude&".xml")

end sub




Sub JobDone(job As HttpJob)

If job.JobName="JobMeteo" And job.Success=False Then

Log("No Internet connection")

Else

Dim retour_meteo As String

'-------------- save retour fichier xml ---------------------------------
retour_meteo=job.GetString
File.WriteString(File.DirDefaultExternal,"meteo.xml",retour_meteo)


End If
job.Release

End Sub



xxxxxxxxxxxxxx is your Forecast API.


Arnaud
 
Upvote 0

Similar Threads

  • Locked
  • Question
Android Question Working with Times
Replies
8
Views
1K
  • Article
Share My Creation 7Weather
Replies
0
Views
1K
D
  • Article
Replies
6
Views
3K
Deleted member 103
D
Top