Skip to content

Latest commit

 

History

History
67 lines (33 loc) · 1.98 KB

README.md

File metadata and controls

67 lines (33 loc) · 1.98 KB

Android News API

  • Android application that uses the News API to display current news

  • The application displays news from Business Insider

webp net-gifmaker 4

Permissions

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Dependency

implementation 'com.squareup.picasso:picasso:2.71828'

app/java/MainActivity

String API_KEY = "API Key"; //your API key from News API
String SELECTED_NEWS = "business-insider"; //you can choose from various news outlets available from News API4

How to sign up for a free non-commerical use of the News API

Go to the NewApi website and click on Get API key

screen shot 2018-05-31 at 10 50 17 am

Here you will register for an account

screen shot 2018-05-31 at 10 50 30 am

You will need to add a attribution link, which is required for free non-commercial use

screen shot 2018-05-31 at 10 51 35 am

References

AndrosStock Tutorial

WebView

AsyncTask

JSONObject

JSONArray

HttpURLConnection