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-02 18:53:26 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8d70b57cb4ef7d073ca73af030e39c8fd350174a
8d70b57c
1 parent
4166bbf9
feedback fixes
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
6 deletions
app/src/main/java/warp/ly/android_sdk/activities/SplashActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ActiveCouponsActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponShareActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponsetInfoActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/NewCampaign.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyManager.java
warply_android_sdk/src/main/res/values/strings.xml
app/src/main/java/warp/ly/android_sdk/activities/SplashActivity.java
View file @
8d70b57
...
...
@@ -2,6 +2,7 @@ package warp.ly.android_sdk.activities;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.widget.Toast
;
import
org.json.JSONObject
;
...
...
@@ -36,7 +37,7 @@ public class SplashActivity extends BaseActivity {
public
void
onWarplyReady
()
{
if
(!
WarplyDBHelper
.
getInstance
(
SplashActivity
.
this
).
isTableNotEmpty
(
"auth"
))
{
WarplyManager
.
getCosmoteUser
(
new
WarplyCosmoteUserRequest
()
.
setGuid
(
"70000
00833
"
),
//6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990, prod 6005892749, live 3000184910,prod 7000070282
.
setGuid
(
"70000
23717
"
),
//6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990, prod 6005892749, live 3000184910,prod 7000070282
mLoginReceiver
);
}
else
{
startNextActivity
();
...
...
@@ -102,7 +103,8 @@ public class SplashActivity extends BaseActivity {
@Override
public
void
onFailure
(
int
errorCode
)
{
startNextActivity
();
// startNextActivity();
Toast
.
makeText
(
SplashActivity
.
this
,
"LOGIN ERROR"
,
Toast
.
LENGTH_SHORT
).
show
();
}
};
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ActiveCouponsActivity.java
View file @
8d70b57
...
...
@@ -117,6 +117,7 @@ public class ActiveCouponsActivity extends Activity implements View.OnClickListe
WarplyAnalyticsManager
.
logTrackersEvent
(
this
,
"click"
,
(
"Coupon"
).
concat
(
":"
).
concat
(
coupon
.
getName
()));
Intent
intent
=
new
Intent
(
ActiveCouponsActivity
.
this
,
CouponInfoActivity
.
class
);
intent
.
putExtra
(
"coupon"
,
coupon
.
getCoupon
());
intent
.
putExtra
(
"isFromWallet"
,
true
);
startActivity
(
intent
);
}
})
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponShareActivity.java
View file @
8d70b57
...
...
@@ -333,6 +333,7 @@ public class CouponShareActivity extends Activity implements View.OnClickListene
public
void
onSuccess
(
JSONObject
result
)
{
int
status
=
result
.
optInt
(
"status"
,
2
);
String
message
=
result
.
optString
(
"msg"
,
""
);
if
(
status
==
1
)
WarplyManager
.
getUserCouponsWithCouponsets
(
mUserCouponsReceiver
);
runOnUiThread
(()
->
{
if
(
status
==
1
)
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponsetInfoActivity.java
View file @
8d70b57
...
...
@@ -276,7 +276,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
startActivity
(
intent
);
}
})
.
setNegativeButton
(
R
.
string
.
cos_dlg_negative_button
5
,
(
dialogNegative
,
whichNegative
)
->
{
.
setNegativeButton
(
R
.
string
.
cos_dlg_negative_button
6
,
(
dialogNegative
,
whichNegative
)
->
{
dialogNegative
.
dismiss
();
if
(
success
)
{
onBackPressed
();
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/NewCampaign.java
View file @
8d70b57
...
...
@@ -152,8 +152,12 @@ public class NewCampaign implements Parcelable, Serializable {
}
else
{
this
.
filter
=
""
;
}
if
(
this
.
extraFields
.
has
(
"coupon_img"
))
{
this
.
couponImg
=
this
.
extraFields
.
optString
(
"coupon_img"
);
}
else
{
this
.
couponImg
=
""
;
}
}
this
.
couponImg
=
json
.
optString
(
"coupon_img"
);
}
public
NewCampaign
(
Parcel
source
)
{
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyManager.java
View file @
8d70b57
...
...
@@ -1594,7 +1594,8 @@ public class WarplyManager {
@Override
public
void
onFailure
(
Throwable
throwable
)
{
receiver
.
onFailure
(
2
);
executorService
.
shutdownNow
();
new
Handler
(
Looper
.
getMainLooper
()).
post
(()
->
receiver
.
onFailure
(
2
));
}
},
executorService
);
}
...
...
@@ -1632,7 +1633,8 @@ public class WarplyManager {
@Override
public
void
onFailure
(
Throwable
throwable
)
{
receiver
.
onFailure
(
2
);
executorService
.
shutdownNow
();
new
Handler
(
Looper
.
getMainLooper
()).
post
(()
->
receiver
.
onFailure
(
2
));
}
},
executorService
);
...
...
warply_android_sdk/src/main/res/values/strings.xml
View file @
8d70b57
...
...
@@ -98,6 +98,7 @@
<string
name=
"cos_dlg_return_text"
>
Έλαβες πίσω το δώρο σου, κουπόνι αξίας 100€ για τα Intersport
</string>
<string
name=
"cos_dlg_negative_button2"
>
Άκυρο
</string>
<string
name=
"cos_dlg_negative_button5"
>
Ακύρωση
</string>
<string
name=
"cos_dlg_negative_button6"
>
Κλείσιμο
</string>
<string
name=
"cos_profile_preferences"
>
Πρόσθεσε τις προτιμήσεις σου
</string>
<string
name=
"cos_profile_history"
>
Δες το ιστορικό σου
</string>
<string
name=
"cos_shops"
>
Δες τα καταστήματα
</string>
...
...
Please
register
or
login
to post a comment