Android Weather Forecast - Google Weather API - FULL SOURCE

Tutorials with advanced 'difficulty' and more Lines of Code.

Postby ohyes » Fri Jul 10, 2009 10:51 am

Dear All,

I use the source from:
android_weather_forecast_-_google_weather_api_-_description-t337-s30.html
given by Shalni (wherein LinearLayout(Context, AttributeSet, Map) is used instead)
==> Compile OK
However, Image appears!!!

As I am a new comer :) please post the fixed code if possible.

Thank you in advance,

-
ohyes
ohyes
Junior Developer
Junior Developer
 
Posts: 10
Joined: Fri Jul 10, 2009 2:51 am

Top

THANKS

Postby sommeralex » Tue Aug 25, 2009 12:30 pm

thanks for your weather api - i need it in my app, saved a lot of time! ;-)


plusminus wrote:Hello venkat,

perhaps copy paste the link instead of clicking it:

images/tut/weatherforecast/weatherforecast_fullsource_by_anddev_org.zip

Regards,
plusminus
sommeralex
Experienced Developer
Experienced Developer
 
Posts: 95
Joined: Sun Jan 20, 2008 3:12 am
Location: Vienna

Please, modify your code. then It's OK.

Postby hungle » Wed Feb 17, 2010 11:40 am

ERROR:
The constructor LinearLayout(Context, AttributeSet, Map) is undefined
Remove arg to match...

=>
...
public SingleWeatherInfoView(Context context, AttributeSet attrs){
super(context, attrs);
...
hungle
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Feb 17, 2010 11:36 am

Great Help...!!! Thanks

Postby pria » Wed Mar 10, 2010 10:38 am

Thanks for the tutorial....it is very helpful!!!
pria
Junior Developer
Junior Developer
 
Posts: 14
Joined: Tue Mar 02, 2010 1:37 pm
Location: Pune

Postby MorbidDestiny » Wed May 05, 2010 11:17 am

I have an error on WeatherForecast.java

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.        
  2.  
  3.                                 updateWeatherInfoView(R.id.weather_1,ws.getWeatherForecastConditions.get(0));
  4.  
  5.                                 updateWeatherInfoView(R.id.weather_2,ws.getWeatherForecastConditions.get(1));
  6.  
  7.                                 updateWeatherInfoView(R.id.weather_3,ws.getWeatherForecastConditions.get(2));
  8.  
  9.                                 updateWeatherInfoView(R.id.weather_4,ws.getWeatherForecastConditions.get(3));
  10.  
  11.                                
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


It appears that ws.getWeatherForecastConditions cannot be resolved or is not a field.

Help please.
MorbidDestiny
Junior Developer
Junior Developer
 
Posts: 16
Joined: Fri Mar 26, 2010 4:56 pm

I can't run this source code

Postby fastian » Wed May 05, 2010 1:18 pm

I downloaded the source code... when i import it in to ecllipse it shows andoroid.jar library is missing. Secondly it shows the icon of Java poject. While the other projects of mine are running fine and environment building is perfect for android.

Your reply will be great for me.

Thank you in advance,[/quote]
fastian
Once Poster
Once Poster
 
Posts: 1
Joined: Wed May 05, 2010 1:12 pm

Top

Re: Android Weather Forecast - Google Weather API - FULL SOU

Postby lsems7370@aol.com » Wed May 19, 2010 7:34 pm

OK guys and gals:
I have been working on parsing the google weather xml. It has taken awhile but I finally get the information that I want. I calculate the Heat Index and can get the resulting 'string'. My problem is I cant get the information from the ParsedExampleDataSet.java to my ParsingXML.java except through the this.setContentView(tv);. What I want is to be able to set my resulting 'string' to a variable and then use setText in a TextView field. In the example there appears to be no TextView field and the 'string' appears in the GUI. This confuses me to no end. I have added two fields to my main.xml file namely (dispTemp) and (dispHumidity) from the ParsingXML.java file. I want to be able to show my results in these fields so that I can control the location, text size, font, etc., from the ParsingXML.java file. Any suggestions would be greatly appreciated. If it make any difference, I'll be using this procedure to display the Heat Index as part of a medical program.

ken

SOLVED:
I needed to place the setText statements inside the Try and then remove the setContentView at the last part of the file. It works now as I desire.
lsems7370@aol.com
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Dec 21, 2009 5:07 pm

Re: Android Weather Forecast - Google Weather API - FULL SOU

Postby Sivan » Mon Jul 12, 2010 7:39 am

Hi plusminus :D

Iam new to this community and android.... :)

If I Download your zip , how can I run it in eclipse and the Emulator???
If I open the main.xml and run it its asking whether to run it in ANT build ????
If I give Ant Build and run it its not running in the emulator .....

