Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_android_sdk_maven_plugin
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Panagiotis Triantafyllou
2023-03-16 14:04:07 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ac336c17c73c8f76762cfd7bee85785667d0e47e
ac336c17
1 parent
e4da0e40
minor fix
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponInfoActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyDeviceInfoCollector.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponInfoActivity.java
View file @
ac336c1
...
...
@@ -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
);
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyDeviceInfoCollector.java
View file @
ac336c1
...
...
@@ -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
))
{
...
...
Please
register
or
login
to post a comment