This commit is contained in:
Kartikey Kushwaha 2018-08-17 01:11:51 +05:30
parent e7abeb5ad9
commit 04e974b326
2 changed files with 5 additions and 3 deletions

View file

@ -210,8 +210,7 @@ public class App extends Application {
mNotificationManager.createNotificationChannel(mChannel); mNotificationManager.createNotificationChannel(mChannel);
// Set up notification channel for app update only if it's a github apk. // Set up notification channel for app update only if it's a github apk.
if (BuildConfig.FLAVOR.equals(getString(R.string.app_flavor_github))) {
if (!BuildConfig.FLAVOR.equals(getString(R.string.app_flavor_github))) {
final String appUpdateId final String appUpdateId
= getString(R.string.app_update_notification_channel_id); = getString(R.string.app_update_notification_channel_id);

View file

@ -7,6 +7,7 @@ import android.net.Uri;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.support.v4.app.NotificationCompat; import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat; import android.support.v4.app.NotificationManagerCompat;
import android.util.Log;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
@ -34,7 +35,7 @@ public class CheckForNewAppVersionTask extends AsyncTask<Void, Void, String> {
protected void onPreExecute() { protected void onPreExecute() {
// Continue with version check only if the build variant is of type "github". // Continue with version check only if the build variant is of type "github".
if (!BuildConfig.FLAVOR.equals(app.getString(R.string.app_flavor_github))) { if (!BuildConfig.FLAVOR.equals(app.getString(R.string.app_flavor_github))) {
this.cancel(true); // this.cancel(true);
} }
} }
@ -102,6 +103,8 @@ public class CheckForNewAppVersionTask extends AsyncTask<Void, Void, String> {
@Override @Override
protected void onPostExecute(String response) { protected void onPostExecute(String response) {
Log.i("Response--", response);
// Parse the json from the response. // Parse the json from the response.
if (response != null) { if (response != null) {