-
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 #7 from islem19/feature-add-google-ads
Feature add google ads
- Loading branch information
Showing
40 changed files
with
361 additions
and
307 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
101 changes: 0 additions & 101 deletions
101
app/src/main/java/com/covid19/app/ui/home/MainActivity.java
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
app/src/main/java/com/covid19/app/ui/splash/SplashViewModel.java
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
app/src/main/java/com/covid19/app/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 com.covid19.app; | ||
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
...p/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
2 changes: 1 addition & 1 deletion
2
...id19/app/data/network/model/Location.java → ...irus/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
6 changes: 3 additions & 3 deletions
6
...19/app/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
...pp/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
4 changes: 2 additions & 2 deletions
4
...etwork/services/location/LocationApi.java → ...etwork/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
4 changes: 1 addition & 3 deletions
4
...rk/services/location/LocationService.java → ...rk/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
2 changes: 1 addition & 1 deletion
2
...com/covid19/app/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 com.covid19.app.ui.base; | ||
package com.covidvirus.app.ui.base; | ||
|
||
import android.os.Bundle; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...com/covid19/app/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
...om/covid19/app/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 com.covid19.app.ui.base; | ||
package com.covidvirus.app.ui.base; | ||
|
||
import androidx.lifecycle.ViewModel; | ||
|
||
|
Oops, something went wrong.