Skip to content

Information about corona-virus outbreak can be found through this library

Notifications You must be signed in to change notification settings

fsfaysalcse/AndroidCoronaApiLib

Repository files navigation

COVID-19 CORONAVIRUS OUTBREAK

Using this library you will find the following information about coronavirus-

  • Coronavirus Cases
  • Deaths
  • Recovered

Installation

To get a Git project into your build:

Step 1. Add the JitPack repository to your build file

allprojects {
	repositories {
			maven { url 'https://jitpack.io' }
		}
	}

Step 2. Add the dependency

dependencies {
	        implementation 'com.github.fsfaysalcse:AndroidCoronaApiLib:0.1.1'
	}

Usage

Corona.setTotalOutbreakListener(MainActivity.this,new TotalOutbreakListener() {
                @Override
                   public void success(Response response) {
                    Log.d(TAG, "success: "+response.getMessage());
                     if (response.isSuccess()){
                             List<ReportByCountry> list=response.getReportByCountry();
                             Log.d(TAG, "Coronavirus Cases : "+response.getOutbreak().getTotalCases());
                             Log.d(TAG,    "Deaths : "+response.getOutbreak().getTotalDeaths());
                             Log.d(TAG, "Recovered : "+response.getOutbreak().getTotalRecovered());
                             Log.d(TAG, "Report List by Country : "+list.get(0).toString());
                            dialog.dismiss();
                    }

                 @Override
                   public void failed(String errorMessage) {
                     Log.d(TAG, "failed: "+errorMessage);
                     dialog.dismiss();
              }
        });

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update the tests as appropriate.

About

Information about corona-virus outbreak can be found through this library

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages