Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
App Lounge
Commits
24107a8d
Commit
24107a8d
authored
May 11, 2021
by
Aayush Gupta
Browse files
Apps: Bump to v1.3.0
parent
6374a3af
Changes
45
Hide whitespace changes
Inline
Side-by-side
app/build.gradle
View file @
24107a8d
plugins
{
id
'com.android.application'
id
'kotlin-android'
id
'kotlin-android-extensions'
id
'kotlin-kapt'
id
'kotlin-parcelize'
}
android
{
compileSdkVersion
29
buildToolsVersion
'
29
.0.
2
'
compileSdkVersion
30
buildToolsVersion
'
30
.0.
3
'
defaultConfig
{
applicationId
"foundation.e.apps"
minSdkVersion
25
targetSdkVersion
29
versionCode
10
versionName
"1.
2
.0"
versionName
"1.
3
.0"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
vectorDrawables
.
useSupportLibrary
=
true
}
signingConfigs
{
...
...
@@ -47,9 +46,7 @@ android {
lintOptions
{
lintConfig
file
(
"lint.xml"
)
disable
'MissingTranslation'
}
androidExtensions
{
experimental
=
true
disable
'NullSafeMutableLiveData'
}
aaptOptions
{
additionalParameters
'-I'
,
'app/e-ui-sdk.jar'
...
...
@@ -81,41 +78,25 @@ dependencies {
// Preference
implementation
"androidx.preference:preference-ktx:1.1.1"
// Lifecycle
implementation
"androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"
// Bouncy Castle
implementation
'org.bouncycastle:bcpg-jdk15on:1.60'
// GSON
implementation
'com.google.code.gson:gson:2.8.6'
// EventBus
implementation
'org.greenrobot:eventbus:3.2.0'
// Volley
implementation
"com.android.volley:volley:1.2.0"
// PhotoView
implementation
"com.github.chrisbanes:PhotoView:2.3.0"
// RoundedImageView
implementation
"com.makeramen:roundedimageview:2.3.0"
// RecyclerView
implementation
'androidx.recyclerview:recyclerview:1.2.0'
// WorkManager
implementation
'androidx.work:work-runtime:2.5.0'
implementation
'androidx.work:work-runtime
-ktx
:2.5.0'
// Android-Iconics
implementation
'com.mikepenz:iconics-core:3.1.0@aar'
implementation
'com.mikepenz:google-material-typeface:3.0.1.2.original@aar'
// Vectordrawable
def
vector_version
=
"1.1.0"
implementation
"androidx.vectordrawable:vectordrawable:$vector_version"
implementation
"androidx.vectordrawable:vectordrawable-animated:$vector_version"
// Lifecycle
def
lifecycle_version
=
"2.3.1"
implementation
"androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation
"androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
// Navigation component
def
nav_version
=
"2.3.5"
...
...
app/src/main/AndroidManifest.xml
View file @
24107a8d
...
...
@@ -75,6 +75,13 @@
android:launchMode=
"singleInstance"
android:theme=
"@style/AppTheme1"
android:windowSoftInputMode=
"adjustResize"
/>
<receiver
android:name=
".updates.UpdatesManager"
>
<intent-filter>
<action
android:name=
"android.intent.action.BOOT_COMPLETED"
/>
</intent-filter>
</receiver>
</application>
</manifest>
\ No newline at end of file
app/src/main/java/foundation/e/apps/MainActivity.kt
View file @
24107a8d
...
...
@@ -52,7 +52,7 @@ import foundation.e.apps.updates.UpdatesManager
import
foundation.e.apps.utils.Common
import
foundation.e.apps.utils.Constants
import
foundation.e.apps.utils.Constants.CURRENTLY_SELECTED_FRAGMENT_KEY
import
kotlin.properties.Delegates
class
MainActivity
:
AppCompatActivity
(),
BottomNavigationView
.
OnNavigationItemSelectedListener
,
ApplicationManagerServiceConnectionCallback
{
...
...
@@ -67,7 +67,7 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS
private
val
codeRequestPermissions
=
9527
var
doubleBackToExitPressedOnce
=
false
;
private
var
isReceiverRegistered
=
false
var
accentColorOS
=
0
private
var
accentColorOS
by
Delegates
.
notNull
<
Int
>()
init
{
instance
=
this
...
...
@@ -96,6 +96,9 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS
super
.
onCreate
(
savedInstanceState
)
setContentView
(
binding
.
root
)
accentColorOS
=
Common
.
getAccentColor
(
this
)
mActivity
=
this
disableCategoryIfOpenSource
()
...
...
@@ -114,9 +117,6 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS
Common
.
updateMicroGStatus
(
this
)
initialiseUpdatesWorker
()
// Show the home fragment by default
currentFragmentId
=
if
(
savedInstanceState
!=
null
&&
savedInstanceState
.
containsKey
(
CURRENTLY_SELECTED_FRAGMENT_KEY
))
{
...
...
@@ -129,7 +129,6 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS
setupLangReceiver
()
applicationManagerServiceConnection
.
bindService
(
this
)
getAccentColor
();
bottom_navigation_view_color
()
openSearchFragment
()
}
...
...
@@ -168,12 +167,6 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS
}
private
fun
initialiseUpdatesWorker
()
{
UpdatesManager
(
applicationContext
).
startWorker
()
}
override
fun
onServiceBind
(
applicationManager
:
ApplicationManager
)
{
initialiseFragments
(
applicationManager
)
selectFragment
(
currentFragmentId
,
null
)
...
...
@@ -341,17 +334,4 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS
}
},
2000
)
}
/*
* get Accent color from OS
*
* */
private
fun
getAccentColor
()
{
accentColorOS
=
this
.
getColor
(
R
.
color
.
colorAccent
);
}
}
app/src/main/java/foundation/e/apps/XAPK/ApksBean.kt
View file @
24107a8d
...
...
@@ -19,7 +19,7 @@ package foundation.e.apps.XAPK
import
android.annotation.SuppressLint
import
android.os.Parcelable
import
kotlinx.
android.
parcel.Parcelize
import
kotlinx.parcel
ize
.Parcelize
@SuppressLint
(
"ParcelCreator"
)
@Parcelize
...
...
app/src/main/java/foundation/e/apps/XAPK/AppFolder.kt
View file @
24107a8d
...
...
@@ -17,7 +17,6 @@
package
foundation.e.apps.XAPK
import
android.os.Environment
import
foundation.e.apps.BuildConfig
import
foundation.e.apps.MainActivity
import
java.io.File
...
...
app/src/main/java/foundation/e/apps/XAPK/FsUtils.kt
View file @
24107a8d
...
...
@@ -18,7 +18,6 @@
package
foundation.e.apps.XAPK
import
android.os.Environment
import
android.text.TextUtils
import
foundation.e.apps.MainActivity
import
java.io.File
...
...
@@ -37,7 +36,7 @@ object FsUtils {
}
fun
exists
(
filePath
:
String
?):
Boolean
{
return
!
TextUtils
.
isEmpty
(
filePath
)
&&
exists
(
File
(
filePath
))
return
if
(!
filePath
.
isNullOrEmpty
())
exists
(
File
(
filePath
))
else
false
}
fun
exists
(
file
:
File
?):
Boolean
{
...
...
app/src/main/java/foundation/e/apps/XAPK/InstallSplitApksActivity.kt
View file @
24107a8d
...
...
@@ -26,7 +26,7 @@ import android.os.Build
import
android.os.Handler
import
android.os.Looper
import
androidx.annotation.RequiresApi
import
com.makeramen.roundedimageview
.BuildConfig
import
foundation.e.apps
.BuildConfig
import
java.io.File
import
java.io.FileInputStream
import
java.io.IOException
...
...
app/src/main/java/foundation/e/apps/XAPK/IntentUtils.kt
View file @
24107a8d
...
...
@@ -19,7 +19,6 @@ package foundation.e.apps.XAPK
import
android.content.Context
import
android.content.Intent
import
android.os.Build
import
java.io.File
object
IntentUtils
{
...
...
app/src/main/java/foundation/e/apps/XAPK/LocaleUtils.kt
View file @
24107a8d
...
...
@@ -17,7 +17,6 @@
package
foundation.e.apps.XAPK
import
android.os.Build
import
android.os.LocaleList
import
android.text.TextUtils
import
java.util.*
...
...
app/src/main/java/foundation/e/apps/XAPK/UriUtils.kt
View file @
24107a8d
...
...
@@ -19,7 +19,6 @@ package foundation.e.apps.XAPK
import
android.content.Context
import
android.net.Uri
import
android.os.Build
import
androidx.core.content.FileProvider
import
foundation.e.apps.BuildConfig
import
java.io.File
...
...
app/src/main/java/foundation/e/apps/XAPK/XApkInstallUtils.kt
View file @
24107a8d
...
...
@@ -17,7 +17,6 @@
package
foundation.e.apps.XAPK
import
android.os.Build
import
android.os.Handler
import
android.os.Looper
import
androidx.annotation.MainThread
...
...
app/src/main/java/foundation/e/apps/api/GitlabDataRequest.kt
View file @
24107a8d
...
...
@@ -19,7 +19,7 @@ package foundation.e.apps.api
import
android.content.Context
import
com.google.gson.Gson
import
com.google.gson.JsonParser
import
com.google.gson.JsonParser
.parseReader
import
foundation.e.apps.application.model.Application
import
foundation.e.apps.application.model.data.BasicData
import
foundation.e.apps.application.model.release.ReleaseData
...
...
@@ -35,7 +35,7 @@ class GitlabDataRequest {
val
url
=
Constants
.
RELEASE_API
+
Constants
.
MICROG_ID
+
Constants
.
RELEASE_ENDPOINT
val
urlConnection
=
Common
.
createConnection
(
url
,
Constants
.
REQUEST_METHOD_GET
)
val
isr
=
InputStreamReader
(
urlConnection
.
inputStream
)
val
element
=
JsonParser
().
parse
(
isr
)
val
element
=
parseReader
(
isr
)
val
releaseList
:
List
<
ReleaseData
>
=
Gson
().
fromJson
(
element
.
toString
(),
Array
<
ReleaseData
>
::
class
.
java
).
toList
()
...
...
app/src/main/java/foundation/e/apps/application/ApplicationActivity.kt
View file @
24107a8d
...
...
@@ -24,6 +24,8 @@ import android.content.Intent
import
android.content.pm.PackageManager
import
android.graphics.Bitmap
import
android.graphics.Color
import
android.graphics.PorterDuff
import
android.graphics.PorterDuffColorFilter
import
android.os.Bundle
import
android.os.CountDownTimer
import
android.text.Html
...
...
@@ -57,6 +59,7 @@ import foundation.e.apps.applicationmanager.ApplicationManager
import
foundation.e.apps.applicationmanager.ApplicationManagerServiceConnection
import
foundation.e.apps.applicationmanager.ApplicationManagerServiceConnectionCallback
import
foundation.e.apps.categories.category.CategoryActivity
import
foundation.e.apps.databinding.ActivityApplicationBinding
import
foundation.e.apps.pwa.PwaInstaller
import
foundation.e.apps.utils.Common
import
foundation.e.apps.utils.Common.toMiB
...
...
@@ -66,35 +69,38 @@ import foundation.e.apps.utils.Constants.APPLICATION_PACKAGE_NAME_KEY
import
foundation.e.apps.utils.Constants.SELECTED_APPLICATION_SCREENSHOT_KEY
import
foundation.e.apps.utils.Error
import
foundation.e.apps.utils.Execute
import
kotlinx.android.synthetic.main.activity_application.*
import
kotlinx.android.synthetic.main.install_button_layout.*
import
kotlin.math.roundToInt
class
ApplicationActivity
:
AppCompatActivity
(),
ApplicationStateListener
,
ApplicationManagerServiceConnectionCallback
,
Downloader
.
DownloadProgressCallback
,
BasicData
.
IconLoaderCallback
,
PwasBasicData
.
IconLoaderCallback
{
AppCompatActivity
(),
ApplicationStateListener
,
ApplicationManagerServiceConnectionCallback
,
Downloader
.
DownloadProgressCallback
,
BasicData
.
IconLoaderCallback
,
PwasBasicData
.
IconLoaderCallback
{
private
lateinit
var
binding
:
ActivityApplicationBinding
private
lateinit
var
applicationPackageName
:
String
private
lateinit
var
application
:
Application
private
val
applicationManagerServiceConnection
=
ApplicationManagerServiceConnection
(
this
)
ApplicationManagerServiceConnection
(
this
)
private
var
imageWidth
=
0
private
var
imageHeight
=
0
private
var
imageMargin
=
0
private
var
defaultElevation
=
0f
private
val
sharedPrefFile
=
"kotlinsharedpreference"
var
accentColorOS
=
0
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
binding
=
ActivityApplicationBinding
.
inflate
(
layoutInflater
)
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_application
)
good_border
.
visibility
=
View
.
GONE
neutral_border
.
visibility
=
View
.
GONE
setContentView
(
binding
.
root
)
val
accentColorOS
=
Common
.
getAccentColor
(
this
)
binding
.
goodBorder
.
visibility
=
View
.
GONE
binding
.
neutralBorder
.
visibility
=
View
.
GONE
val
toolbar
=
findViewById
<
Toolbar
>(
R
.
id
.
toolbar
)
...
...
@@ -103,7 +109,7 @@ class ApplicationActivity :
supportActionBar
?.
setDisplayShowTitleEnabled
(
false
)
sharedPreferences
=
this
.
getSharedPreferences
(
sharedPrefFile
,
Context
.
MODE_PRIVATE
)
pwa
_s
ympol
.
visibility
=
View
.
GONE
binding
.
pwa
S
ympol
.
visibility
=
View
.
GONE
initialiseDimensions
()
val
applicationPackageName
:
String
?
=
intent
.
getStringExtra
(
APPLICATION_PACKAGE_NAME_KEY
)
...
...
@@ -112,27 +118,28 @@ class ApplicationActivity :
applicationManagerServiceConnection
.
bindService
(
this
)
}
getAccentColor
()
app_install
.
setTextColor
(
Color
.
parseColor
(
"#ffffff"
))
app_install
.
setBackgroundColor
(
accentColorOS
)
app_category
.
setTextColor
(
accentColorOS
)
app_expand_description
.
setTextColor
(
accentColorOS
)
// Set accent color
binding
.
installButtonLayout
.
appInstall
.
setTextColor
(
Color
.
parseColor
(
"#ffffff"
))
binding
.
installButtonLayout
.
appInstall
.
background
.
colorFilter
=
PorterDuffColorFilter
(
accentColorOS
,
PorterDuff
.
Mode
.
SRC_IN
)
binding
.
appDownloadProgress
.
progressDrawable
.
colorFilter
=
PorterDuffColorFilter
(
accentColorOS
,
PorterDuff
.
Mode
.
SRC_IN
)
binding
.
appCategory
.
setTextColor
(
accentColorOS
)
binding
.
appExpandDescription
.
setTextColor
(
accentColorOS
)
}
private
fun
initialiseElevation
()
{
if
(
scroll
_v
iew
.
scrollY
==
0
)
{
toolbar
.
elevation
=
0f
if
(
binding
.
scroll
V
iew
.
scrollY
==
0
)
{
binding
.
toolbar
.
elevation
=
0f
}
else
{
toolbar
.
elevation
=
defaultElevation
binding
.
toolbar
.
elevation
=
defaultElevation
}
scroll
_v
iew
.
setOnScrollChangeListener
{
view
,
_
,
_
,
_
,
_
->
binding
.
scroll
V
iew
.
setOnScrollChangeListener
{
view
,
_
,
_
,
_
,
_
->
if
(
view
.
scrollY
==
0
)
{
toolbar
.
elevation
=
0f
binding
.
toolbar
.
elevation
=
0f
}
else
{
toolbar
.
elevation
=
defaultElevation
binding
.
toolbar
.
elevation
=
defaultElevation
}
}
}
...
...
@@ -141,28 +148,28 @@ class ApplicationActivity :
application
=
applicationManager
.
findOrCreateApp
(
applicationPackageName
)
var
error
:
Error
?
=
null
Execute
({
error
=
application
.
assertFullData
(
this
)
},
{
if
(
error
==
null
)
{
error
=
application
.
assertFullData
(
this
)
},
{
if
(
error
==
null
)
{
onApplicationInfoLoaded
()
}
else
{
Snackbar
.
make
(
container
,
getString
(
error
!!
.
description
),
Snackbar
.
LENGTH_LONG
).
show
()
// Close activity once snackbar has hidden
object
:
CountDownTimer
(
3500
,
3500
)
{
override
fun
onTick
(
p0
:
Long
)
{
// Do nothing
}
onApplicationInfoLoaded
()
}
else
{
Snackbar
.
make
(
binding
.
container
,
getString
(
error
!!
.
description
),
Snackbar
.
LENGTH_LONG
).
show
()
// Close activity once snackbar has hidden
object
:
CountDownTimer
(
3500
,
3500
)
{
override
fun
onTick
(
p0
:
Long
)
{
// Do nothing
}
override
fun
onFinish
()
{
finish
()
override
fun
onFinish
()
{
finish
()
}
}.
start
()
}
}.
start
()
}
})
})
}
override
fun
onCreateOptionsMenu
(
menu
:
Menu
?):
Boolean
{
...
...
@@ -170,8 +177,8 @@ class ApplicationActivity :
return
true
}
override
fun
onOptionsItemSelected
(
item
:
MenuItem
?
):
Boolean
{
when
(
item
?
.
itemId
)
{
override
fun
onOptionsItemSelected
(
item
:
MenuItem
):
Boolean
{
when
(
item
.
itemId
)
{
android
.
R
.
id
.
home
->
{
finish
()
}
...
...
@@ -217,57 +224,56 @@ class ApplicationActivity :
// Set the app title
if
(
basicData
.
name
.
isNotEmpty
())
{
app
_t
itle
.
text
=
basicData
.
name
binding
.
app
T
itle
.
text
=
basicData
.
name
}
else
{
app
_t
itle
.
visibility
=
View
.
GONE
binding
.
app
T
itle
.
visibility
=
View
.
GONE
}
// Set the app author
if
(
basicData
.
author
.
isNotEmpty
())
{
app
_a
uthor
.
text
=
basicData
.
author
binding
.
app
A
uthor
.
text
=
basicData
.
author
}
else
{
app
_a
uthor
.
visibility
=
View
.
GONE
binding
.
app
A
uthor
.
visibility
=
View
.
GONE
}
// Set the app category
if
(
fullData
.
category
.
getTitle
().
isNotEmpty
())
{
app
_c
ategory
.
text
=
fullData
.
category
.
getTitle
()
app
_c
ategory
.
setOnClickListener
{
binding
.
app
C
ategory
.
text
=
fullData
.
category
.
getTitle
()
binding
.
app
C
ategory
.
setOnClickListener
{
startActivity
(
Intent
(
this
,
CategoryActivity
::
class
.
java
).
apply
{
putExtra
(
Constants
.
CATEGORY_KEY
,
fullData
.
category
)
})
}
}
else
{
app
_c
ategory
.
visibility
=
View
.
GONE
binding
.
app
C
ategory
.
visibility
=
View
.
GONE
}
// Set the app description
if
(
fullData
.
description
.
isNotEmpty
())
{
app
_d
escription
.
text
=
fullData
.
description
app
_d
escription
_c
ontainer
.
isEnabled
=
true
binding
.
app
D
escription
.
text
=
fullData
.
description
binding
.
app
D
escription
C
ontainer
.
isEnabled
=
true
}
else
{
app
_d
escription
.
text
=
getString
(
R
.
string
.
not_available_full
)
app
_d
escription
_c
ontainer
.
isEnabled
=
false
binding
.
app
D
escription
.
text
=
getString
(
R
.
string
.
not_available_full
)
binding
.
app
D
escription
C
ontainer
.
isEnabled
=
false
}
// Handle clicks on description
app
_d
escription
_c
ontainer
.
setOnClickListener
{
binding
.
app
D
escription
C
ontainer
.
setOnClickListener
{
val
intent
=
Intent
(
this
,
ApplicationDescriptionActivity
::
class
.
java
)
intent
.
putExtra
(
APPLICATION_DESCRIPTION_KEY
,
application
.
fullData
!!
.
description
)
startActivity
(
intent
)
}
// Set the app rating
val
builder
=
textColorChange
(
getText
(
R
.
string
.
not_available
).
toString
())
if
(
basicData
.
ratings
.
rating
!=
-
1f
)
{
app
_r
ating
.
text
=
basicData
.
ratings
.
rating
.
toString
()
+
"/5"
binding
.
app
R
ating
.
text
=
basicData
.
ratings
.
rating
.
toString
()
+
"/5"
}
else
{
app
_r
ating
.
text
=
builder
binding
.
app
R
ating
.
text
=
textColorChange
(
getText
(
R
.
string
.
not_available
).
toString
())
}
setRatingBorder
(
basicData
.
ratings
.
rating
)
app
_r
ating
_c
ontainer
.
setOnClickListener
{
binding
.
app
R
ating
C
ontainer
.
setOnClickListener
{
val
alertDialog
=
AlertDialog
.
Builder
(
this
).
create
()
alertDialog
.
setIcon
(
R
.
drawable
.
ic_app_rating
)
...
...
@@ -289,31 +295,29 @@ class ApplicationActivity :
//Set the app licence
if
(
fullData
.
licence
.
isNotEmpty
())
{
app
_l
icence
.
text
=
fullData
.
licence
binding
.
app
L
icence
.
text
=
fullData
.
licence
}
else
{
app
_l
icence
.
text
=
getString
(
R
.
string
.
not_available
)
binding
.
app
L
icence
.
text
=
getString
(
R
.
string
.
not_available
)
}
if
(
fullData
.
getLastVersion
()
!=
null
)
{
// Set app size
if
(
fullData
.
getLastVersion
()
!!
.
fileSize
.
isNotEmpty
())
{
app
_s
ize
.
text
=
fullData
.
getLastVersion
()
!!
.
fileSize
binding
.
app
S
ize
.
text
=
fullData
.
getLastVersion
()
!!
.
fileSize
}
else
{
app
_s
ize
.
visibility
=
View
.
GONE
binding
.
app
S
ize
.
visibility
=
View
.
GONE
}
// Set the app privacy rating
val
builder
=
textColorChange
(
getText
(
R
.
string
.
not_available
).
toString
())
if
(
fullData
.
getLastVersion
()
!!
.
privacyRating
!=
null
&&
fullData
.
getLastVersion
()
!!
.
privacyRating
!=
-
1
)
{
app
_p
rivacy
_s
core
.
text
=
fullData
.
getLastVersion
()
!!
.
privacyRating
.
toString
()
+
"/10"
fullData
.
getLastVersion
()
!!
.
privacyRating
!=
-
1
)
{
binding
.
app
P
rivacy
S
core
.
text
=
fullData
.
getLastVersion
()
!!
.
privacyRating
.
toString
()
+
"/10"
setPrivacyRatingBorder
(
fullData
.
getLastVersion
()
!!
.
privacyRating
!!
)
}
else
{
app
_p
rivacy
_s
core
.
text
=
builder
binding
.
app
P
rivacy
S
core
.
text
=
textColorChange
(
getText
(
R
.
string
.
not_available
).
toString
())
setPrivacyRatingBorder
(-
1
)
}
app
_p
rivacy
_c
ontainer
.
setOnClickListener
{
binding
.
app
P
rivacy
C
ontainer
.
setOnClickListener
{
val
message
=
layoutInflater
.
inflate
(
R
.
layout
.
privacy_dialog_message
,
null
)
as
TextView
...
...
@@ -338,40 +342,39 @@ class ApplicationActivity :
// Set app version
if
(
fullData
.
getLastVersion
()
!!
.
version
.
isNotEmpty
())
{
app
_v
ersion
.
text
=
fullData
.
getLastVersion
()
!!
.
version
binding
.
app
V
ersion
.
text
=
fullData
.
getLastVersion
()
!!
.
version
}
else
{
app
_v
ersion
.
text
=
getString
(
R
.
string
.
not_available
)
binding
.
app
V
ersion
.
text
=
getString
(
R
.
string
.
not_available
)
}
// Set app package name.
if
(
fullData
.
packageName
.
isNotEmpty
())
{
app
_p
ackage
_n
ame
.
text
=
fullData
.
packageName
binding
.
app
P
ackage
N
ame
.
text
=
fullData
.
packageName
}
else
{
app
_p
ackage
_n
ame
.
text
=
getString
(
R
.
string
.
not_available
)
binding
.
app
P
ackage
N
ame
.
text
=
getString
(
R
.
string
.
not_available
)
}
// Set app update timestamp
if
(
fullData
.
getLastVersion
()
!!
.
createdOn
.
isNotEmpty
())
{
app
_u
pdated
_o
n
.
text
=
getFormattedTimestamp
(
fullData
.
getLastVersion
()
!!
.
createdOn
)
binding
.
app
U
pdated
O
n
.
text
=
getFormattedTimestamp
(
fullData
.
getLastVersion
()
!!
.
createdOn
)
}
else
{
app
_u
pdated
_o
n
.
text
=
getString
(
R
.
string
.
not_available
)
binding
.
app
U
pdated
O
n
.
text
=
getString
(
R
.
string
.
not_available
)
}
// Set app minimum required Android version
if
(
fullData
.
getLastVersion
()
!!
.
minAndroid
.
isNotEmpty
())
{
app_min_a
ndroid
.
text
=