2018-01-04 18:25:06

Hello guys and girls, I come to you today with a problem.
I am in the process of developing, or trying to develop a weather app.
This isn't just any weather app however, this app has the capability to track thunderstorms in real time and in text format.
Sounds to good to be true? Well it isn't.
The South African weather service provides an API to track latest storm developments.
Sadly this app will only work exclusively in South Africa.

My reason for building this particular app?
It's simple, I want users to be prepared for any storm that might hit at there location.
Now here's the problem, the API returns a JSON file witch is fine, how ever I want to extract the latitude and longitude fields and combine them with the current location of the user that will be using the app, so that the app can tell them how far away storms are.
Is there any way in witch I can do this?
The platform I am trying to code for is android, since I don't have a Mack to code in SWIFT.

Anyhow, here is a little extract from the JSON file.

      {
        "properties": {
          "age": 2160,
          "cellTop": 8.5,
          "dbz": 50,
          "direction": 8.77707,
          "latitude": -28.5958,
          "longitude": 25.0536,
          "majorAxis": 11.0546,
          "minorAxis": 2.77942,
          "orientation": 175.296,
          "speed": 21.8885,
          "timestamp": "2018-01-04T16:12:00Z",
          "instance": 0,
          "distance": 0
        },

Note: Major and Minor axis's refer to the length and width of a storm in Kilometers(KM), as well as the speed, direction is in degrees, storm cell top is in Kilometers also and age is in seconds since last radar scan.

Any help would be appreciated.

2018-01-04 21:20:31

I've done the same but with Open Weather API. I'm developing for Android, so I was using Gson library to extract weather data from Json. With Gson, at least you don't need to write code for parsing Json data manually.

2018-01-06 11:17:51

what do you use to code for android

best regards
never give up on what ever you are doing.

2018-01-06 13:16:13

I am thinking about using the android SDK, but I don't know if it's accessible

2018-01-06 13:31:57

Hi, you can enable the java access bridge by going to the directory where it is located, i can not remember where it is located, then use the comandline and type jabswitch/enable or some thing like that.
But the sdk is not that accessible to me as i hoped it should be, or maby i am not using it right.

best regards
never give up on what ever you are doing.

2018-01-06 17:35:51

Thanks for the tip, I will try that and see if it works for me.

2018-01-06 23:49:43

It's accessible. If it isn't, I wouldn't be successful at my workplace. I'm using Android Studio 3.0 with NVDA. You can also use command line, but this will be much harder, because if you get stuck you will have to find solution on your own. That's for a simple reason, many people just use an IDE, and there are not much tutorials for doing things via command line, at least in case of Android.