-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from islem19/develop
Develop
- Loading branch information
Showing
97 changed files
with
2,572 additions
and
641 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Covid-19 Android App | ||
|
||
|
||
تطبيق محمول يوفر إحصائيات وبيانات محدثة حول فيروس كورونا المنتشر حول العالم. | ||
|
||
بفضل التقارير والبيانات المقدمة من worldmeters.info/coronavirus و NovalCOVID API ، يبسط التطبيق ويوفر بيانات حول انتشار فيروس كورونا في المنطقة المحلية للمستخدمين ، تقارير مثل: عدد الحالات النشطة ، حالات يومية جديدة مؤكدة ,الوفيات الجديدة وعدد الحالات الذين تعافوا . | ||
|
||
يوضح تطبيق الهاتف المحمول أيضًا ، إجمالي الحالات في العالم ، وتقريرًا مفصلاً حول كل بلد - يتم فرزه حسب عدد الحالات المؤكدة. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Covid-19 Android App | ||
|
||
Covid-19 est une application mobile qui fournit des mises à jour des statistiques et des données sur la propagation du virus corona sur le monde. | ||
|
||
Grâce aux rapports et données fournis par worldmeters.info/coronavirus et NovalCOVID API, l'application simplifie et fournit des données sur la propagation du virus corona dans la région locale des utilisateurs, des rapports tels que: combien de cas actifs, nouveaux cas confirmés, nouveaux décès et combien ont récupéré. | ||
L'application mobile affiche également le nombre total de cas dans le monde et un rapport détaillé sur chaque pays -trié par le nombre de cas confirmés. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Covid-19 Android App | ||
|
||
Covid-19 is a mobile application that provides updated stats and data about the spreaded corona virus around the world. | ||
|
||
Thanks to the reports and data provided by worldmeters.info/coronavirus and NovalCOVID API, the application simplifies and provide data about the spreading of the corona virus in the local region of the users, reports such as : how many active cases, new daily confirmed cases, new deaths and how many recovered one. | ||
The mobile application shows also, the total cases in the globe, and a detailed report about every country -sorted by the number of confirmed cases. | ||
|
||
## Download The App from here [first release](https://github.com/islem19/CoronaCovid19/releases/download/v1.0.1/covid19.apk) | ||
|
||
## Screenshots | ||
|
||
[<img src="screenshots/screenshot1.png" align="left" | ||
width="250" | ||
hspace="10" vspace="10">](screenshots/screenshot1.png) | ||
[<img src="screenshots/screenshot2.png" align="center" | ||
width="250" | ||
hspace="10" vspace="10">](screenshots/screenshot2.png) | ||
[<img src="screenshots/screenshot3.png" align="center" | ||
width="250" | ||
hspace="10" vspace="10">](screenshots/screenshot3.png) | ||
[<img src="screenshots/screenshot4.png" align="center" | ||
width="250" | ||
hspace="10" vspace="10">](screenshots/screenshot4.png) | ||
|
||
|
||
## Setup | ||
Clone this repository and import into **Android Studio** | ||
```bash | ||
git clone https://github.com/islem19/CoronaCovid19.git | ||
``` | ||
|
||
## Permissions | ||
The App requires the following permissions: | ||
- Internet access. | ||
|
||
## Libraries and Dependencies | ||
- [Retrofit](https://square.github.io/retrofit/) | ||
- [CardView]() | ||
- [Gson](https://github.com/google/gson) | ||
- [Butterknife](https://jakewharton.github.io/butterknife/) | ||
- [RecyclerView](https://developer.android.com/jetpack/androidx/releases/recyclerview) | ||
- [Material Design](https://material.io/develop/android/components/) | ||
|
||
|
||
## Maintainers | ||
This project is mantained by: | ||
* [Abdelkader SELLAMI](https://github.com/islem19) | ||
* [Billel BOUMESSAIDIA](https://github.com/BillelBmsd) | ||
|
||
|
||
## Contributing | ||
|
||
1. Fork it | ||
2. Create your feature branch (git checkout -b my-new-feature) | ||
3. Commit your changes (git commit -m 'Add some feature') | ||
4. Push your branch (git push origin my-new-feature) | ||
5. Create a new Pull Request | ||
|
||
|
||
## License | ||
This application is released under GNU GPLv3 (see [LICENSE]()). Some of the used libraries are released under different licenses. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion
2
app/src/main/java/dz/islem/covid19/App.java → ...src/main/java/com/covidvirus/app/App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package dz.islem.covid19; | ||
package com.covidvirus.app; | ||
|
||
import android.app.Application; | ||
|
||
|
59 changes: 59 additions & 0 deletions
59
app/src/main/java/com/covidvirus/app/data/DataManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package com.covidvirus.app.data; | ||
|
||
import android.content.SharedPreferences; | ||
|
||
import com.covidvirus.app.App; | ||
import com.covidvirus.app.data.network.services.DataService; | ||
import com.covidvirus.app.data.network.services.location.LocationService; | ||
|
||
import static android.content.Context.MODE_PRIVATE; | ||
|
||
public class DataManager { | ||
|
||
private static DataManager mInstance; | ||
private SharedPreferences sharedPreferences; | ||
public static final String MY_PREFS_NAME = "covid_pref"; | ||
public static final String COUNTRY_KEY = "county"; | ||
public static final String RUN_COUNT_KEY = "run_count"; | ||
public static final int MAX_COUNT = 5; | ||
|
||
private DataManager(){ | ||
sharedPreferences = App.getInstance().getSharedPreferences(MY_PREFS_NAME,MODE_PRIVATE); | ||
} | ||
|
||
public static synchronized DataManager getInstance(){ | ||
return mInstance == null ? new DataManager() : mInstance; | ||
} | ||
|
||
public void setDefaultCountry(String country){ | ||
sharedPreferences.edit() | ||
.putString(COUNTRY_KEY, country) | ||
.apply(); | ||
} | ||
|
||
public String getDefaultCountry(){ | ||
return sharedPreferences.getString(COUNTRY_KEY, null); | ||
} | ||
|
||
public void setRunCount(){ | ||
int count = getRunCount(); | ||
if (count == MAX_COUNT || count > MAX_COUNT) count = 0; | ||
else count++; | ||
sharedPreferences.edit() | ||
.putInt(RUN_COUNT_KEY, count) | ||
.apply(); | ||
} | ||
|
||
public int getRunCount(){ | ||
return sharedPreferences.getInt(RUN_COUNT_KEY, 0); | ||
} | ||
|
||
public DataService getDataService(){ | ||
return DataService.getInstance(); | ||
} | ||
|
||
public LocationService getLocationService(){ | ||
return LocationService.getInstance(); | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
.../data/network/model/CountryDataModel.java → .../data/network/model/CountryDataModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...9/data/network/model/GlobalDataModel.java → ...p/data/network/model/GlobalDataModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
app/src/main/java/com/covidvirus/app/data/network/model/Location.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.covidvirus.app.data.network.model; | ||
|
||
import com.google.gson.annotations.Expose; | ||
import com.google.gson.annotations.SerializedName; | ||
|
||
import java.io.Serializable; | ||
|
||
public class Location implements Serializable { | ||
@Expose | ||
@SerializedName("country") | ||
private String country; | ||
|
||
public Location(String country) { | ||
this.country = country; | ||
} | ||
|
||
public String getCountry() { | ||
return country; | ||
} | ||
|
||
public void setCountry(String country) { | ||
this.country = country; | ||
} | ||
} |
7 changes: 4 additions & 3 deletions
7
...ovid19/data/network/services/DataApi.java → ...us/app/data/network/services/DataApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...19/data/network/services/DataService.java → ...pp/data/network/services/DataService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
app/src/main/java/com/covidvirus/app/data/network/services/location/LocationApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.covidvirus.app.data.network.services.location; | ||
|
||
import com.covidvirus.app.data.network.model.Location; | ||
import retrofit2.Call; | ||
import retrofit2.http.GET; | ||
|
||
public interface LocationApi { | ||
|
||
@GET("/json") | ||
Call<Location> getLocationData(); | ||
|
||
|
||
} |
27 changes: 27 additions & 0 deletions
27
app/src/main/java/com/covidvirus/app/data/network/services/location/LocationService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.covidvirus.app.data.network.services.location; | ||
|
||
import retrofit2.Retrofit; | ||
import retrofit2.converter.gson.GsonConverterFactory; | ||
|
||
public class LocationService { | ||
private static final String BASE_URL = "http://ip-api.com"; | ||
private LocationApi mLocationApi; | ||
|
||
private static LocationService mInstance; | ||
|
||
public static LocationService getInstance(){ | ||
return mInstance == null ? new LocationService() : mInstance; | ||
} | ||
|
||
private LocationService(){ | ||
Retrofit mRetrofit = new Retrofit.Builder() | ||
.addConverterFactory(GsonConverterFactory.create()) | ||
.baseUrl(BASE_URL) | ||
.build(); | ||
mLocationApi = mRetrofit.create(LocationApi.class); | ||
} | ||
|
||
public LocationApi getLocationApi(){ | ||
return mLocationApi; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...z/islem/covid19/ui/base/BaseActivity.java → .../covidvirus/app/ui/base/BaseActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package dz.islem.covid19.ui.base; | ||
package com.covidvirus.app.ui.base; | ||
|
||
import android.os.Bundle; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...z/islem/covid19/ui/base/BaseFragment.java → .../covidvirus/app/ui/base/BaseFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../islem/covid19/ui/base/BaseViewModel.java → ...covidvirus/app/ui/base/BaseViewModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package dz.islem.covid19.ui.base; | ||
package com.covidvirus.app.ui.base; | ||
|
||
import androidx.lifecycle.ViewModel; | ||
|
||
|
Oops, something went wrong.