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
2025-01-16 12:11:12 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f38c88236ee21fd5b5da2af1fa58dd1df4229b18
f38c8823
1 parent
8961ddef
changes for cosmote pass part3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
6 deletions
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
View file @
f38c882
...
...
@@ -45,8 +45,6 @@ import org.json.JSONObject;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.Map
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
...
...
@@ -83,7 +81,6 @@ import ly.warp.sdk.io.request.WarplyIntegrationRequest;
import
ly.warp.sdk.services.EventService
;
import
ly.warp.sdk.services.FCMBaseMessagingService
;
import
ly.warp.sdk.services.VouchersFetchedService
;
import
ly.warp.sdk.services.WarplyHealthService
;
import
ly.warp.sdk.utils.managers.WarplyAnalyticsManager
;
import
ly.warp.sdk.utils.managers.WarplyEventBusManager
;
import
ly.warp.sdk.utils.managers.WarplyManager
;
...
...
@@ -141,11 +138,22 @@ public class WarplyManagerHelper {
// ===========================================================
public
static
String
getMarketPassMapUrl
(
Context
context
)
{
if
(
WarplyProperty
.
getAppUuid
(
context
).
equals
(
"f83dfde1145e4c2da69793abb2f579af"
))
{
return
"https://dev.supermarketdeals.eu/map"
;
// if (WarplyProperty.getAppUuid(context).equals("f83dfde1145e4c2da69793abb2f579af")) {
// return "https://dev.supermarketdeals.eu/map";
// }
//
// return "https://supermarketdeals.eu/map";
if
(
WarplyManagerHelper
.
getCampaignListAll
()
!=
null
&&
!
WarplyManagerHelper
.
getCampaignListAll
().
isEmpty
())
{
for
(
Campaign
smCampaign
:
WarplyManagerHelper
.
getCampaignListAll
())
{
if
(
smCampaign
.
getOfferCategory
().
equals
(
"more_for_you"
)
&&
smCampaign
.
getFilter
().
equals
(
"supermarket"
))
{
return
WarplyManagerHelper
.
openSupermarketCampaign
(
smCampaign
);
}
}
}
return
"
https://supermarketdeals.eu/map
"
;
return
""
;
}
/**
...
...
@@ -182,6 +190,38 @@ public class WarplyManagerHelper {
return
url
;
}
public
static
String
openSupermarketCampaign
(
Campaign
item
)
{
WarplyManager
.
getSingleCampaign
(
item
.
getSessionUUID
());
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");
JSONObject
params
=
new
JSONObject
();
try
{
params
.
putOpt
(
"web_id"
,
WarpUtils
.
getWebId
(
Warply
.
getWarplyContext
()));
params
.
putOpt
(
"app_uuid"
,
WarplyProperty
.
getAppUuid
(
Warply
.
getWarplyContext
()));
params
.
putOpt
(
"api_key"
,
WarpUtils
.
getApiKey
(
Warply
.
getWarplyContext
()));
params
.
putOpt
(
"session_uuid"
,
item
.
getSessionUUID
());
params
.
putOpt
(
"access_token"
,
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getAuthValue
(
"access_token"
));
params
.
putOpt
(
"refresh_token"
,
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getAuthValue
(
"refresh_token"
));
params
.
putOpt
(
"client_id"
,
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getClientValue
(
"client_id"
));
params
.
putOpt
(
"client_secret"
,
WarplyDBHelper
.
getInstance
(
Warply
.
getWarplyContext
()).
getClientValue
(
"client_secret"
));
params
.
putOpt
(
"map"
,
"map"
);
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
}
WarpUtils
.
setWebviewParams
(
Warply
.
getWarplyContext
(),
params
);
return
url
;
}
private
static
String
constructCampaignUrl
(
Campaign
item
,
String
dlParam
)
{
WarplyManager
.
getSingleCampaign
(
item
.
getSessionUUID
());
String
url
=
item
.
getIndexUrl
();
...
...
Please
register
or
login
to post a comment