Panagiotis Triantafyllou

huawei map

......@@ -116,6 +116,7 @@
<entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_more_for_you.xml" value="0.22" />
<entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_past_coupons.xml" value="0.358695652173913" />
<entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_shops.xml" value="0.36666666666666664" />
<entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_shops_huawei.xml" value="0.23157894736842105" />
<entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_steps.xml" value="0.358695652173913" />
<entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_telco.xml" value="0.36666666666666664" />
<entry key="..\:/Users/Warply/Documents/Warply/Android/warply_android_sdk_maven_plugin/warply_android_sdk/src/main/res/layout/activity_webview.xml" value="0.4282238442822384" />
......
apply plugin: 'com.android.application'
//apply plugin: 'com.google.gms.google-services'
//apply plugin: 'com.huawei.agconnect'
android {
compileSdkVersion 31
......@@ -23,16 +24,22 @@ android {
signingConfigs {
config {
// Set the parameters based on the actual signing information.
keyAlias 'warplydemo'
keyPassword 'warplydemo'
storeFile file('../keystore/warplydemo.jks')
storePassword 'warplydemo'
keyAlias 'democosmote'
keyPassword 'democosmote'
storeFile file('../keystore/democosmote.jks')
storePassword 'democosmote'
}
debug {
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile file('../keystore/debug.keystore')
storePassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.config
......
......@@ -10,7 +10,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.huawei.agconnect:agcp:1.6.2.300'
classpath 'com.huawei.agconnect:agcp:1.7.2.300'
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
// NOTE: Do not place your application dependencies here; they belong
......
No preview for this file type
......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4.6rc41'
PUBLISH_VERSION = '4.5.4.6rc42'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......@@ -89,6 +89,8 @@ dependencies {
implementation 'com.huawei.hms:base:6.6.0.300'
implementation 'com.huawei.hms:push:6.7.0.300'
implementation 'com.huawei.hms:ads-identifier:3.4.56.300'
implementation 'com.huawei.hms:maps:6.9.0.300'
implementation 'com.huawei.hms:maps-basic:6.9.0.300'
//------------------------------ SQLCipher -----------------------------//
api "net.zetetic:android-database-sqlcipher:4.5.2"
......
......@@ -12,6 +12,8 @@
<uses-permission
android:name="android.permission.REQUEST_INSTALL_PACKAGES"
tools:node="remove" />
<uses-permission android:name="com.huawei.appmarket.service.commondata.permission.GET_COMMON_DATA"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<application android:largeHeap="true">
<!-- <meta-data-->
......@@ -88,6 +90,12 @@
android:theme="@style/SDKAppTheme" />
<activity
android:name="ly.warp.sdk.activities.ShopsHuaweiActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/SDKAppTheme" />
<activity
android:name="ly.warp.sdk.activities.CouponShareActivity"
android:exported="false"
android:screenOrientation="portrait"
......
......@@ -36,6 +36,7 @@ import ly.warp.sdk.io.models.Coupon;
import ly.warp.sdk.io.models.Couponset;
import ly.warp.sdk.io.models.Merchant;
import ly.warp.sdk.services.EventCouponsService;
import ly.warp.sdk.utils.WarplyDeviceInfoCollector;
import ly.warp.sdk.utils.WarplyManagerHelper;
import ly.warp.sdk.utils.managers.WarplyAnalyticsManager;
......@@ -131,10 +132,17 @@ public class CouponInfoActivity extends Activity implements View.OnClickListener
if (view.getId() == R.id.ll_shops) {
WarplyAnalyticsManager.logTrackersEvent(this, "click", "SeeShops");
if (WarplyDeviceInfoCollector.isPackageInstalled("com.android.vending", getPackageManager())) {
Intent intent = new Intent(CouponInfoActivity.this, ShopsActivity.class);
intent.putExtra("couponset", (Serializable) mCouponset);
startActivity(intent);
return;
} else {
Intent intent = new Intent(CouponInfoActivity.this, ShopsHuaweiActivity.class);
intent.putExtra("couponset", (Serializable) mCouponset);
startActivity(intent);
return;
}
}
if (view.getId() == R.id.ll_website) {
WarplyAnalyticsManager.logTrackersEvent(this, "click", "SeeShopWebsite");
......
......@@ -69,7 +69,7 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe
private Couponset mCouponset;
private GoogleMap mMap;
private ClusterManager<Merchant> mClusterManager;
SupportMapFragment mMapView;
private SupportMapFragment mMapView;
private MerchantList mMerchantList = new MerchantList();
private AlertDialog mAlertDialogNoShopsAvailable;
private Merchant mMerchant;
......
......@@ -385,7 +385,7 @@ public class WarplyDeviceInfoCollector {
return json;
}
public boolean isPackageInstalled(String packageName, PackageManager packageManager) {
public static boolean isPackageInstalled(String packageName, PackageManager packageManager) {
try {
return packageManager.getApplicationInfo(packageName, 0).enabled;
} catch (PackageManager.NameNotFoundException e) {
......
......@@ -83,6 +83,11 @@ public class WarpConstants {
new LatLng(41.97761, 28.62522)
);
public static final com.huawei.hms.maps.model.LatLngBounds GREECE_BOUNDS_HUAWEI = new com.huawei.hms.maps.model.LatLngBounds(
new com.huawei.hms.maps.model.LatLng(34.75261, 19.33079),
new com.huawei.hms.maps.model.LatLng(41.97761, 28.62522)
);
/* Result codes */
public static final int RESULT_CODE_SUCCESS = 1;
......
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_loyalty_wallet_header"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@android:color/white">
<ImageView
android:id="@+id/iv_shops_back"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="16dp"
android:scaleType="centerInside"
android:src="@drawable/ic_back"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
fontPath="fonts/pf_square_sans_pro_medium.ttf"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cos_coupon_shops_title"
android:textColor="@color/grey"
android:textSize="17sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<RelativeLayout
android:id="@+id/cl_loyalty_info_view_inner"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/cl_loyalty_wallet_header">
<fragment
android:id="@+id/mv_shops_huawei"
class="com.huawei.hms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
</RelativeLayout>
......@@ -146,6 +146,7 @@
<string name="cos_dlg_coupon_depleted_title">Το κουπόνι εξαντλήθηκε</string>
<string name="cos_dlg_coupon_depleted_message">Μείνε συντονισμένος για νέες προσφορές και κουπόνια.</string>
<string name="cos_dlg_no_shops">Ο συνεργάτης διαθέτει μόνο ηλεκτρονικό κατάστημα για ηλεκτρονικές παραγγελίες.</string>
<string name="cos_dlg_no_map">Το πρόγραμμα Χάρτες Petal λείπει.</string>
<string name="cos_dlg_no_shops_title">Καταστήματα συνεργάτη</string>
<string name="cos_dlg_no_shops_positive">Δες το eshop</string>
......