Search code examples
javaandroidjsonparsingfeed

Rely my android app to json file in the web


Here is the thing, i want to retrieve some news into my android application which i could find in a json file.
I was thinking about creating some blog(wordpress maybe) and by adding articles, it automatically add it into the json file.
In this way, after relying my app to the json file, all i need to do is adding articles in the blog.


Solution

    1. After app started load JSON from server.
    2. Parse it to app content.
    3. Add posibility for manual refresh with SwipeRefreshLayout. https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html
    4. If you need your app update JSON automatically, after new post added to blog your should use Google Cloud Messaging. https://developers.google.com/cloud-messaging/?hl=ru