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-11-04 13:50:43 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b41ff4b0cd543331984c8b04c311a132ca5d6e2b
b41ff4b0
1 parent
a79041fa
new keys
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
227 additions
and
180 deletions
warply_android_sdk/build.gradle
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ContextualActivity.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/activities/LoyaltyWallet.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ShopsActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/TelcoActivity.java
warply_android_sdk/src/main/res/layout/activity_couponset_info.xml
warply_android_sdk/src/main/res/values-xhdpi/dimens.xml
warply_android_sdk/src/main/res/values-xxhdpi/dimens.xml
warply_android_sdk/src/main/res/values-xxxhdpi/dimens.xml
warply_android_sdk/build.gradle
View file @
b41ff4b
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.4.6rc
4
'
PUBLISH_VERSION
=
'4.5.4.6rc
5
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
@@ -45,7 +45,8 @@ dependencies {
implementation
'androidx.appcompat:appcompat:1.4.1'
implementation
'androidx.recyclerview:recyclerview:1.2.1'
implementation
'androidx.cardview:cardview:1.0.0'
api
"androidx.security:security-crypto:1.1.0-alpha03"
// For minSDK 23 use 1.0.0, for minSDK 21 use 1.1.0 that is currently in alpha
api
"androidx.security:security-crypto:1.1.0-alpha03"
// For minSDK 23 use 1.0.0, for minSDK 21 use 1.1.0 that is currently in alpha
api
'org.altbeacon:android-beacon-library:2.19.3'
api
'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
implementation
'de.hdodenhof:circleimageview:3.1.0'
...
...
@@ -59,12 +60,14 @@ dependencies {
//------------------------------ Firebase -----------------------------//
api
platform
(
'com.google.firebase:firebase-bom:29.0.3'
)
implementation
'com.google.firebase:firebase-messaging'
implementation
(
'com.google.firebase:firebase-messaging'
)
{
exclude
group:
'com.google.android.gms'
,
module:
'play-services-location'
}
//------------------------------ GMS -----------------------------//
api
'com.google.android.gms:play-services-base:18.1.0'
implementation
'com.google.android.gms:play-services-location:
21.0.0
'
implementation
'com.google.android.gms:play-services-maps:18.
1.0
'
implementation
'com.google.android.gms:play-services-location:
19.0.1
'
implementation
'com.google.android.gms:play-services-maps:18.
0.2
'
api
'com.google.maps.android:android-maps-utils:0.5'
//------------------------------ Work Manager -----------------------------//
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ContextualActivity.java
View file @
b41ff4b
...
...
@@ -225,16 +225,18 @@ public class ContextualActivity extends Activity implements View.OnClickListener
}
private
void
askActivateDialog
()
{
mAlertDialogAskActivate
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_activate_telco_title
)
.
setMessage
(
R
.
string
.
cos_dlg_activate_telco_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button
,
(
dialogPositive
,
whichPositive
)
->
{
activateGift
();
})
.
setNegativeButton
(
R
.
string
.
cos_dlg_negative_button2
,
(
dialogNegative
,
whichNegative
)
->
{
dialogNegative
.
dismiss
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogAskActivate
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_activate_telco_title
)
.
setMessage
(
R
.
string
.
cos_dlg_activate_telco_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button
,
(
dialogPositive
,
whichPositive
)
->
{
activateGift
();
})
.
setNegativeButton
(
R
.
string
.
cos_dlg_negative_button2
,
(
dialogNegative
,
whichNegative
)
->
{
dialogNegative
.
dismiss
();
})
.
show
();
}
}
private
void
errorActivatingDialog
()
{
...
...
@@ -264,13 +266,15 @@ public class ContextualActivity extends Activity implements View.OnClickListener
analyticsEvent
.
setParameter
(
"successful"
,
"true"
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
analyticsEvent
));
mAlertDialogSuccessActivating
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_activate_success_title
)
.
setMessage
(
R
.
string
.
cos_dlg_activate_success_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogSuccessActivating
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_activate_success_title
)
.
setMessage
(
R
.
string
.
cos_dlg_activate_success_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
}
}
// ===========================================================
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponShareActivity.java
View file @
b41ff4b
...
...
@@ -216,84 +216,96 @@ public class CouponShareActivity extends Activity implements View.OnClickListene
}
private
void
acceptSharingDialog
()
{
mAlertDialogSuccessSharing
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_success_title
)
.
setMessage
(
R
.
string
.
cos_dlg_positive_coupon_text
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
if
(
mIsFromWallet
)
{
setResult
(
RESULT_OK
,
new
Intent
());
onBackPressed
();
}
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogSuccessSharing
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_success_title
)
.
setMessage
(
R
.
string
.
cos_dlg_positive_coupon_text
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
if
(
mIsFromWallet
)
{
setResult
(
RESULT_OK
,
new
Intent
());
onBackPressed
();
}
})
.
show
();
}
}
private
void
errorSharingDialog
()
{
mAlertDialogErrorSharing
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogErrorSharing
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
}
}
private
void
wrongNumberDialog
(
String
message
)
{
mAlertDialogWrongNumberSharing
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
message
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogWrongNumberSharing
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
message
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
}
}
private
void
errorSharingDialog2
()
{
mAlertDialogErrorSharing
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title2
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle2
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogErrorSharing
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title2
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle2
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
}
}
private
void
showNoAssetsDialog
()
{
mAlertDialogNoAssets
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_coupon_gift
)
.
setMessage
(
R
.
string
.
cos_share_no_assets
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
onBackPressed
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogNoAssets
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_coupon_gift
)
.
setMessage
(
R
.
string
.
cos_share_no_assets
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
onBackPressed
();
})
.
show
();
}
}
private
void
askSharingDialog
()
{
mAlertDialogCouponAskSharing
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_positive_coupon_title
)
.
setMessage
(
R
.
string
.
cos_dlg_positive_coupon_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_negative_button3
,
(
dialogPositive
,
whichPositive
)
->
{
WarplyAnalyticsManager
.
logTrackersEvent
(
this
,
"click"
,
(
"ShareCoupon"
)
.
concat
(
":"
)
.
concat
(
mCoupon
.
getName
()));
new
Thread
(()
->
{
if
(!
Thread
.
currentThread
().
isInterrupted
())
{
WarplyManager
.
cosmoteCouponSharing
(
new
CosmoteCouponSharingRequest
()
.
setCoupon
(
mCoupon
.
getCoupon
())
.
setSender
(
mSender
)
.
setReceiver
(
mEdtReceiver
.
getText
().
toString
())
,
mCouponSharingCallback
);
}
Thread
.
currentThread
().
interrupt
();
}).
start
();
})
.
setNegativeButton
(
R
.
string
.
cos_dlg_negative_button2
,
(
dialogNegative
,
whichNegative
)
->
{
dialogNegative
.
dismiss
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogCouponAskSharing
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_positive_coupon_title
)
.
setMessage
(
R
.
string
.
cos_dlg_positive_coupon_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_negative_button3
,
(
dialogPositive
,
whichPositive
)
->
{
WarplyAnalyticsManager
.
logTrackersEvent
(
this
,
"click"
,
(
"ShareCoupon"
)
.
concat
(
":"
)
.
concat
(
mCoupon
.
getName
()));
new
Thread
(()
->
{
if
(!
Thread
.
currentThread
().
isInterrupted
())
{
WarplyManager
.
cosmoteCouponSharing
(
new
CosmoteCouponSharingRequest
()
.
setCoupon
(
mCoupon
.
getCoupon
())
.
setSender
(
mSender
)
.
setReceiver
(
mEdtReceiver
.
getText
().
toString
())
,
mCouponSharingCallback
);
}
Thread
.
currentThread
().
interrupt
();
}).
start
();
})
.
setNegativeButton
(
R
.
string
.
cos_dlg_negative_button2
,
(
dialogNegative
,
whichNegative
)
->
{
dialogNegative
.
dismiss
();
})
.
show
();
}
}
private
final
CallbackReceiver
<
Consumer
>
mConsumerCallback
=
new
CallbackReceiver
<
Consumer
>()
{
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/CouponsetInfoActivity.java
View file @
b41ff4b
...
...
@@ -236,17 +236,19 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
analyticsEvent
.
setParameter
(
"successful"
,
"true"
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
analyticsEvent
));
mAlertDialogCouponset
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_success_couponset_title
)
.
setMessage
(
R
.
string
.
cos_dlg_success_couponset_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
if
(
success
)
{
if
(!
isFinishing
())
{
mAlertDialogCouponset
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_success_couponset_title
)
.
setMessage
(
R
.
string
.
cos_dlg_success_couponset_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
if
(
success
)
{
// setResult(RESULT_OK, new Intent());
onBackPressed
();
}
})
.
show
();
onBackPressed
();
}
})
.
show
();
}
}
else
{
LoyaltySDKFirebaseEventModel
analyticsEvent
=
new
LoyaltySDKFirebaseEventModel
();
analyticsEvent
.
setEventName
(
"loyalty_offer_activated"
);
...
...
@@ -256,51 +258,61 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
analyticsEvent
));
if
(
status
==
3
)
{
mAlertDialogCouponset
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle_non_buyable
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogCouponset
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle_non_buyable
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
}
}
else
if
(
status
==
5
)
{
mAlertDialogCouponset
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle_no_points
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogCouponset
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle_no_points
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
}
}
else
if
(
status
==
6
)
{
mAlertDialogCouponset
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_coupon_depleted_title
)
.
setMessage
(
R
.
string
.
cos_dlg_coupon_depleted_message
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogCouponset
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_coupon_depleted_title
)
.
setMessage
(
R
.
string
.
cos_dlg_coupon_depleted_message
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
}
}
else
{
mAlertDialogCouponset
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogCouponset
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
}
}
}
}
private
void
nonTelcoDialog
()
{
mAlertDialogNonTelco
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_non_telco_title
)
.
setMessage
(
R
.
string
.
cos_dlg_non_telco
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
onBackPressed
();
})
.
setCancelable
(
false
)
.
show
();
if
(!
isFinishing
())
{
mAlertDialogNonTelco
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_non_telco_title
)
.
setMessage
(
R
.
string
.
cos_dlg_non_telco
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
onBackPressed
();
})
.
setCancelable
(
false
)
.
show
();
}
}
// ===========================================================
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
View file @
b41ff4b
...
...
@@ -514,15 +514,17 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
}
private
void
nonTelcoDialog
()
{
mAlertDialogNonTelco
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_non_telco_title
)
.
setMessage
(
R
.
string
.
cos_dlg_non_telco
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
onBackPressed
();
})
.
setCancelable
(
false
)
.
show
();
if
(!
isFinishing
())
{
mAlertDialogNonTelco
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_non_telco_title
)
.
setMessage
(
R
.
string
.
cos_dlg_non_telco
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
onBackPressed
();
})
.
setCancelable
(
false
)
.
show
();
}
}
// ===========================================================
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ShopsActivity.java
View file @
b41ff4b
...
...
@@ -265,20 +265,22 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe
// ===========================================================
private
void
showNoShopsAvailableDialog
()
{
mAlertDialogNoShopsAvailable
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_no_shops_title
)
.
setMessage
(
R
.
string
.
cos_dlg_no_shops
)
.
setCancelable
(
false
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_no_shops_positive
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
openWebsite
();
})
.
setNegativeButton
(
R
.
string
.
cos_dlg_negative_button2
,
(
dialogNegative
,
whichNegative
)
->
{
dialogNegative
.
dismiss
();
onBackPressed
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogNoShopsAvailable
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_no_shops_title
)
.
setMessage
(
R
.
string
.
cos_dlg_no_shops
)
.
setCancelable
(
false
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_no_shops_positive
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
openWebsite
();
})
.
setNegativeButton
(
R
.
string
.
cos_dlg_negative_button2
,
(
dialogNegative
,
whichNegative
)
->
{
dialogNegative
.
dismiss
();
onBackPressed
();
})
.
show
();
}
}
private
void
openWebsite
()
{
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/TelcoActivity.java
View file @
b41ff4b
...
...
@@ -259,16 +259,18 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
}
private
void
askActivateDialog
()
{
mAlertDialogAskActivate
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_activate_telco_title
)
.
setMessage
(
R
.
string
.
cos_dlg_activate_telco_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button
,
(
dialogPositive
,
whichPositive
)
->
{
activateGift
();
})
.
setNegativeButton
(
R
.
string
.
cos_dlg_negative_button2
,
(
dialogNegative
,
whichNegative
)
->
{
dialogNegative
.
dismiss
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogAskActivate
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_activate_telco_title
)
.
setMessage
(
R
.
string
.
cos_dlg_activate_telco_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button
,
(
dialogPositive
,
whichPositive
)
->
{
activateGift
();
})
.
setNegativeButton
(
R
.
string
.
cos_dlg_negative_button2
,
(
dialogNegative
,
whichNegative
)
->
{
dialogNegative
.
dismiss
();
})
.
show
();
}
}
private
void
errorActivatingDialog
()
{
...
...
@@ -279,13 +281,15 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
analyticsEvent
.
setParameter
(
"successful"
,
"false"
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
analyticsEvent
));
mAlertDialogErrorActivating
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogErrorActivating
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_error_title
)
.
setMessage
(
R
.
string
.
cos_dlg_error_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
}
}
private
void
successActivatingDialog
()
{
...
...
@@ -296,13 +300,15 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
analyticsEvent
.
setParameter
(
"successful"
,
"true"
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
analyticsEvent
));
mAlertDialogSuccessActivating
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_activate_success_title
)
.
setMessage
(
R
.
string
.
cos_dlg_activate_success_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
if
(!
isFinishing
())
{
mAlertDialogSuccessActivating
=
new
AlertDialog
.
Builder
(
this
)
.
setTitle
(
R
.
string
.
cos_dlg_activate_success_title
)
.
setMessage
(
R
.
string
.
cos_dlg_activate_success_subtitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button2
,
(
dialogPositive
,
whichPositive
)
->
{
dialogPositive
.
dismiss
();
})
.
show
();
}
}
// ===========================================================
...
...
warply_android_sdk/src/main/res/layout/activity_couponset_info.xml
View file @
b41ff4b
This diff is collapsed. Click to expand it.
warply_android_sdk/src/main/res/values-xhdpi/dimens.xml
View file @
b41ff4b
<resources>
<dimen
name=
"width_full"
>
360dp
</dimen>
<dimen
name=
"height_carousel"
>
240dp
</dimen>
<dimen
name=
"marginTop"
>
52dp
</dimen>
</resources>
...
...
warply_android_sdk/src/main/res/values-xxhdpi/dimens.xml
View file @
b41ff4b
<resources>
<dimen
name=
"width_full"
>
320dp
</dimen>
<dimen
name=
"height_carousel"
>
220dp
</dimen>
<dimen
name=
"marginTop"
>
140dp
</dimen>
</resources>
...
...
warply_android_sdk/src/main/res/values-xxxhdpi/dimens.xml
0 → 100644
View file @
b41ff4b
<resources>
<dimen
name=
"width_full"
>
320dp
</dimen>
<dimen
name=
"height_carousel"
>
220dp
</dimen>
<dimen
name=
"marginTop"
>
240dp
</dimen>
</resources>
Please
register
or
login
to post a comment