so can u tell me how to run it in the emulator ... ..


Help will be appreciated :)

Thanks ... :)
--
Sivan
Sivan
Junior Developer
Junior Developer
 
Posts: 14
Joined: Mon Jul 05, 2010 10:02 am
Location: Bangalore , India

Re: Android Weather Forecast - Google Weather API - FULL SOU

Postby Kitos » Mon Jul 19, 2010 12:51 pm

My first post here guys and I some need help ^^
This forum has been pretty damn useful for me, but I can't seem to handle this tutorial.
Ive imported the source, added the correct android.jar (1.5), deleted the 3rd constructor argument...until no errors were left. But when I want to create a run config to run the emulator I get this error:

Code: Select all
[2010-07-19 13:34:26 - WeatherForecast]
trouble processing "java/lang/Object.class":
[2010-07-19 13:34:26 - WeatherForecast]
Attempt to include a core VM class in something other than a core library.
It is likely that you have attempted to include the core library from a desktop
virtual machine into an application, which will most assuredly not work. If
you really intend to build a core library -- which is only appropriate as
part of creating a full virtual machine binary, as opposed to compiling an
application -- then use the "--core-library" option to suppress this error
message. If you go ahead and use "--core-library" but are in fact building
an application, then please be aware that your build will still fail at some
point; you will simply be denied the pleasure of reading this helpful error
message.
[2010-07-19 13:34:26 - WeatherForecast] 1 error; aborting
[2010-07-19 13:34:26 - WeatherForecast] Conversion to Dalvik format failed with error 1


Anyone knows what I'm doing wrong?

*EDIT: Nevermind, I made a fresh project and copied the code inside of the base java-file into my own. The rest of the files I copied directly from the source(.rar file). Also made the packages myself. And now it finally runs inside an emulator!
Kitos
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Jul 13, 2010 8:14 pm
Location: Amsterdam/Haarlem. Netherlands

Re: Android Weather Forecast - Google Weather API - FULL SOU

Postby vivek_goel » Thu Jul 29, 2010 2:08 pm

hi plus minus.

i m getting the same error

The post sounds great :)
But I can't run the application downloaded :(
The matter is that [super(context, attrs, inflateParams);] in the SingleWeatherInfoView show the following ERROR:
The constructor LinearLayout(Context, AttributeSet, Map) is undefined
Remove arg to match...
Could U please tell me how to fix it and enjoy the app (*.java & *.xml keep unchanged)

Thank you in advance,
vivek_goel
Freshman
Freshman
 
Posts: 3
Joined: Wed Jul 14, 2010 10:52 am

Re: Android Weather Forecast - Google Weather API - FULL SOU

Postby august321 » Thu Sep 09, 2010 10:22 am

Thank you very much
august321
Freshman
Freshman
 
Posts: 2
Joined: Tue Aug 17, 2010 4:04 pm

Re: Android Weather Forecast - Google Weather API - FULL SOU

Postby vani.v » Mon Oct 25, 2010 8:47 am

Hi,After running dis weather forecast prog, why is it coming force close?
I am not able to debug.
vani.v
Freshman
Freshman
 
Posts: 7
Joined: Fri Jul 30, 2010 11:59 am

Re: Android Weather Forecast - Google Weather API - FULL SOU

Postby skumarke » Wed Oct 27, 2010 9:58 am

Hello all.
Can any one send me full source code of WeatherForecat on my id santosh.keshari@wipro.com
skumarke
Freshman
Freshman
 
Posts: 2
Joined: Wed Jul 21, 2010 10:02 am

Re: Android Weather Forecast - Google Weather API - FULL SOU

Postby saigonthedon » Wed Mar 02, 2011 10:40 am

Hi,
I got your project running in eclipe (and in NetBeans) but weatherforecast.apk cannot be installed on my virtual android, cmd says manifest is invalid, why? How sholud I change that? Please help!
Thanks in advance!
saigonthedon
Freshman
Freshman
 
Posts: 2
Joined: Wed Mar 02, 2011 10:37 am

Re: Android Weather Forecast - Google Weather API - FULL SOU

Postby saigonthedon » Wed Mar 02, 2011 2:35 pm

It is a problem with obsolete m5-rc14 SDK, how can I make it work on newest version of android sdk? Cna you please help? :shock:
saigonthedon wrote:Hi,
I got your project running in eclipe (and in NetBeans) but weatherforecast.apk cannot be installed on my virtual android, cmd says manifest is invalid, why? How sholud I change that? Please help!
Thanks in advance!
saigonthedon
Freshman
Freshman
 
Posts: 2
Joined: Wed Mar 02, 2011 10:37 am

Top
PreviousNext

Return to Advanced Tutorials

Who is online

Users browsing this forum: No registered users and 4 guests