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
2022-06-21 14:04:14 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d954e1120c858beecec0f1adea6d59b38271a5f5
d954e112
1 parent
b5687661
additions
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
30 deletions
app/src/main/java/warp/ly/android_sdk/activities/SplashActivity.java
warply_android_sdk/build.gradle
warply_android_sdk/src/main/java/ly/warp/sdk/activities/BaseFragmentActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/GiftsForYouActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/WarpViewActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
app/src/main/java/warp/ly/android_sdk/activities/SplashActivity.java
View file @
d954e11
...
...
@@ -16,6 +16,7 @@ import ly.warp.sdk.io.callbacks.SimpleCallbackReceiver;
import
ly.warp.sdk.io.callbacks.WarplyReadyCallback
;
import
ly.warp.sdk.io.request.WarplyConsumerRequest
;
import
ly.warp.sdk.io.request.WarplyLoginRequest
;
import
ly.warp.sdk.io.request.WarplyVerifyTicketRequest
;
import
ly.warp.sdk.utils.WarplyInitializer
;
import
ly.warp.sdk.utils.managers.WarplyManager
;
import
warp.ly.android_sdk.R
;
...
...
@@ -38,6 +39,12 @@ public class SplashActivity extends BaseActivity {
.
setPassword
(
"123456"
),
mLoginReceiver
);
// WarplyManager.verifyTicket(new WarplyVerifyTicketRequest()
// .setGuid("6012139059")
// .setTicket("eyJraWQiOiIxMjc3IiwidHlwIjoiSldUIiwiYWxnIjoiUlM1MTIifQ.eyJhdWQiOiJsb3lhbHR5Iiwic3ViIjoiNjAxMjEzOTA1OSIsIm5iZiI6MTY1NTgwMjE4Miwic2NvcGUiOltdLCJraWQiOjEyNzcsImlzcyI6IlBVQkxJQ19DQUxMRVIiLCJleHAiOjE2NTU4MDM5ODIsImlhdCI6MTY1NTgwMjE4Mn0.T5F7QoGd0PFwW4hQ7FhSqxjK0V8RKUmuu7PgXAbfTnpeHuR1Jj8BT3vDNGsVjoF6ZXR3wIouxCnpJroUn0o6bMROk0YI_zFkpinoYF9ByxI2ErJqCAruhpcsNQvbONQaUk9oMTPRI1-B8iYJkofThAKvs98wjqWRDlM30KDTpXI7A3yxY56gVHYzZvfe2uSuNeniw60X5XowZyFrLvzwkdAeIuafQhfGZCvFSP2tTz1apVKh3rv8erLI92MA6xu66bc3MFpTOrKQklQDqmRYL6xcbFNtOk1D_Tb84KjHj7C8Ufg1wWIYkSTi4TtfneSkYkcjZfI2Anbmqm-0mCRKRA"),
// mLoginReceiver
// );
}
else
{
startNextActivity
();
}
...
...
warply_android_sdk/build.gradle
View file @
d954e11
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.4-cosbeta1
3
'
PUBLISH_VERSION
=
'4.5.4-cosbeta1
4
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/BaseFragmentActivity.java
View file @
d954e11
...
...
@@ -194,7 +194,7 @@ public class BaseFragmentActivity extends FragmentActivity implements Navigation
}
}
WarplyManagerHelper
.
setUniqueCampaignList
(
mUniqueCampaignLis
t
);
WarplyManagerHelper
.
setUniqueCampaignList
(
resul
t
);
// Thread.currentThread().interrupt();
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/GiftsForYouActivity.java
View file @
d954e11
...
...
@@ -26,7 +26,6 @@ import ly.warp.sdk.io.models.Couponset;
import
ly.warp.sdk.io.models.CouponsetsList
;
import
ly.warp.sdk.io.models.LoyaltyContextualOfferModel
;
import
ly.warp.sdk.io.models.LoyaltyGiftsForYouOfferClickEvent
;
import
ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel
;
import
ly.warp.sdk.io.models.MergedGifts
;
import
ly.warp.sdk.utils.WarpUtils
;
import
ly.warp.sdk.utils.WarplyManagerHelper
;
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/WarpViewActivity.java
View file @
d954e11
...
...
@@ -153,10 +153,7 @@ public class WarpViewActivity extends WarpBaseActivity {
RelativeLayout
.
LayoutParams
warpViewParams
=
new
RelativeLayout
.
LayoutParams
(
RelativeLayout
.
LayoutParams
.
MATCH_PARENT
,
RelativeLayout
.
LayoutParams
.
MATCH_PARENT
);
// warpViewParams.addRule(
// RelativeLayout.SYSTEM_UI_FLAG_LAYOUT_STABLE
// | RelativeLayout.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
// | RelativeLayout.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
root
.
setFitsSystemWindows
(
true
);
root
.
addView
(
mWarpView
,
warpViewParams
);
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
View file @
d954e11
...
...
@@ -57,6 +57,7 @@ public class WarplyManagerHelper {
private
static
CouponList
mCouponList
=
new
CouponList
();
private
static
CouponsetsList
mCouponsetsList
=
new
CouponsetsList
();
private
static
CustomerStateModel
mCustomerStateModel
;
private
static
CampaignList
mCampaignList
;
// ===========================================================
// Methods for/from SuperClass/Interfaces
...
...
@@ -81,10 +82,10 @@ public class WarplyManagerHelper {
+
"&client_id="
+
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getClientValue
(
"client_id"
)
+
"&client_secret="
+
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getClientValue
(
"client_secret"
);
if
(
mConsumer
!=
null
)
url
=
url
+
"&auth_token="
+
(
mConsumer
.
getUuid
());
else
url
=
url
+
"&auth_token="
;
//
if (mConsumer != null)
//
url = url + "&auth_token=" + (mConsumer.getUuid());
//
else
//
url = url + "&auth_token=";
return
url
;
}
...
...
@@ -92,24 +93,26 @@ public class WarplyManagerHelper {
/**
* Open Warply campaign with sharing id
*/
public
static
String
constructCampaignUrlForShare
(
Campaign
item
,
String
deeplink
)
{
String
url
=
item
.
getIndexUrl
()
+
"?web_id="
+
WarpUtils
.
getWebId
(
Warply
.
getWarplyContext
())
+
"&app_uuid="
+
WarplyProperty
.
getAppUuid
(
Warply
.
getWarplyContext
())
+
"&api_key="
+
WarpUtils
.
getApiKey
(
Warply
.
getWarplyContext
())
+
"&session_uuid="
+
item
.
getSessionUUID
()
+
"&access_token="
+
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getAuthValue
(
"access_token"
)
+
"&refresh_token="
+
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getAuthValue
(
"refresh_token"
)
+
"&client_id="
+
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getClientValue
(
"client_id"
)
+
"&client_secret="
+
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getClientValue
(
"client_secret"
);
/*+ "&sharing_id=" + sharingId;*/
if
(
mConsumer
!=
null
)
url
=
url
+
"&auth_token="
+
(
mConsumer
.
getUuid
());
else
url
=
url
+
"&auth_token="
;
public
static
String
constructCampaignUrlForShare
(
String
sessionUuid
,
String
sharingId
)
{
if
(
getCampaignList
()
!=
null
)
{
for
(
Campaign
item
:
getCampaignList
())
{
if
(
item
.
getSessionUUID
().
equals
(
sessionUuid
))
{
String
url
=
item
.
getIndexUrl
()
+
"?web_id="
+
WarpUtils
.
getWebId
(
Warply
.
getWarplyContext
())
+
"&app_uuid="
+
WarplyProperty
.
getAppUuid
(
Warply
.
getWarplyContext
())
+
"&api_key="
+
WarpUtils
.
getApiKey
(
Warply
.
getWarplyContext
())
+
"&session_uuid="
+
item
.
getSessionUUID
()
+
"&access_token="
+
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getAuthValue
(
"access_token"
)
+
"&refresh_token="
+
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getAuthValue
(
"refresh_token"
)
+
"&client_id="
+
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getClientValue
(
"client_id"
)
+
"&client_secret="
+
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getClientValue
(
"client_secret"
)
+
"&sharing_id="
+
sharingId
;
return
url
;
}
}
}
return
url
;
return
""
;
}
/**
...
...
@@ -203,8 +206,31 @@ public class WarplyManagerHelper {
mConsumer
=
consumer
;
}
public
static
void
setUniqueCampaignList
(
HashMap
<
String
,
CampaignList
>
uniqueCouponList
)
{
mUniqueCampaignList
=
uniqueCouponList
;
public
static
void
setUniqueCampaignList
(
HashMap
<
String
,
CampaignList
>
uniqueCampaignList
)
{
mUniqueCampaignList
=
uniqueCampaignList
;
}
public
static
void
setUniqueCampaignList
(
CampaignList
campaignList
)
{
mCampaignList
=
campaignList
;
for
(
Campaign
campaign
:
campaignList
)
{
if
(
mUniqueCampaignList
.
containsKey
(
campaign
.
getOfferCategory
().
trim
()))
{
CampaignList
tempCampaignList
=
(
CampaignList
)
mUniqueCampaignList
.
get
(
campaign
.
getOfferCategory
().
trim
());
tempCampaignList
.
add
(
campaign
);
mUniqueCampaignList
.
put
(
campaign
.
getOfferCategory
().
trim
(),
tempCampaignList
);
}
else
{
CampaignList
tempCampaignList
=
new
CampaignList
();
tempCampaignList
.
add
(
campaign
);
mUniqueCampaignList
.
put
(
campaign
.
getOfferCategory
().
trim
(),
tempCampaignList
);
}
}
}
public
static
void
setCampaignList
(
CampaignList
campaignList
)
{
mCampaignList
=
campaignList
;
}
public
static
CampaignList
getCampaignList
()
{
return
mCampaignList
;
}
public
static
void
setCouponList
(
CouponList
couponList
)
{
...
...
Please
register
or
login
to post a comment