B4A Library ICOSWorldForecast 3.50

mkvidyashankar

Active Member
Licensed User
Longtime User
error

Hi salvi

In the demo, it throws an outofboundexception array

Error in this line
bb2.Text="LocalObsDateTime : "&a.CCLocalObsDateTime
 

mkvidyashankar

Active Member
Licensed User
Longtime User
Yes , my wi-fi is on
In the previous version it was working with the data of many countries except UK. Now I am getting error in all the countries.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Yes , my wi-fi is on
In the previous version it was working with the data of many countries except UK. Now I am getting error in all the countries.
Hi Vidyashankar, I'm testing it every hour and works fine and just now i test it again and i dont get error.

if some one else get error please report.
 

mkvidyashankar

Active Member
Licensed User
Longtime User
Hi Vidyashankar, I'm testing it every hour and works fine and just now i test it again and i dont get error.

if some one else get error please report.


Here i am attaching the screenshot.
 

Attachments

  • SC20130106-170240.png
    69.1 KB · Views: 155

sdb

Member
Licensed User
Longtime User
First of all, this library is a great help and will definitely shorten development time.

I am having difficulty with the current condition icons in that they do not seem to recognize the time zone correctly. Sometimes I will get a night time icon for day and vice versa. The local time is correct but I can get a day time icon for 4am local time. I can't identify a pattern because half the time they are correct.

Also, is it possible to use another icon set instead of those returned by Iccon? I don't see how to access a code that I can use.

Thanks,
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi sdb, last night I tried it and everything ok. for Time zone i really dont know What happened but i´ll give a loock tonight. for the own icons ood idea i´ll implement the routine to choose own icons.
 

sdb

Member
Licensed User
Longtime User
Here is an example of what I am seeing for Tokyo Japan:

Current time (I am US-Eastern time) - 11:30 AM
CCObservationTime - 4:30 PM (UTC)
CCLocalObsDateTime - 1:30 AM (correct for Tokyo)

The icon displayed is a daytime icon not night. It shows clouds over the sun (not moon).

I used the example in 2.62 for this data and my application shows the same.

Hope this helps.

Would it be possible to include the unique weather code from World Weather Online so other icons could be accessed?

Thanks again.
 

sdb

Member
Licensed User
Longtime User
Well, I think I am starting to see some pattern. Whenever the forecast is 'partly cloudy' or 'overcast', and there may be more, and the local time is at night, then the daytime icon is displayed. It shows clouds covering 3/4 of the sun.

Other night icons are correct.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi sdb, this is not a mistake of the library is the mistake from the provider but anyway im fixing that, thanks for having it reported.
 

sdb

Member
Licensed User
Longtime User
I found two more night conditions to add to the list, 'mist' and 'fog'.

Thanks,
 

mkvidyashankar

Active Member
Licensed User
Longtime User
Hi

I tried 2.62 version and getting same error
while selecting some place

log file is here



** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (forecast2) Create, isFirst = true **
forecast2_weather (java line: 420)
java.lang.StringIndexOutOfBoundsException
at java.lang.String.substring(String.java:1651)
at it.giuseppe.salvi.icos.library.weather.ICOSWorldForecastWrapper.getCCLocalObsDateTime(ICOSWorldForecastWrapper.java:745)
at giuseppe.salvi.icosworldforecast2.forecast2._weather(forecast2.java:420)
at giuseppe.salvi.icosworldforecast2.forecast2._activity_create(forecast2.java:300)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
at giuseppe.salvi.icosworldforecast2.forecast2.afterFirstLayout(forecast2.java:89)
at giuseppe.salvi.icosworldforecast2.forecast2.access$100(forecast2.java:16)
at giuseppe.salvi.icosworldforecast2.forecast2$WaitForLayout.run(forecast2.java:74)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
java.lang.StringIndexOutOfBoundsException
** Activity (forecast2) Pause, UserClosed = false **
** Activity (forecast2) Create, isFirst = false **
forecast2_weather (java line: 420)
java.lang.StringIndexOutOfBoundsException
at java.lang.String.substring(String.java:1651)
at it.giuseppe.salvi.icos.library.weather.ICOSWorldForecastWrapper.getCCLocalObsDateTime(ICOSWorldForecastWrapper.java:745)
at giuseppe.salvi.icosworldforecast2.forecast2._weather(forecast2.java:420)
at giuseppe.salvi.icosworldforecast2.forecast2._activity_create(forecast2.java:300)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
at giuseppe.salvi.icosworldforecast2.forecast2.afterFirstLayout(forecast2.java:89)
at giuseppe.salvi.icosworldforecast2.forecast2.access$100(forecast2.java:16)
at giuseppe.salvi.icosworldforecast2.forecast2$WaitForLayout.run(forecast2.java:74)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
java.lang.StringIndexOutOfBoundsException
 

lonleystar

Well-Known Member
Licensed User
Longtime User
I found two more night conditions to add to the list, 'mist' and 'fog'.

Thanks,

Hi sdb, I changed these icons, instead of the other.

Don't forget to rename the library from .zip to .rar
 

Attachments

  • black_low_cloud.png
    12 KB · Views: 138
  • fog.png
    19.3 KB · Views: 127
  • mist.png
    19.3 KB · Views: 133

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi Vidyashankar, for this error i really don´t understand until now i´ve got no error.

Try to find the location u´ve got the error By ( Get Weather By GetList ).

Please let me know about.
 

mkvidyashankar

Active Member
Licensed User
Longtime User
hi selvi thanks for reply

I tried
London
Mysore
Bengaluru

in the listview.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
hi selvi thanks for reply

I tried
London
Mysore
Bengaluru

in the listview.
Hi Vidyashankar, Which London u mean of england ? if yes there isn't any error,

Mysore and Bengaluru they are in india? if yes there isn't any error. If not please send the map addresses to me so i can check. Wait for your notice.
 

mkvidyashankar

Active Member
Licensed User
Longtime User
Hi Salvi

Problem solved
there was a problem in api key and listview

Thanks for the support
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…