Share My Creation [Free] Weather App

Building a Weather App




One of my recent projects required me to build a weather app that would work with an API of my choice. This was my first introduction to working with a weather API, so I knew there was going to be a steep learning curve, but I was excited about the chance to finally get some practical application of B4A and build a working product.

After doing a little research and seeing some comments from other programmers, I decided to use the OpenWeatherMap API. Setting up an account was as easy as it could be and their free accounts allow up to 7,200 calls per day and limit calls per minute to 60. This obviously wouldn't be ideal for a high-traffic product.


Contact: abdullcadre@gmail.com
Free Source code: LINK
 

Attachments

  • pack1.jpg
    510.9 KB · Views: 2,377
  • esse.png
    131.3 KB · Views: 741
  • Screenshot_20211028-102211.png
    75 KB · Views: 740
  • Screenshot_20211028-104416.png
    87.7 KB · Views: 760
Last edited:
Thanks for sharing the source. Following error in log for missing library. Where I can download? Thanks.

[IDE message - 3:03:06]
The following libraries are missing:
slidingmenuwrapper
 

asales

Expert
Licensed User
Longtime User
Thanks for sharing the source. Following error in log for missing library. Where I can download? Thanks.

[IDE message - 3:03:06]
The following libraries are missing:
slidingmenuwrapper

See the first line!
 
Thanks for Library. Copy the library files in Extra library folder. I just opened source in B4A 11.50.
Compiled in release mode and Android 10 with B4A Bridge.
App installs but when open it crashes. Changed the mode to Debug and other but no success.
Is it some issue of slidingmenuwrapper library or something else... please help. I want to learn to make beautiful app. Thanks.
 

aeric

Expert
Licensed User
Longtime User
What error you get?
I try to run in debug without problem.
 
Logger connected to: TECNO MOBILE LIMITED TECNO CH6h
--------- beginning of main
--------- beginning of system
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Copying updated assets files (284)
*** Service (starter) Create ***
** Service (starter) Start **
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/view/ViewConfigurationCompat;
at com.jeremyfeinstein.slidingmenu.lib.CustomViewAbove.initCustomViewAbove(CustomViewAbove.java:167)
at com.jeremyfeinstein.slidingmenu.lib.CustomViewAbove.<init>(CustomViewAbove.java:157)
at com.jeremyfeinstein.slidingmenu.lib.CustomViewAbove.<init>(CustomViewAbove.java:152)
at com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.<init>(SlidingMenu.java:209)
at com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.<init>(SlidingMenu.java:192)
at com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.<init>(SlidingMenu.java:181)
at anywheresoftware.b4a.objects.SlidingMenuWrapper.Initialize(SlidingMenuWrapper.java:25)
at wit.abdul.cadre.main._activity_create(main.java:436)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at anywheresoftware.b4a.shell.Shell$1.run(Shell.java:273)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:268)
at android.app.ActivityThread.main(ActivityThread.java:8107)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:627)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)
Caused by: java.lang.ClassNotFoundException: android.support.v4.view.ViewConfigurationCompat
... 20 more
--------- beginning of crash
java.lang.RuntimeException: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/view/ViewConfigurationCompat;
at anywheresoftware.b4a.shell.Shell$1.run(Shell.java:276)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:268)
at android.app.ActivityThread.main(ActivityThread.java:8107)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:627)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/view/ViewConfigurationCompat;
at com.jeremyfeinstein.slidingmenu.lib.CustomViewAbove.initCustomViewAbove(CustomViewAbove.java:167)
at com.jeremyfeinstein.slidingmenu.lib.CustomViewAbove.<init>(CustomViewAbove.java:157)
at com.jeremyfeinstein.slidingmenu.lib.CustomViewAbove.<init>(CustomViewAbove.java:152)
at com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.<init>(SlidingMenu.java:209)
at com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.<init>(SlidingMenu.java:192)
at com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.<init>(SlidingMenu.java:181)
at anywheresoftware.b4a.objects.SlidingMenuWrapper.Initialize(SlidingMenuWrapper.java:25)
at wit.abdul.cadre.main._activity_create(main.java:436)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at anywheresoftware.b4a.shell.Shell$1.run(Shell.java:273)
... 7 more
Caused by: java.lang.ClassNotFoundException: android.support.v4.view.ViewConfigurationCompat
... 20 more
 
Do you have AppCompat 4.00?
Yes I selected AppCompat 4.00 Library but it issue a warning in logs... "Library 'AppCompat' is not used. (warning #32)"

But after selecting I again test in Debug mode and the same situation as before... It took long time to load but just after partial first screen of App, it crashes.

 

aeric

Expert
Licensed User
Longtime User
Forget about AppCompat library.
I was testing on my emulator and it works without issue.
Then I tried compile to physical phone but it doesn’t work. I suspect the project file is corrupted so I recreated using a new project. After one or two attempts successful compilation the logger started to not work. I don’t know what is the problem. Is it my phone, B4A, network firewall? Now I stop playing with this example.

By the way, back to your question. I tried to replace the slidingmenu with B4XDrawer. You may try the same if that library gives you error.
 
Thanks so much for humble efforts. I also tried on Android 6 and 10 but same result.
You are right that it looks corrupted. Maybe B4XDrawer work or not, or Erel can dig in... Thanks.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…