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-07-26 18:06:28 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
81e9312219e2959c4f5f8468ef2c1cb2a97492dc
81e93122
1 parent
ee6ee87a
new gradle, fixes for new gradle
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
14 additions
and
93 deletions
.idea/deploymentTargetDropDown.xml
app/build.gradle
app/src/main/AndroidManifest.xml
build.gradle
gradle/wrapper/gradle-wrapper.properties
scripts/publish-module.gradle
warply_android_sdk/build.gradle
warply_android_sdk/src/main/AndroidManifest.xml
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
warply_android_sdk/src/main/java/ly/warp/sdk/services/UpdateUserLocationService.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyLocationManager.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/CampaignItemWebHolder.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/CampaignViewLoader.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/WarpView.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/adapters/CampaignsArrayAdapter.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/adapters/mix/CampaignsMixListAdapter.java
warply_android_sdk/src/main/res/layout/activity_loyalty_wallet.xml
warply_android_sdk/src/main/res/values/attrs.xml
.idea/deploymentTargetDropDown.xml
View file @
81e9312
...
...
@@ -15,7 +15,7 @@
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown
value=
"2024-07-26T1
3:26:33.140020
Z"
/>
<timeTargetWasSelectedWithDropDown
value=
"2024-07-26T1
4:53:01.900442
Z"
/>
</State>
</entry>
</value>
...
...
app/build.gradle
View file @
81e9312
...
...
@@ -3,6 +3,7 @@ apply plugin: 'com.android.application'
//apply plugin: 'com.huawei.agconnect'
android
{
namespace
"warp.ly.android_sdk"
compileSdkVersion
34
buildToolsVersion
"34.0.0"
...
...
app/src/main/AndroidManifest.xml
View file @
81e9312
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"warp.ly.android_sdk"
>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
...
...
build.gradle
View file @
81e9312
...
...
@@ -8,7 +8,7 @@ buildscript {
maven
{
url
'https://plugins.gradle.org/m2/'
}
}
dependencies
{
classpath
'com.android.tools.build:gradle:
7.1.3
'
classpath
'com.android.tools.build:gradle:
8.1.4
'
classpath
'com.google.gms:google-services:4.3.10'
classpath
'com.huawei.agconnect:agcp:1.7.2.300'
classpath
'io.github.gradle-nexus:publish-plugin:1.1.0'
...
...
gradle/wrapper/gradle-wrapper.properties
View file @
81e9312
#Fri Jul 26 17:08:44 EEST 2024
distributionBase
=
GRADLE_USER_HOME
distributionPath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
7.2
-bin.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
8.0
-bin.zip
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
...
...
scripts/publish-module.gradle
View file @
81e9312
...
...
@@ -32,7 +32,7 @@ afterEvaluate {
// Two artifacts, the `aar` (or `jar`) and the sources
if
(
project
.
plugins
.
findPlugin
(
"com.android.library"
))
{
from
components
.
release
from
components
.
findByName
(
'release'
)
}
else
{
from
components
.
java
}
...
...
warply_android_sdk/build.gradle
View file @
81e9312
...
...
@@ -9,7 +9,7 @@ ext {
apply
from:
"${rootProject.projectDir}/scripts/publish-module.gradle"
android
{
namespace
'ly.warp.sdk'
compileSdkVersion
34
buildToolsVersion
"34.0.0"
...
...
@@ -107,9 +107,6 @@ dependencies {
implementation
'com.squareup.retrofit2:retrofit:2.9.0'
implementation
'com.squareup.retrofit2:converter-gson:2.9.0'
//------------------------------ Expandable Layout -----------------------------//
api
'net.cachapa.expandablelayout:expandablelayout:2.9.2'
//------------------------------ Lifecycle -----------------------------//
implementation
"androidx.lifecycle:lifecycle-extensions:2.2.0"
...
...
warply_android_sdk/src/main/AndroidManifest.xml
View file @
81e9312
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
package=
"ly.warp.sdk"
>
xmlns:tools=
"http://schemas.android.com/tools"
>
<uses-permission
android:name=
"android.permission.ACCESS_FINE_LOCATION"
/>
<uses-permission
android:name=
"android.permission.ACCESS_COARSE_LOCATION"
/>
...
...
@@ -177,57 +176,6 @@
</intent-filter>
</activity>
<!-- Service used for updating user's location. -->
<service
android:name=
".services.UpdateUserLocationService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
".services.EventService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
".services.VouchersFetchedService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
".services.EventCouponsService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
".services.EventRewardsCouponsService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
".services.EventUnifiedCouponsService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
".services.EventCampaignCouponService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
".services.EventCampaignService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
".services.EventRefreshDeviceTokenService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<service
android:name=
".services.EventQuestionnaireService"
android:exported=
"false"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<!-- android:stopWithTask="false"-->
<!-- android:process=":warplyHealthService"-->
<!-- <service-->
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
deleted
100644 → 0
View file @
ee6ee87
This diff is collapsed. Click to expand it.
warply_android_sdk/src/main/java/ly/warp/sdk/services/UpdateUserLocationService.java
View file @
81e9312
...
...
@@ -52,7 +52,6 @@ import java.util.List;
import
java.util.Map
;
import
java.util.concurrent.TimeUnit
;
import
ly.warp.sdk.BuildConfig
;
import
ly.warp.sdk.Warply
;
import
ly.warp.sdk.dexter.listener.DexterError
;
import
ly.warp.sdk.dexter.listener.PermissionDeniedResponse
;
...
...
@@ -102,11 +101,9 @@ public class UpdateUserLocationService extends Worker {
PermissionsUtil
.
PERMISSION_LOCATION_FINE
).
requestPermissions
();
}
catch
(
SecurityException
e
)
{
if
(
BuildConfig
.
DEBUG
)
{
e
.
printStackTrace
();
WorkManager
.
getInstance
(
Warply
.
getWarplyContext
()).
cancelAllWorkByTag
(
TAG
);
}
}
}
else
{
WorkManager
.
getInstance
(
Warply
.
getWarplyContext
()).
cancelAllWorkByTag
(
TAG
);
}
...
...
@@ -187,7 +184,6 @@ public class UpdateUserLocationService extends Worker {
getGeofences
().
add
(
new
WarpGeoFence
(
geoArray
.
getJSONObject
(
i
)));
}
}
catch
(
JSONException
e
)
{
if
(
BuildConfig
.
DEBUG
)
e
.
printStackTrace
();
geofences
=
null
;
WarpUtils
.
log
(
"failed during parsing geofencing data."
);
...
...
@@ -427,10 +423,8 @@ public class UpdateUserLocationService extends Worker {
WarpUtils
.
log
(
"Could not get location data."
);
});
}
catch
(
SecurityException
e
)
{
if
(
BuildConfig
.
DEBUG
)
{
e
.
printStackTrace
();
}
}
}
};
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyLocationManager.java
View file @
81e9312
...
...
@@ -38,7 +38,6 @@ import androidx.work.WorkManager;
import
java.util.List
;
import
ly.warp.sdk.BuildConfig
;
import
ly.warp.sdk.Warply
;
import
ly.warp.sdk.dexter.listener.DexterError
;
import
ly.warp.sdk.dexter.listener.PermissionDeniedResponse
;
...
...
@@ -122,11 +121,9 @@ public class WarplyLocationManager {
defaultMinTime
,
defaultMinDistance
,
locationListenerPendingIntent
);
}
catch
(
SecurityException
e
)
{
if
(
BuildConfig
.
DEBUG
)
{
e
.
printStackTrace
();
}
}
}
};
try
{
...
...
@@ -137,7 +134,6 @@ public class WarplyLocationManager {
PermissionsUtil
.
PERMISSION_LOCATION_FINE
).
requestPermissions
();
}
catch
(
Exception
e
)
{
if
(
BuildConfig
.
DEBUG
)
e
.
printStackTrace
();
}
}
...
...
@@ -262,11 +258,9 @@ public class WarplyLocationManager {
lm
.
requestLocationUpdates
(
bestProvider
,
minTime
,
minDistance
,
locationListenerPendingIntent
);
}
}
catch
(
SecurityException
e
)
{
if
(
BuildConfig
.
DEBUG
)
{
e
.
printStackTrace
();
}
}
}
};
new
PermissionsUtil
(
...
...
@@ -276,12 +270,10 @@ public class WarplyLocationManager {
PermissionsUtil
.
PERMISSION_LOCATION_FINE
).
requestPermissions
();
}
catch
(
SecurityException
e
)
{
if
(
BuildConfig
.
DEBUG
)
{
e
.
printStackTrace
();
}
}
}
}
// MicroAppIndexes geofencingIndex = MicroAppIndexes.GEOFENCING_INDEX;
//
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/views/CampaignItemWebHolder.java
View file @
81e9312
...
...
@@ -16,7 +16,6 @@ import android.widget.ImageView;
import
android.widget.RelativeLayout
;
import
ly.warp.sdk.BuildConfig
;
import
ly.warp.sdk.io.models.Campaign
;
import
ly.warp.sdk.utils.WarpUtils
;
import
ly.warp.sdk.utils.WarplyDeviceInfoCollector
;
...
...
@@ -117,11 +116,9 @@ public class CampaignItemWebHolder extends CampaignItemViewHolder {
try
{
context
.
startActivity
(
new
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
url
)));
}
catch
(
ActivityNotFoundException
e
)
{
if
(
BuildConfig
.
DEBUG
)
{
e
.
printStackTrace
();
}
}
}
});
warpView
.
setOnTouchListener
(
new
View
.
OnTouchListener
()
{
@Override
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/views/CampaignViewLoader.java
View file @
81e9312
package
ly
.
warp
.
sdk
.
views
;
import
android.content.Context
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentActivity
;
import
androidx.fragment.app.FragmentManager
;
import
androidx.fragment.app.FragmentTransaction
;
import
android.text.TextUtils
;
import
ly.warp.sdk.BuildConfig
;
import
ly.warp.sdk.Warply
;
import
ly.warp.sdk.fragments.WarpViewFragment
;
import
ly.warp.sdk.io.callbacks.CallbackReceiver
;
...
...
@@ -87,12 +88,10 @@ public class CampaignViewLoader implements CallbackReceiver<CampaignList> {
try
{
transaction
.
commit
();
}
catch
(
IllegalStateException
e
)
{
if
(
BuildConfig
.
DEBUG
)
{
e
.
printStackTrace
();
}
}
}
}
private
void
notifySuccessExternalListener
(
CampaignList
campaigns
)
{
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/views/WarpView.java
View file @
81e9312
...
...
@@ -35,7 +35,6 @@ import android.content.Context;
import
android.content.DialogInterface
;
import
android.content.Intent
;
import
android.content.IntentSender
;
import
android.content.pm.ApplicationInfo
;
import
android.content.pm.PackageManager
;
import
android.location.LocationManager
;
import
android.net.Uri
;
...
...
@@ -103,12 +102,9 @@ import ly.warp.sdk.io.models.RefreshVouchersEventModel;
import
ly.warp.sdk.io.models.UnifiedCoupon
;
import
ly.warp.sdk.io.models.WarplyCCMSEnabledModel
;
import
ly.warp.sdk.io.models.WarplyCouponsChangedEventModel
;
import
ly.warp.sdk.io.models.WarplyHealthEventModel
;
import
ly.warp.sdk.io.models.WarplyPacingCardEventModel
;
import
ly.warp.sdk.io.models.WarplyPacingEventModel
;
import
ly.warp.sdk.io.models.WarplyUnifiedActivatedEventModel
;
import
ly.warp.sdk.services.EventCampaignService
;
import
ly.warp.sdk.services.WarplyHealthService
;
import
ly.warp.sdk.utils.WarpUtils
;
import
ly.warp.sdk.utils.WarplyManagerHelper
;
import
ly.warp.sdk.utils.WarplyProperty
;
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/views/adapters/CampaignsArrayAdapter.java
View file @
81e9312
...
...
@@ -10,7 +10,6 @@ import java.util.Collections;
import
java.util.Comparator
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
ly.warp.sdk.BuildConfig
;
import
ly.warp.sdk.Warply
;
import
ly.warp.sdk.io.callbacks.CallbackReceiver
;
import
ly.warp.sdk.io.callbacks.SimpleCallbackReceiver
;
...
...
@@ -142,10 +141,8 @@ public class CampaignsArrayAdapter<VH extends CampaignItemViewHolder> extends Ba
itemView
=
viewHolder
.
itemView
;
itemView
.
setTag
(
viewHolder
);
}
catch
(
Exception
e
)
{
if
(
BuildConfig
.
DEBUG
)
{
e
.
printStackTrace
();
}
}
}
else
{
viewHolder
=
(
VH
)
itemView
.
getTag
();
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/views/adapters/mix/CampaignsMixListAdapter.java
View file @
81e9312
package
ly
.
warp
.
sdk
.
views
.
adapters
.
mix
;
import
android.database.DataSetObserver
;
import
androidx.annotation.NonNull
;
import
androidx.recyclerview.widget.RecyclerView
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.AbsListView
;
import
android.widget.BaseAdapter
;
import
android.widget.ListView
;
import
ly.warp.sdk.BuildConfig
;
import
ly.warp.sdk.io.callbacks.SimpleCallbackReceiver
;
import
ly.warp.sdk.io.models.Campaign
;
import
ly.warp.sdk.io.models.CampaignList
;
...
...
@@ -185,10 +186,8 @@ public class CampaignsMixListAdapter<VH extends CampaignItemViewHolder> extends
itemView
=
viewHolder
.
itemView
;
itemView
.
setTag
(
viewHolder
);
}
catch
(
Exception
e
)
{
if
(
BuildConfig
.
DEBUG
)
{
e
.
printStackTrace
();
}
}
}
else
{
viewHolder
=
(
VH
)
itemView
.
getTag
();
}
...
...
warply_android_sdk/src/main/res/layout/activity_loyalty_wallet.xml
deleted
100644 → 0
View file @
ee6ee87
This diff is collapsed. Click to expand it.
warply_android_sdk/src/main/res/values/attrs.xml
View file @
81e9312
...
...
@@ -5,6 +5,7 @@
<attr
name=
"dashLength"
format=
"dimension"
/>
<attr
name=
"dashGap"
format=
"dimension"
/>
<attr
name=
"dashThickness"
format=
"dimension"
/>
<attr
name=
"colorPrimary"
format=
"color"
/>
<attr
name=
"orientation"
format=
"enum"
>
<enum
name=
"horizontal"
value=
"0"
/>
<enum
name=
"vertical"
value=
"1"
/>
...
...
Please
register
or
login
to post a comment