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
2024-04-03 10:55:47 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0df4a070d39f741c7f08fa08d6db1f935b470855
0df4a070
1 parent
8d70b57c
minor fixes
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
1 deletions
warply_android_sdk/build.gradle
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ActiveCouponsActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponInfoActivity.java
warply_android_sdk/build.gradle
View file @
0df4a07
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.5.4r1
7
'
PUBLISH_VERSION
=
'4.5.5.4r1
8
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ActiveCouponsActivity.java
View file @
0df4a07
...
...
@@ -4,6 +4,8 @@ import android.app.Activity;
import
android.content.Context
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Looper
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
...
...
@@ -11,6 +13,9 @@ import android.widget.TextView;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
java.io.Serializable
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
...
...
@@ -23,6 +28,7 @@ import ly.warp.sdk.io.models.Coupon;
import
ly.warp.sdk.io.models.CouponList
;
import
ly.warp.sdk.utils.WarplyManagerHelper
;
import
ly.warp.sdk.utils.managers.WarplyAnalyticsManager
;
import
ly.warp.sdk.utils.managers.WarplyEventBusManager
;
import
ly.warp.sdk.views.adapters.ActiveCouponAdapter
;
...
...
@@ -60,6 +66,27 @@ public class ActiveCouponsActivity extends Activity implements View.OnClickListe
}
@Override
public
void
onStart
()
{
super
.
onStart
();
if
(!
EventBus
.
getDefault
().
isRegistered
(
this
))
EventBus
.
getDefault
().
register
(
this
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
EventBus
.
getDefault
().
unregister
(
this
);
}
@Subscribe
()
public
void
onMessageEvent
(
WarplyEventBusManager
event
)
{
if
(
event
.
getCouponsChanged
()
!=
null
)
{
Handler
mUIHandler
=
new
Handler
(
Looper
.
getMainLooper
());
mUIHandler
.
post
(
this
::
filterItems
);
}
}
@Override
public
void
onResume
()
{
super
.
onResume
();
WarplyAnalyticsManager
.
logTrackersEvent
(
this
,
"screen"
,
"ActiveCouponsScreen"
);
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponInfoActivity.java
View file @
0df4a07
...
...
@@ -27,6 +27,8 @@ import com.google.zxing.BarcodeFormat;
import
com.google.zxing.common.BitMatrix
;
import
com.google.zxing.oned.EAN13Writer
;
import
org.greenrobot.eventbus.EventBus
;
import
java.io.Serializable
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
...
...
@@ -36,9 +38,11 @@ import io.github.inflationx.viewpump.ViewPumpContextWrapper;
import
ly.warp.sdk.R
;
import
ly.warp.sdk.io.models.Coupon
;
import
ly.warp.sdk.io.models.UnifiedCoupon
;
import
ly.warp.sdk.io.models.WarplyCouponsChangedEventModel
;
import
ly.warp.sdk.services.EventCouponsService
;
import
ly.warp.sdk.utils.WarplyManagerHelper
;
import
ly.warp.sdk.utils.managers.WarplyAnalyticsManager
;
import
ly.warp.sdk.utils.managers.WarplyEventBusManager
;
public
class
CouponInfoActivity
extends
Activity
implements
View
.
OnClickListener
{
...
...
@@ -131,6 +135,10 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
if
(
resultCode
==
RESULT_OK
)
{
OneTimeWorkRequest
mywork
=
new
OneTimeWorkRequest
.
Builder
(
EventCouponsService
.
class
).
build
();
WorkManager
.
getInstance
(
this
).
enqueue
(
mywork
);
// WarplyCouponsChangedEventModel couponsChanged = new WarplyCouponsChangedEventModel();
// couponsChanged.setChanged(true);
// EventBus.getDefault().post(new WarplyEventBusManager(couponsChanged));
onBackPressed
();
}
}
...
...
Please
register
or
login
to post a comment