项目作者: DevDHera

项目描述 :
Building an Android News App with the help of newsapi
高级语言: Java
项目地址: git://github.com/DevDHera/Guide-to-Andriod-Apps.git
创建时间: 2019-02-16T03:26:27Z
项目社区:https://github.com/DevDHera/Guide-to-Andriod-Apps

开源协议:MIT License

下载


Guide to Android Apps :sunglasses:

This project aims to cover the basics of Android Apps by creating your very own News Portal.

What we will use :astonished:

Following is our tech stack.

  • Java (:unamused: Sorry, No Kotlin)
  • Retrofit
  • Glide
  • GSON
  • Prettytime

We will use NewsApi as news feeder.

Look at the Codebase

  1. public static Retrofit getApiClient() {
  2. if (retrofit == null) {
  3. retrofit = new Retrofit.Builder()
  4. .baseUrl(BASE_URL)
  5. .client(getUnsafeOkHttpClient().build())
  6. .addConverterFactory(GsonConverterFactory.create())
  7. .build();
  8. }
  9. return retrofit;
  10. }

Steps to Run

Simply clone the project using the following command.

  1. git clone https://github.com/DevDHera/Guide-to-Andriod-Apps.git

Or you can checkout from the VCS using the Android Studio.

After that make sure to add your own API Key(obtained from newsapi.org) to the following line in .MainActivity.java.

  1. public static final String API_KEY = "API_KEY";

That’s it. Now enjoy your own news portal :ok_hand:

Now what :question:

Find bugs :beetle: and create issues :blush:.