NTP-22240 | Migration to static app shortcut (#14673)
This commit is contained in:
@@ -97,6 +97,8 @@
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.app.shortcuts"
|
||||
android:resource="@xml/shortcuts" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".nux.ui.NewUserExperienceActivity"
|
||||
|
||||
@@ -62,6 +62,7 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.awaitAll
|
||||
import kotlinx.coroutines.coroutineScope
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.launch
|
||||
@@ -173,6 +174,8 @@ constructor(
|
||||
}
|
||||
sdkInitialized = true
|
||||
isInitInProgress = false
|
||||
|
||||
handleUpiShortcutWidgetMigration()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,7 +256,6 @@ constructor(
|
||||
isFromAppLaunch = false
|
||||
) // Refreshing merchant customer Id and customer status after app login
|
||||
}
|
||||
naviPayWidgetManager.get().removeScanAndPayLauncherWidget()
|
||||
if (getCustomerStatus() != NaviPayCustomerStatus.LINKED_VPA) {
|
||||
toggleNaviPayIntentActivityEnableState(shouldEnable = false)
|
||||
}
|
||||
@@ -290,7 +292,6 @@ constructor(
|
||||
async { dataStoreHelper.get().delete(DS_KEY_NAVI_PAY_CUSTOMER_STATUS) }
|
||||
)
|
||||
}
|
||||
naviPayWidgetManager.get().removeScanAndPayLauncherWidget()
|
||||
if (getCustomerStatus() != NaviPayCustomerStatus.LINKED_VPA) {
|
||||
toggleNaviPayIntentActivityEnableState(shouldEnable = false)
|
||||
}
|
||||
@@ -412,4 +413,13 @@ constructor(
|
||||
suspend fun getVpaOfPrimaryAccount(): Flow<String> {
|
||||
return dataStoreHelper.get().get(key = KEY_UPI_PRIMARY_ACCOUNT_VPA, defaultValue = "")
|
||||
}
|
||||
|
||||
private suspend fun handleUpiShortcutWidgetMigration() {
|
||||
coroutineScope {
|
||||
launch {
|
||||
// TODO: Remove this migration code after 5.45.0 release
|
||||
naviPayWidgetManager.get().removeScanAndPayDynamicShortcut()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,7 @@ import com.navi.pay.R
|
||||
import com.navi.pay.common.model.view.NaviPayScreenType
|
||||
import com.navi.pay.entry.NaviPayActivity
|
||||
import com.navi.pay.utils.NAVI_PAY_LOCAL_URI_SCHEME
|
||||
import com.navi.pay.utils.NAVI_PAY_SCAN_AND_PAY_STATIC_WIDGET_CLICKED
|
||||
import com.navi.pay.utils.NAVI_PAY_SCAN_AND_PAY_WIDGET_ANALYTICS_EVENT_KEY
|
||||
import com.navi.pay.utils.NAVI_PAY_WIDGET_CLICKED_KEY
|
||||
|
||||
class NaviPayWidget : AppWidgetProvider() {
|
||||
override fun onUpdate(
|
||||
@@ -52,10 +51,7 @@ internal fun updateAppWidget(
|
||||
val intent =
|
||||
Intent(Intent.ACTION_VIEW, uri, context, NaviPayActivity::class.java).apply {
|
||||
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
|
||||
putExtra(
|
||||
NAVI_PAY_SCAN_AND_PAY_WIDGET_ANALYTICS_EVENT_KEY,
|
||||
NAVI_PAY_SCAN_AND_PAY_STATIC_WIDGET_CLICKED,
|
||||
)
|
||||
putExtra(NAVI_PAY_WIDGET_CLICKED_KEY, "NaviPay_ScanAndPay_StaticWidget_Clicked")
|
||||
}
|
||||
|
||||
val pendingIntent: PendingIntent =
|
||||
|
||||
@@ -9,50 +9,27 @@ package com.navi.pay.common.widget
|
||||
|
||||
import android.app.PendingIntent
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.ShortcutInfo
|
||||
import android.content.pm.ShortcutManager
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.core.content.pm.ShortcutInfoCompat
|
||||
import androidx.core.content.pm.ShortcutManagerCompat
|
||||
import androidx.core.graphics.drawable.IconCompat
|
||||
import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper
|
||||
import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper.NAVI_PAY_ENABLE_SCAN_PAY_PINNED_WIDGET
|
||||
import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper.NAVI_PAY_SCAN_AND_PAY_PINNED_WIDGET_REQUEST_MIN_DAYS
|
||||
import com.navi.pay.R
|
||||
import com.navi.pay.analytics.NaviPayAnalytics
|
||||
import com.navi.pay.common.model.view.NaviPayScreenType
|
||||
import com.navi.pay.common.sync.model.view.SyncEntity
|
||||
import com.navi.pay.common.sync.repository.SyncRepository
|
||||
import com.navi.pay.entry.NaviPayActivity
|
||||
import com.navi.pay.utils.NAVI_PAY_LOCAL_URI_SCHEME
|
||||
import com.navi.pay.utils.NAVI_PAY_SCAN_AND_PAY_LAUNCHER_WIDGET_CLICKED
|
||||
import com.navi.pay.utils.NAVI_PAY_SCAN_AND_PAY_LAUNCHER_WIDGET_SHORTCUT_ID
|
||||
import com.navi.pay.utils.NAVI_PAY_SCAN_AND_PAY_WIDGET_ANALYTICS_EVENT_KEY
|
||||
import com.navi.pay.utils.NAVI_PAY_SYNC_TABLE_SCAN_PAY_PINNED_WIDGET_KEY
|
||||
import com.navi.pay.utils.NEEDS_RESULT
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import javax.inject.Inject
|
||||
import kotlin.math.absoluteValue
|
||||
import org.joda.time.DateTime
|
||||
import org.joda.time.Days
|
||||
|
||||
/**
|
||||
* LauncherWidget - When you long press on app icon & option is shown
|
||||
*
|
||||
* StaticWidget - When you long press on home screen & select widgets & then select app
|
||||
*
|
||||
* PinnedWidget - Adding launcher widget to home screen
|
||||
*
|
||||
* TileWidget - Widget appearing in notification panel
|
||||
*/
|
||||
interface NaviPayWidgetManager {
|
||||
|
||||
fun addScanAndPayLauncherWidget()
|
||||
|
||||
fun removeScanAndPayLauncherWidget()
|
||||
fun removeScanAndPayDynamicShortcut()
|
||||
|
||||
suspend fun requestScanAndPayPinnedWidget()
|
||||
}
|
||||
@@ -64,53 +41,13 @@ constructor(
|
||||
private val syncRepository: SyncRepository,
|
||||
) : NaviPayWidgetManager {
|
||||
|
||||
private val qrScannerUri by lazy {
|
||||
Uri.Builder()
|
||||
.scheme(NAVI_PAY_LOCAL_URI_SCHEME)
|
||||
.authority(NaviPayScreenType.NAVI_PAY_QR_SCANNER_SCREEN.name)
|
||||
.build()
|
||||
}
|
||||
|
||||
private val qrScannerIntent by lazy {
|
||||
Intent(Intent.ACTION_VIEW, qrScannerUri, context, NaviPayActivity::class.java).apply {
|
||||
putExtra(NEEDS_RESULT, true)
|
||||
putExtra(
|
||||
NAVI_PAY_SCAN_AND_PAY_WIDGET_ANALYTICS_EVENT_KEY,
|
||||
NAVI_PAY_SCAN_AND_PAY_LAUNCHER_WIDGET_CLICKED,
|
||||
)
|
||||
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
|
||||
}
|
||||
}
|
||||
|
||||
private val naviPayAnalytics by lazy { NaviPayAnalytics.INSTANCE.NaviPayWidgetManager() }
|
||||
|
||||
override fun addScanAndPayLauncherWidget() {
|
||||
if (
|
||||
ShortcutManagerCompat.getDynamicShortcuts(context).any {
|
||||
it.id == NAVI_PAY_SCAN_AND_PAY_LAUNCHER_WIDGET_SHORTCUT_ID
|
||||
}
|
||||
) { // Already added
|
||||
override fun removeScanAndPayDynamicShortcut() {
|
||||
if (ShortcutManagerCompat.isRateLimitingActive(context)) {
|
||||
return
|
||||
}
|
||||
|
||||
val scanAndPayShortcut =
|
||||
getShortcutObject(
|
||||
id = NAVI_PAY_SCAN_AND_PAY_LAUNCHER_WIDGET_SHORTCUT_ID,
|
||||
shortLabel = context.getString(R.string.title_scan_and_pay),
|
||||
longLabel = context.getString(R.string.title_scan_and_pay),
|
||||
icon = R.drawable.ic_ps_scan_pay,
|
||||
intent = qrScannerIntent,
|
||||
context = context,
|
||||
)
|
||||
|
||||
ShortcutManagerCompat.pushDynamicShortcut(context, scanAndPayShortcut)
|
||||
}
|
||||
|
||||
override fun removeScanAndPayLauncherWidget() {
|
||||
ShortcutManagerCompat.removeDynamicShortcuts(
|
||||
context,
|
||||
listOf(NAVI_PAY_SCAN_AND_PAY_LAUNCHER_WIDGET_SHORTCUT_ID),
|
||||
)
|
||||
ShortcutManagerCompat.removeDynamicShortcuts(context, listOf("scanAndPayShortcutId"))
|
||||
}
|
||||
|
||||
override suspend fun requestScanAndPayPinnedWidget() {
|
||||
@@ -134,7 +71,7 @@ constructor(
|
||||
|
||||
if (
|
||||
shortCutManager.pinnedShortcuts.any {
|
||||
it.id == NAVI_PAY_SCAN_AND_PAY_LAUNCHER_WIDGET_SHORTCUT_ID && it.isPinned
|
||||
it.id in listOf("scanAndPayStaticShortcutId", "scanAndPayShortcutId") && it.isPinned
|
||||
}
|
||||
) {
|
||||
naviPayAnalytics.onScanAndPayPinnedWidgetAlreadyPinned()
|
||||
@@ -166,7 +103,7 @@ constructor(
|
||||
}
|
||||
|
||||
val scanAndPayShortcut =
|
||||
ShortcutInfo.Builder(context, NAVI_PAY_SCAN_AND_PAY_LAUNCHER_WIDGET_SHORTCUT_ID)
|
||||
ShortcutInfo.Builder(context, "scanAndPayStaticShortcutId")
|
||||
.setShortLabel(context.getString(R.string.title_scan_and_pay))
|
||||
.setLongLabel(context.getString(R.string.title_scan_and_pay))
|
||||
.build()
|
||||
@@ -194,20 +131,4 @@ constructor(
|
||||
|
||||
naviPayAnalytics.onScanAndPayPinnedWidgetRequested()
|
||||
}
|
||||
|
||||
private fun getShortcutObject(
|
||||
id: String,
|
||||
shortLabel: String,
|
||||
longLabel: String,
|
||||
@DrawableRes icon: Int,
|
||||
intent: Intent,
|
||||
context: Context,
|
||||
): ShortcutInfoCompat {
|
||||
return ShortcutInfoCompat.Builder(context, id)
|
||||
.setShortLabel(shortLabel)
|
||||
.setLongLabel(longLabel)
|
||||
.setIcon(IconCompat.createWithResource(context, icon))
|
||||
.setIntent(intent)
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,6 @@ class NaviPayActivity : BaseActivity() {
|
||||
val isOnboarded = viewModel.isUserOnboarded()
|
||||
if (isOnboarded) {
|
||||
checkOnboardedUserMandatoryPermissions()
|
||||
viewModel.addScanAndPayLauncherWidget()
|
||||
} else {
|
||||
if (viewModel.isCustomerStatusDeviceBounded()) {
|
||||
checkOnboardedUserMandatoryPermissions()
|
||||
|
||||
@@ -47,7 +47,6 @@ import com.navi.pay.common.usecase.SyncUpiLiteMandateInfoUseCase
|
||||
import com.navi.pay.common.utils.generateSHA256Hash
|
||||
import com.navi.pay.common.utils.getIncomingUrlFromIntent
|
||||
import com.navi.pay.common.viewmodel.NaviPayBaseVM
|
||||
import com.navi.pay.common.widget.NaviPayWidgetManager
|
||||
import com.navi.pay.management.upinumber.list.model.view.toUpiNumberEntity
|
||||
import com.navi.pay.management.upinumber.list.repository.UpiNumberRepository
|
||||
import com.navi.pay.network.di.NaviPayGsonBuilder
|
||||
@@ -95,7 +94,6 @@ constructor(
|
||||
private val upiNumberRepository: UpiNumberRepository,
|
||||
private val syncUpiLiteMandateInfoUseCase: SyncUpiLiteMandateInfoUseCase,
|
||||
@NaviPayGsonBuilder private val gson: Gson,
|
||||
private val naviPayWidgetManager: NaviPayWidgetManager,
|
||||
private val arcNudgeSyncUseCase: ArcNudgeSyncUseCase,
|
||||
) : NaviPayBaseVM() {
|
||||
|
||||
@@ -449,8 +447,6 @@ constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun addScanAndPayLauncherWidget() = naviPayWidgetManager.addScanAndPayLauncherWidget()
|
||||
|
||||
override val screenName: String
|
||||
get() = NAVI_PAY_ACTIVITY
|
||||
}
|
||||
|
||||
@@ -749,7 +749,7 @@ constructor(
|
||||
)
|
||||
try {
|
||||
naviPayWidgetManager.requestScanAndPayPinnedWidget()
|
||||
} catch (_: Exception) {
|
||||
} catch (e: Exception) {
|
||||
// Requesting from bg will crash the app
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ import com.navi.pay.tstore.list.model.view.OrderEntity
|
||||
import com.navi.pay.utils.DEFAULT_CONFIG
|
||||
import com.navi.pay.utils.INVALID_VPA
|
||||
import com.navi.pay.utils.LITMUS_EXPERIMENT_NAVIPAY_FREQUENT_CONTACT_IN_QR_SCANNER
|
||||
import com.navi.pay.utils.NAVI_PAY_SCAN_AND_PAY_WIDGET_ANALYTICS_EVENT_KEY
|
||||
import com.navi.pay.utils.NAVI_PAY_WIDGET_CLICKED_KEY
|
||||
import com.navi.pay.utils.NOT_LINKED_TO_UPI
|
||||
import com.ramcosta.composedestinations.spec.Direction
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
@@ -166,11 +166,11 @@ constructor(
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
naviPayActivityDataProvider
|
||||
.getIntentData()
|
||||
?.getString(NAVI_PAY_SCAN_AND_PAY_WIDGET_ANALYTICS_EVENT_KEY)
|
||||
?.getString(NAVI_PAY_WIDGET_CLICKED_KEY)
|
||||
?.let {
|
||||
naviPayAnalytics.onScanAndPayShortcutClicked(
|
||||
naviPaySessionAttributes = getNaviPaySessionAttributes(),
|
||||
eventName = NAVI_PAY_SCAN_AND_PAY_WIDGET_ANALYTICS_EVENT_KEY,
|
||||
eventName = NAVI_PAY_WIDGET_CLICKED_KEY,
|
||||
eventValue = it,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ import com.navi.pay.common.utils.NaviPayCommonUtils
|
||||
import com.navi.pay.common.utils.getMetricInfo
|
||||
import com.navi.pay.common.utils.getSetPinActionPayload
|
||||
import com.navi.pay.common.viewmodel.NaviPayBaseVM
|
||||
import com.navi.pay.common.widget.NaviPayWidgetManager
|
||||
import com.navi.pay.onboarding.account.add.model.view.AccountType
|
||||
import com.navi.pay.onboarding.binding.model.network.BindDeviceRequest
|
||||
import com.navi.pay.onboarding.binding.model.network.BindDeviceResponse
|
||||
@@ -158,7 +157,6 @@ constructor(
|
||||
private val resourceProvider: ResourceProvider,
|
||||
private val coroutineDispatcherProvider: CoroutineDispatcherProvider,
|
||||
private val linkedAccountsUseCase: LinkedAccountsUseCase,
|
||||
private val naviPayWidgetManager: NaviPayWidgetManager,
|
||||
private val dataStoreHelper: DataStoreHelper,
|
||||
private val onboardingDataFromIntentProvider: OnboardingIntentDataProvider,
|
||||
private val permissionStateProvider: PermissionStateProvider,
|
||||
@@ -1183,8 +1181,6 @@ constructor(
|
||||
naviPaySessionAttributes = getNaviPaySessionAttributes(),
|
||||
)
|
||||
|
||||
naviPayWidgetManager.addScanAndPayLauncherWidget()
|
||||
|
||||
handleNavigationOnCustomerStatus()
|
||||
}
|
||||
|
||||
|
||||
@@ -287,13 +287,8 @@ const val NAVI_PAY_DATABASE_UPI_NUMBERS_TABLE_NAME = "upiNumbers"
|
||||
const val NAVI_PAY_DATABASE_VPA_TRANSACTION_INSIGHTS_TABLE_NAME = "vpaTransactionsInsights"
|
||||
const val NAVI_PAY_DATABASE_ORDER_TAG_SUMMARY_TABLE_NAME = "orderTagSummary"
|
||||
|
||||
// Dynamic Shortcut
|
||||
const val NAVI_PAY_SCAN_AND_PAY_LAUNCHER_WIDGET_SHORTCUT_ID = "scanAndPayShortcutId"
|
||||
const val NAVI_PAY_SCAN_AND_PAY_WIDGET_ANALYTICS_EVENT_KEY =
|
||||
"NaviPay_ScanAndPay_Widget_Clicked_Event_Key"
|
||||
const val NAVI_PAY_SCAN_AND_PAY_LAUNCHER_WIDGET_CLICKED =
|
||||
"NaviPay_ScanAndPay_Launcher_Widget_Clicked"
|
||||
const val NAVI_PAY_SCAN_AND_PAY_STATIC_WIDGET_CLICKED = "NaviPay_ScanAndPay_Static_Widget_Clicked"
|
||||
// Shortcuts & Widgets keys
|
||||
const val NAVI_PAY_WIDGET_CLICKED_KEY = "NaviPay_Widget_Clicked"
|
||||
|
||||
// Local URI
|
||||
const val NAVI_PAY_LOCAL_URI_SCHEME = "navipay"
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/navi_pay_cta_primary"/>
|
||||
<foreground android:drawable="@drawable/np_widget_qr_scan"/>
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,22 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="48"
|
||||
android:viewportHeight="48">
|
||||
<group>
|
||||
<clip-path
|
||||
android:pathData="M0,0h48v48h-48z"/>
|
||||
<path
|
||||
android:pathData="M39.186,2.667H14.133C12.653,2.667 11.466,3.853 11.466,5.333V42.667C11.466,44.133 12.653,45.333 14.133,45.333H39.186C40.653,45.333 41.853,44.133 41.853,42.667V5.333C41.853,3.853 40.653,2.667 39.186,2.667ZM33.653,30.16C32.013,32.213 29.493,33.52 26.666,33.52C23.6,33.52 20.906,31.986 19.28,29.653C18.28,28.213 17.693,26.453 17.693,24.56C17.693,19.613 21.706,15.6 26.666,15.6C31.626,15.6 35.626,19.613 35.626,24.56C35.626,26.68 34.893,28.626 33.653,30.16Z"
|
||||
android:fillColor="#001F11"/>
|
||||
<path
|
||||
android:pathData="M26.32,24.533C28.095,24.533 29.534,23.094 29.534,21.32C29.534,19.545 28.095,18.106 26.32,18.106C24.546,18.106 23.107,19.545 23.107,21.32C23.107,23.094 24.546,24.533 26.32,24.533Z"
|
||||
android:fillColor="#009E57"/>
|
||||
<path
|
||||
android:pathData="M33.653,30.16C32.013,32.2 29.493,33.52 26.666,33.52C23.613,33.52 20.906,31.986 19.293,29.653C20.786,27.346 23.373,25.813 26.32,25.813C28.626,25.813 30.72,26.746 32.24,28.266C32.8,28.826 33.28,29.466 33.653,30.16Z"
|
||||
android:fillColor="#009E57"/>
|
||||
<path
|
||||
android:pathData="M7.466,2.667H6.133C5.396,2.667 4.799,3.263 4.799,4V44C4.799,44.736 5.396,45.333 6.133,45.333H7.466C8.202,45.333 8.799,44.736 8.799,44V4C8.799,3.263 8.202,2.667 7.466,2.667Z"
|
||||
android:fillColor="#009E57"/>
|
||||
</group>
|
||||
</vector>
|
||||
59
android/navi-pay/src/main/res/drawable/np_widget_qr_scan.xml
Normal file
59
android/navi-pay/src/main/res/drawable/np_widget_qr_scan.xml
Normal file
@@ -0,0 +1,59 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="48"
|
||||
android:viewportHeight="48">
|
||||
<group>
|
||||
<clip-path
|
||||
android:pathData="M0,0h48v48h-48z"/>
|
||||
<group>
|
||||
<clip-path
|
||||
android:pathData="M14,14h20v20h-20z"/>
|
||||
<path
|
||||
android:pathData="M18.771,25.343V25.993C18.771,26.164 18.914,26.307 19.086,26.307H21.536C21.622,26.307 21.686,26.379 21.686,26.457V28.914C21.686,29.086 21.829,29.229 22,29.229H22.65C22.822,29.229 22.964,29.086 22.964,28.914V25.343C22.964,25.172 22.822,25.029 22.65,25.029H19.086C18.914,25.029 18.771,25.172 18.771,25.343Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M31.858,23.386L24.615,16.143H30.758C31.365,16.143 31.858,16.636 31.858,17.243V23.386Z"
|
||||
android:fillColor="#22D081"/>
|
||||
<path
|
||||
android:pathData="M31.471,28.093V30.757C31.471,31.364 30.979,31.857 30.371,31.857H27.693"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="0.942857"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M19.886,31.857H17.243C16.636,31.857 16.143,31.364 16.143,30.757V28.093"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="0.942857"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M16.143,20.272V17.629C16.143,17.022 16.636,16.529 17.243,16.529H19.886"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeWidth="0.942857"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#ffffff"
|
||||
android:strokeLineCap="round"/>
|
||||
<path
|
||||
android:pathData="M22.179,19.157H19.557C19.123,19.157 18.771,19.509 18.771,19.943V22.572C18.771,23.006 19.123,23.357 19.557,23.357H22.179C22.613,23.357 22.964,23.006 22.964,22.572V19.943C22.964,19.509 22.613,19.157 22.179,19.157Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M21.4,20.407H20.336C20.162,20.407 20.021,20.548 20.021,20.722V21.793C20.021,21.966 20.162,22.107 20.336,22.107H21.4C21.574,22.107 21.714,21.966 21.714,21.793V20.722C21.714,20.548 21.574,20.407 21.4,20.407Z"
|
||||
android:fillColor="#1F002A"/>
|
||||
<path
|
||||
android:pathData="M28.057,25.029H25.436C25.002,25.029 24.65,25.381 24.65,25.815V28.443C24.65,28.877 25.002,29.229 25.436,29.229H28.057C28.491,29.229 28.843,28.877 28.843,28.443V25.815C28.843,25.381 28.491,25.029 28.057,25.029Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M27.278,26.279H26.214C26.041,26.279 25.9,26.42 25.9,26.593V27.664C25.9,27.838 26.041,27.979 26.214,27.979H27.278C27.452,27.979 27.593,27.838 27.593,27.664V26.593C27.593,26.42 27.452,26.279 27.278,26.279Z"
|
||||
android:fillColor="#1F002A"/>
|
||||
<path
|
||||
android:pathData="M20.15,27.529H19.086C18.912,27.529 18.771,27.67 18.771,27.843V28.914C18.771,29.088 18.912,29.229 19.086,29.229H20.15C20.324,29.229 20.464,29.088 20.464,28.914V27.843C20.464,27.67 20.324,27.529 20.15,27.529Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M27.579,23.357H25.436C25.007,23.357 24.65,23.007 24.65,22.572V20.429L27.579,23.357Z"
|
||||
android:fillColor="#ffffff"/>
|
||||
</group>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -0,0 +1,28 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="48"
|
||||
android:viewportHeight="48">
|
||||
<group>
|
||||
<clip-path
|
||||
android:pathData="M0,0h48v48h-48z"/>
|
||||
<path
|
||||
android:pathData="M42.65,39.534V44.067H24.126V40.614H24.22C26.285,40.614 28.257,40.24 30.083,39.547H42.65V39.534Z"
|
||||
android:fillColor="#009E57"/>
|
||||
<path
|
||||
android:pathData="M47.69,42.467L43.263,46.507C42.877,46.867 42.25,46.587 42.25,46.067V37.534C42.25,37.014 42.877,36.734 43.263,37.094L47.69,41.134C48.09,41.494 48.09,42.107 47.69,42.467Z"
|
||||
android:fillColor="#009E57"/>
|
||||
<path
|
||||
android:pathData="M23.86,3.947V7.4C21.915,7.44 20.063,7.827 18.344,8.467H5.337V3.947H23.701C23.701,3.947 23.807,3.933 23.86,3.947Z"
|
||||
android:fillColor="#009E57"/>
|
||||
<path
|
||||
android:pathData="M0.3,6.867L4.727,10.907C5.113,11.267 5.74,10.987 5.74,10.467V1.934C5.74,1.414 5.113,1.134 4.727,1.494L0.3,5.534C-0.1,5.894 -0.1,6.507 0.3,6.867Z"
|
||||
android:fillColor="#009E57"/>
|
||||
<path
|
||||
android:pathData="M24.206,3.92C13.133,3.92 4.138,12.92 4.138,24C4.138,35.08 13.133,44.054 24.206,44.054C35.28,44.054 44.262,35.08 44.262,24C44.262,12.92 35.28,3.92 24.206,3.92ZM24.206,40.6C15.052,40.6 7.616,33.16 7.616,24C7.616,14.84 15.052,7.4 24.206,7.4C33.361,7.4 40.797,14.827 40.797,24C40.797,33.174 33.375,40.6 24.206,40.6Z"
|
||||
android:fillColor="#001F11"/>
|
||||
<path
|
||||
android:pathData="M24.207,9.6C16.251,9.6 9.815,16.04 9.815,24C9.815,31.96 16.251,38.4 24.207,38.4C32.162,38.4 38.599,31.947 38.599,24C38.599,16.054 32.162,9.6 24.207,9.6ZM28.351,20.6C27.858,20.587 27.365,20.6 26.885,20.6H26.726C26.726,20.6 25.726,24.36 21.808,24.56C23.767,27.094 25.713,29.614 27.672,32.147C27.618,32.16 25.073,32.067 25.073,32.067C23.261,29.694 19.543,24.867 19.543,24.827V23.374H20.769C21.342,23.374 21.902,23.32 22.448,23.147C23.274,22.894 23.94,22.44 24.34,21.667C24.513,21.334 24.607,20.987 24.633,20.6H18.997L20.076,19.014H24.447C24.327,18.814 23.701,17.814 22.475,17.574C21.995,17.494 21.502,17.454 21.022,17.427C20.356,17.4 19.69,17.427 19.01,17.427L20.049,15.84C23.128,15.854 29.364,15.854 29.404,15.854C29.391,15.894 28.351,17.427 28.351,17.427H25.926C25.926,17.427 25.966,17.494 25.993,17.52C26.299,17.92 26.686,19.014 26.806,19.014H29.417C29.417,19.014 28.445,20.6 28.351,20.6Z"
|
||||
android:fillColor="#001F11"/>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -8,7 +8,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:src="@drawable/ic_ps_scan_pay" />
|
||||
android:src="@drawable/np_widget_qr_scan" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="navi_pay_calendar_color">#FF1F002A</color>
|
||||
<color name="navi_pay_cta_primary">#1F002A</color>
|
||||
<color name="navi_pay_onSurfaceHighlight">#22A940</color>
|
||||
<color name="navi_pay_bgNotice">#FFF8EC</color>
|
||||
<color name="navi_pay_bgError">#FFEAEA</color>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<string name="credit_line_remove_success_title">Credit line removed successfully</string>
|
||||
<string name="yes">Yes</string>
|
||||
<string name="invalid_details_please_try_again">Invalid details. Please try again.</string>
|
||||
<string name="title_scan_and_pay">Scan & Pay</string>
|
||||
<string name="title_scan_and_pay">Scan & pay</string>
|
||||
<string name="send_money">Send money</string>
|
||||
<string name="np_transfer_now">Transfer now</string>
|
||||
<string name="send_money_to_bank">Send money to bank</string>
|
||||
@@ -839,4 +839,6 @@
|
||||
<string name="np_arc_ontime_failed_subtext">We apologise for the inconvenience</string>
|
||||
<string name="np_arc_ontime_recharge_failed_mainText">Recharge could not be processed</string>
|
||||
<string name="np_up_to">up to</string>
|
||||
<string name="np_pay_mobile_number">Pay mobile number</string>
|
||||
<string name="np_transaction_history">Transaction history</string>
|
||||
</resources>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="DatePickerDialogTheme" parent="Theme.AppCompat.Light.Dialog">
|
||||
<item name="colorAccent">@color/navi_pay_calendar_color</item>
|
||||
<item name="colorAccent">@color/navi_pay_cta_primary</item>
|
||||
</style>
|
||||
|
||||
<style name="NaviPayTransparentTheme" parent="Theme.AppCompat.NoActionBar">
|
||||
|
||||
62
android/navi-pay/src/prod/res/xml-v26/shortcuts.xml
Normal file
62
android/navi-pay/src/prod/res/xml-v26/shortcuts.xml
Normal file
@@ -0,0 +1,62 @@
|
||||
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<shortcut
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/np_widget_qr_scan_adaptive_icon"
|
||||
android:shortcutDisabledMessage="@string/title_scan_and_pay"
|
||||
android:shortcutId="scanAndPayStaticShortcutId"
|
||||
android:shortcutLongLabel="@string/title_scan_and_pay"
|
||||
android:shortcutShortLabel="@string/title_scan_and_pay">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="navipay://NAVI_PAY_QR_SCANNER_SCREEN"
|
||||
android:targetClass="com.navi.pay.entry.NaviPayActivity"
|
||||
android:targetPackage="com.naviapp">
|
||||
<extra
|
||||
android:name="needsResult"
|
||||
android:value="true" />
|
||||
<extra
|
||||
android:name="NaviPay_Widget_Clicked"
|
||||
android:value="NaviPay_ScanAndPay_App_Shortcut_Clicked" />
|
||||
</intent>
|
||||
</shortcut>
|
||||
<shortcut
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/np_widget_pay_to_contact"
|
||||
android:shortcutDisabledMessage="@string/np_pay_mobile_number"
|
||||
android:shortcutId="payToContactStaticShortcutId"
|
||||
android:shortcutLongLabel="@string/np_pay_mobile_number"
|
||||
android:shortcutShortLabel="@string/np_pay_mobile_number">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="navipay://NAVI_PAY_TO_CONTACTS"
|
||||
android:targetClass="com.navi.pay.entry.NaviPayActivity"
|
||||
android:targetPackage="com.naviapp">
|
||||
<extra
|
||||
android:name="needsResult"
|
||||
android:value="true" />
|
||||
<extra
|
||||
android:name="NaviPay_Widget_Clicked"
|
||||
android:value="NaviPay_PayToContact_App_Shortcut_Clicked" />
|
||||
</intent>
|
||||
</shortcut>
|
||||
<shortcut
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/np_widget_transaction_history"
|
||||
android:shortcutDisabledMessage="@string/np_transaction_history"
|
||||
android:shortcutId="transactionHistoryStaticShortcutId"
|
||||
android:shortcutLongLabel="@string/np_transaction_history"
|
||||
android:shortcutShortLabel="@string/np_transaction_history">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="navipay://NAVI_PAY_T_STORE"
|
||||
android:targetClass="com.navi.pay.entry.NaviPayActivity"
|
||||
android:targetPackage="com.naviapp">
|
||||
<extra
|
||||
android:name="needsResult"
|
||||
android:value="true" />
|
||||
<extra
|
||||
android:name="NaviPay_Widget_Clicked"
|
||||
android:value="NaviPay_TransactionHistory_App_Shortcut_Clicked" />
|
||||
</intent>
|
||||
</shortcut>
|
||||
</shortcuts>
|
||||
62
android/navi-pay/src/qa/res/xml-v26/shortcuts.xml
Normal file
62
android/navi-pay/src/qa/res/xml-v26/shortcuts.xml
Normal file
@@ -0,0 +1,62 @@
|
||||
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<shortcut
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/np_widget_qr_scan_adaptive_icon"
|
||||
android:shortcutDisabledMessage="@string/title_scan_and_pay"
|
||||
android:shortcutId="scanAndPayStaticShortcutId"
|
||||
android:shortcutLongLabel="@string/title_scan_and_pay"
|
||||
android:shortcutShortLabel="@string/title_scan_and_pay">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="navipay://NAVI_PAY_QR_SCANNER_SCREEN"
|
||||
android:targetClass="com.navi.pay.entry.NaviPayActivity"
|
||||
android:targetPackage="com.naviapp.dev">
|
||||
<extra
|
||||
android:name="needsResult"
|
||||
android:value="true" />
|
||||
<extra
|
||||
android:name="NaviPay_Widget_Clicked"
|
||||
android:value="NaviPay_ScanAndPay_App_Shortcut_Clicked" />
|
||||
</intent>
|
||||
</shortcut>
|
||||
<shortcut
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/np_widget_pay_to_contact"
|
||||
android:shortcutDisabledMessage="@string/np_pay_mobile_number"
|
||||
android:shortcutId="payToContactStaticShortcutId"
|
||||
android:shortcutLongLabel="@string/np_pay_mobile_number"
|
||||
android:shortcutShortLabel="@string/np_pay_mobile_number">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="navipay://NAVI_PAY_TO_CONTACTS"
|
||||
android:targetClass="com.navi.pay.entry.NaviPayActivity"
|
||||
android:targetPackage="com.naviapp.dev">
|
||||
<extra
|
||||
android:name="needsResult"
|
||||
android:value="true" />
|
||||
<extra
|
||||
android:name="NaviPay_Widget_Clicked"
|
||||
android:value="NaviPay_PayToContact_App_Shortcut_Clicked" />
|
||||
</intent>
|
||||
</shortcut>
|
||||
<shortcut
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/np_widget_transaction_history"
|
||||
android:shortcutDisabledMessage="@string/np_transaction_history"
|
||||
android:shortcutId="transactionHistoryStaticShortcutId"
|
||||
android:shortcutLongLabel="@string/np_transaction_history"
|
||||
android:shortcutShortLabel="@string/np_transaction_history">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="navipay://NAVI_PAY_T_STORE"
|
||||
android:targetClass="com.navi.pay.entry.NaviPayActivity"
|
||||
android:targetPackage="com.naviapp.dev">
|
||||
<extra
|
||||
android:name="needsResult"
|
||||
android:value="true" />
|
||||
<extra
|
||||
android:name="NaviPay_Widget_Clicked"
|
||||
android:value="NaviPay_TransactionHistory_App_Shortcut_Clicked" />
|
||||
</intent>
|
||||
</shortcut>
|
||||
</shortcuts>
|
||||
Reference in New Issue
Block a user