Panagiotis Triantafyllou

minor fix

......@@ -22,6 +22,8 @@ import androidx.work.WorkManager;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.oned.EAN13Writer;
......@@ -134,7 +136,7 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
if (view.getId() == R.id.ll_shops) {
WarplyAnalyticsManager.logTrackersEvent(this, "click", "SeeShops");
if (WarplyDeviceInfoCollector.isPackageInstalled("com.android.vending", getPackageManager())) {
if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(CouponInfoActivity.this) == ConnectionResult.SUCCESS) {
Intent intent = new Intent(CouponInfoActivity.this, ShopsActivity.class);
intent.putExtra("couponset", (Serializable) mCouponset);
startActivity(intent);
......
......@@ -14,6 +14,9 @@ import android.util.Base64;
import android.view.Display;
import android.view.WindowManager;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
......@@ -56,7 +59,7 @@ public class WarplyDeviceInfoCollector {
JSONObject jObj = new JSONObject();
new Thread(() -> {
if (!Thread.currentThread().isInterrupted()) {
if (isPackageInstalled("com.android.vending", mContext.getPackageManager())) {
if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mContext) == ConnectionResult.SUCCESS) {
//Google Play Services are available
try {
if (WarpUtils.getTrackersEnabled(mContext)) {
......@@ -106,7 +109,7 @@ public class WarplyDeviceInfoCollector {
new Thread(() -> {
if (!Thread.currentThread().isInterrupted()) {
// For GoogleApiAvailability we need to add a meta tag in Manifest
if (isPackageInstalled("com.android.vending", mContext.getPackageManager())) {
if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mContext) == ConnectionResult.SUCCESS) {
//Google Play Services are available
try {
if (WarpUtils.getTrackersEnabled(mContext)) {
......