Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
location share white
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
location share white
Commits
c357bb44
Commit
c357bb44
authored
Dec 04, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
cfd8ca08
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
138 additions
and
57 deletions
+138
-57
proguard-rules.pro
app/proguard-rules.pro
+6
-1
AdsMgr.kt
app/src/main/java/com/base/locationsharewhite/ads/AdsMgr.kt
+2
-2
ConstConfig.kt
.../main/java/com/base/locationsharewhite/ads/ConstConfig.kt
+5
-5
AdInsertMgr.kt
...java/com/base/locationsharewhite/ads/admob/AdInsertMgr.kt
+1
-1
AdConfigBean.kt
...a/com/base/locationsharewhite/bean/config/AdConfigBean.kt
+1
-1
ConfigBean.kt
...ava/com/base/locationsharewhite/bean/config/ConfigBean.kt
+1
-1
PopupConfigBean.kt
...om/base/locationsharewhite/bean/config/PopupConfigBean.kt
+1
-1
PopupConstObject.kt
.../java/com/base/locationsharewhite/fcm/PopupConstObject.kt
+1
-1
MyApplication.kt
.../java/com/base/locationsharewhite/helper/MyApplication.kt
+1
-1
LocationShareUtils.kt
...om/base/locationsharewhite/location/LocationShareUtils.kt
+1
-0
LocationMapActivity.kt
.../locationsharewhite/ui/locationmap/LocationMapActivity.kt
+26
-8
LocationCodeActivity.kt
...m/base/locationsharewhite/ui/main/LocationCodeActivity.kt
+2
-0
LocationShareActivity.kt
.../base/locationsharewhite/ui/main/LocationShareActivity.kt
+61
-22
MainActivity.kt
.../java/com/base/locationsharewhite/ui/main/MainActivity.kt
+1
-1
RenameActivity.kt
...java/com/base/locationsharewhite/ui/set/RenameActivity.kt
+4
-4
ToastUtils.kt
...main/java/com/base/locationsharewhite/utils/ToastUtils.kt
+2
-2
activity_location_code.xml
app/src/main/res/layout/activity_location_code.xml
+5
-0
activity_location_share.xml
app/src/main/res/layout/activity_location_share.xml
+16
-5
build.gradle.kts
build.gradle.kts
+1
-1
smartcl.jks
smartcl.jks
+0
-0
No files found.
app/proguard-rules.pro
View file @
c357bb44
...
@@ -19,11 +19,16 @@
...
@@ -19,11 +19,16 @@
# If you keep the line number information, uncomment this to
# If you keep the line number information, uncomment this to
# hide the original source file name.
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile
-
dontwarn
javax
.
annotation
.
Nullable
-
keep
class
com
.
base
.
locationsharewhite
.
bean
.
**
{
*
;
}
-
keep
class
com
.
base
.
locationsharewhite
.
bean
.
**
{
*
;
}
-
keep
class
com
.
google
.
gson
.
reflect
.
**
{
*
;
}
-
keep
class
com
.
google
.
gson
.
reflect
.
**
{
*
;
}
-
keep
class
*
extends
com
.
google
.
gson
.
reflect
.
TypeToken
-
keep
class
com
.
google
.
gson
.
stream
.
**
{
*
;
}
-
keep
class
com
.
google
.
gson
.
stream
.
**
{
*
;
}
-
keep
class
com
.
squareup
.
okhttp
.
**
{
*
;
}
-
keepattributes
*
Annotation
*
-
keepattributes
*
Annotation
*
-
keep
class
*
extends
com
.
google
.
gson
.
TypeAdapter
-
keep
class
*
extends
com
.
google
.
gson
.
TypeAdapter
-
keep
class
*
extends
com
.
google
.
gson
.
JsonSerializer
-
keep
class
*
extends
com
.
google
.
gson
.
JsonSerializer
-
keep
class
*
extends
com
.
google
.
gson
.
Deserializer
-
keep
class
*
extends
com
.
google
.
gson
.
Deserializer
-
keep
class
com
.
google
.
gson
.
TypeAdapters
{
*
;}
-
keep
class
com
.
google
.
gson
.
TypeAdapters
{
*
;}
-
keep
class
com
.
bytedance
.
sdk
.
**
{
*
;
}
app/src/main/java/com/base/locationsharewhite/ads/AdsMgr.kt
View file @
c357bb44
...
@@ -17,8 +17,8 @@ import com.base.locationsharewhite.ads.applovin.AdMaxEvent
...
@@ -17,8 +17,8 @@ import com.base.locationsharewhite.ads.applovin.AdMaxEvent
import
com.base.locationsharewhite.ads.applovin.MaxInsertMgr
import
com.base.locationsharewhite.ads.applovin.MaxInsertMgr
import
com.base.locationsharewhite.ads.applovin.MaxNativeMgr
import
com.base.locationsharewhite.ads.applovin.MaxNativeMgr
import
com.base.locationsharewhite.ads.applovin.MaxOpenMgr
import
com.base.locationsharewhite.ads.applovin.MaxOpenMgr
import
com.base.locationsharewhite.config.AdConfigBean
import
com.base.locationsharewhite.
bean.
config.AdConfigBean
import
com.base.locationsharewhite.config.ConfigBean.Companion.configBean
import
com.base.locationsharewhite.
bean.
config.ConfigBean.Companion.configBean
import
com.base.locationsharewhite.helper.EventUtils
import
com.base.locationsharewhite.helper.EventUtils
import
com.base.locationsharewhite.utils.AppPreferences
import
com.base.locationsharewhite.utils.AppPreferences
import
com.base.locationsharewhite.utils.LogEx
import
com.base.locationsharewhite.utils.LogEx
...
...
app/src/main/java/com/base/locationsharewhite/ads/ConstConfig.kt
View file @
c357bb44
...
@@ -21,15 +21,15 @@ object ConstConfig {
...
@@ -21,15 +21,15 @@ object ConstConfig {
//admob test id
//admob test id
const
val
OPEN_ADMOB_ID_TEST
=
"ca-app-pub-3940256099942544/9257395921"
const
val
OPEN_ADMOB_ID_TEST
=
"ca-app-pub-3940256099942544/9257395921"
const
val
BANNER_ADMOB_ID_TEST
=
"ca-app-pub-3940256099942544/9214589741"
const
val
INTER_ADMOB_ID_TEST
=
"ca-app-pub-3940256099942544/1033173712"
const
val
INTER_ADMOB_ID_TEST
=
"ca-app-pub-3940256099942544/1033173712"
const
val
NATIVE_ADMOB_ID_TEST
=
"ca-app-pub-3940256099942544/2247696110"
const
val
NATIVE_ADMOB_ID_TEST
=
"ca-app-pub-3940256099942544/2247696110"
const
val
BANNER_ADMOB_ID_TEST
=
"ca-app-pub-3940256099942544/9214589741"
// admob广告id
// admob广告id
const
val
INTER_ADMOB_ID
=
"ca-app-pub-7560983767776658/706978694
1"
const
val
OPEN_ADMOB_ID
=
"ca-app-pub-3940256099942544/925739592
1"
const
val
NATIVE_ADMOB_ID
=
"ca-app-pub-7560983767776658/5561264154
"
const
val
INTER_ADMOB_ID
=
"ca-app-pub-3940256099942544/1033173712
"
const
val
OPEN_ADMOB_ID
=
"ca-app-pub-7560983767776658/950437859
0"
const
val
NATIVE_ADMOB_ID
=
"ca-app-pub-3940256099942544/224769611
0"
const
val
BANNER_ADMOB_ID
=
"ca-app-pub-
7560983767776658/7704383208
"
const
val
BANNER_ADMOB_ID
=
"ca-app-pub-
3940256099942544/9214589741
"
const
val
MAX_SDK_KEY
=
const
val
MAX_SDK_KEY
=
...
...
app/src/main/java/com/base/locationsharewhite/ads/admob/AdInsertMgr.kt
View file @
c357bb44
...
@@ -76,7 +76,7 @@ class AdInsertMgr {
...
@@ -76,7 +76,7 @@ class AdInsertMgr {
override
fun
onAdShowedFullScreenContent
()
{
override
fun
onAdShowedFullScreenContent
()
{
super
.
onAdShowedFullScreenContent
()
super
.
onAdShowedFullScreenContent
()
adState
.
onAdDisplayed
()
adState
.
onAdDisplayed
()
this
@AdInsertMgr
.
showCallBack
?.
show
()
showCallBack
?.
show
()
(
adEvent
as
AdmobEvent
).
showAd
(
responseInfo
,
activity
)
(
adEvent
as
AdmobEvent
).
showAd
(
responseInfo
,
activity
)
LimitUtils
.
addDisplayNum
()
LimitUtils
.
addDisplayNum
()
}
}
...
...
app/src/main/java/com/base/locationsharewhite/config/AdConfigBean.kt
→
app/src/main/java/com/base/locationsharewhite/
bean/
config/AdConfigBean.kt
View file @
c357bb44
package
com.base.locationsharewhite.config
package
com.base.locationsharewhite.
bean.
config
class
AdConfigBean
(
class
AdConfigBean
(
var
adSwitch
:
Boolean
=
true
,
//true 走admob,false走max
var
adSwitch
:
Boolean
=
true
,
//true 走admob,false走max
...
...
app/src/main/java/com/base/locationsharewhite/config/ConfigBean.kt
→
app/src/main/java/com/base/locationsharewhite/
bean/
config/ConfigBean.kt
View file @
c357bb44
package
com.base.locationsharewhite.config
package
com.base.locationsharewhite.
bean.
config
/**
/**
...
...
app/src/main/java/com/base/locationsharewhite/config/PopupConfigBean.kt
→
app/src/main/java/com/base/locationsharewhite/
bean/
config/PopupConfigBean.kt
View file @
c357bb44
package
com.base.locationsharewhite.config
package
com.base.locationsharewhite.
bean.
config
class
PopupConfigBean
(
class
PopupConfigBean
(
...
...
app/src/main/java/com/base/locationsharewhite/fcm/PopupConstObject.kt
View file @
c357bb44
package
com.base.locationsharewhite.fcm
package
com.base.locationsharewhite.fcm
import
com.base.locationsharewhite.config.PopupConfigBean
import
com.base.locationsharewhite.
bean.
config.PopupConfigBean
object
PopupConstObject
{
object
PopupConstObject
{
...
...
app/src/main/java/com/base/locationsharewhite/helper/MyApplication.kt
View file @
c357bb44
...
@@ -8,7 +8,7 @@ import android.content.Intent
...
@@ -8,7 +8,7 @@ import android.content.Intent
import
android.os.Bundle
import
android.os.Bundle
import
android.text.TextUtils
import
android.text.TextUtils
import
android.util.Log
import
android.util.Log
import
com.base.locationsharewhite.config.ConfigBean
import
com.base.locationsharewhite.
bean.
config.ConfigBean
import
com.base.locationsharewhite.ads.AdsMgr
import
com.base.locationsharewhite.ads.AdsMgr
import
com.base.locationsharewhite.bean.ConstObject.appLanguageCountrySp
import
com.base.locationsharewhite.bean.ConstObject.appLanguageCountrySp
import
com.base.locationsharewhite.bean.ConstObject.appLanguageSp
import
com.base.locationsharewhite.bean.ConstObject.appLanguageSp
...
...
app/src/main/java/com/base/locationsharewhite/location/LocationShareUtils.kt
View file @
c357bb44
...
@@ -52,6 +52,7 @@ object LocationShareUtils {
...
@@ -52,6 +52,7 @@ object LocationShareUtils {
LogEx
.
logDebug
(
TAG
,
"paramJson=$paramJson"
)
LogEx
.
logDebug
(
TAG
,
"paramJson=$paramJson"
)
runCatching
{
runCatching
{
val
result
=
ReportUtils
.
doPost
(
url
,
HashMap
(),
paramJson
)
val
result
=
ReportUtils
.
doPost
(
url
,
HashMap
(),
paramJson
)
LogEx
.
logDebug
(
TAG
,
"result=$result"
)
val
responseData
=
extractData
(
result
)
val
responseData
=
extractData
(
result
)
if
(
responseData
!=
null
)
{
if
(
responseData
!=
null
)
{
val
state
=
AESHelper
.
decrypt
(
responseData
).
toInt
()
val
state
=
AESHelper
.
decrypt
(
responseData
).
toInt
()
...
...
app/src/main/java/com/base/locationsharewhite/ui/locationmap/LocationMapActivity.kt
View file @
c357bb44
...
@@ -11,6 +11,8 @@ import androidx.activity.addCallback
...
@@ -11,6 +11,8 @@ import androidx.activity.addCallback
import
androidx.lifecycle.lifecycleScope
import
androidx.lifecycle.lifecycleScope
import
com.base.locationsharewhite.BuildConfig
import
com.base.locationsharewhite.BuildConfig
import
com.base.locationsharewhite.R
import
com.base.locationsharewhite.R
import
com.base.locationsharewhite.ads.AdsMgr
import
com.base.locationsharewhite.ads.AdsShowCallBack
import
com.base.locationsharewhite.bean.ConstObject
import
com.base.locationsharewhite.bean.ConstObject
import
com.base.locationsharewhite.bean.ViewingBean
import
com.base.locationsharewhite.bean.ViewingBean
import
com.base.locationsharewhite.databinding.ActivityLocationMapBinding
import
com.base.locationsharewhite.databinding.ActivityLocationMapBinding
...
@@ -106,10 +108,10 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
...
@@ -106,10 +108,10 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
LocationShareListUtils
.
deleteShare
(
viewingBean
.
device
)
{
result
->
LocationShareListUtils
.
deleteShare
(
viewingBean
.
device
)
{
result
->
runOnUiThread
{
runOnUiThread
{
if
(
result
)
{
if
(
result
)
{
toast
(
"delete success"
)
toast
(
"delete success"
,
true
)
binding
.
ivRefresh
.
callOnClick
()
binding
.
ivRefresh
.
callOnClick
()
}
else
{
}
else
{
toast
(
"delete failed"
)
toast
(
"delete failed"
,
true
)
}
}
}
}
}
}
...
@@ -220,18 +222,34 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
...
@@ -220,18 +222,34 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
changeMyLocation
(
locationPresenter
.
getMyLocation
(),
true
,
true
,
true
)
changeMyLocation
(
locationPresenter
.
getMyLocation
(),
true
,
true
,
true
)
}
}
binding
.
ivRefresh
.
setOnClickListener
{
binding
.
ivRefresh
.
setOnClickListener
{
startRefreshAnimation
()
AdsMgr
.
showInsert
(
this
,
false
,
object
:
AdsShowCallBack
()
{
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
override
fun
close
(
where
:
Int
)
{
delay
(
2000
)
startRefresh
()
stopRefreshAnimation
()
}
}
initViewingData
()
override
fun
failed
(
where
:
Int
)
{
startRefresh
()
}
override
fun
googleFailed
(
where
:
Int
)
{
startRefresh
()
}
})
}
}
binding
.
bottomSheet
.
setOnClickListener
{
}
binding
.
bottomSheet
.
setOnClickListener
{
}
binding
.
ivPermission
.
setOnClickListener
{
binding
.
ivPermission
.
setOnClickListener
{
requestLocationAllowAllTime
(
launcher
,
jumpOutAction
=
{},
permissionAllowAction
=
{})
requestLocationAllowAllTime
(
launcher
,
jumpOutAction
=
{},
permissionAllowAction
=
{})
}
}
}
fun
startRefresh
()
{
startRefreshAnimation
()
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
delay
(
2000
)
stopRefreshAnimation
()
}
initViewingData
()
}
}
private
var
valueAnimator
:
ValueAnimator
?
=
null
private
var
valueAnimator
:
ValueAnimator
?
=
null
...
...
app/src/main/java/com/base/locationsharewhite/ui/main/LocationCodeActivity.kt
View file @
c357bb44
...
@@ -4,6 +4,7 @@ import android.graphics.Color
...
@@ -4,6 +4,7 @@ import android.graphics.Color
import
androidx.activity.addCallback
import
androidx.activity.addCallback
import
androidx.core.view.updatePadding
import
androidx.core.view.updatePadding
import
com.base.locationsharewhite.R
import
com.base.locationsharewhite.R
import
com.base.locationsharewhite.ads.AdsMgr
import
com.base.locationsharewhite.databinding.ActivityLocationCodeBinding
import
com.base.locationsharewhite.databinding.ActivityLocationCodeBinding
import
com.base.locationsharewhite.helper.BaseActivity
import
com.base.locationsharewhite.helper.BaseActivity
import
com.base.locationsharewhite.location.LocationLoginUtils
import
com.base.locationsharewhite.location.LocationLoginUtils
...
@@ -29,6 +30,7 @@ class LocationCodeActivity : BaseActivity<ActivityLocationCodeBinding>() {
...
@@ -29,6 +30,7 @@ class LocationCodeActivity : BaseActivity<ActivityLocationCodeBinding>() {
copyText
(
"MyLocationCode"
,
binding
.
tvCode
.
text
.
toString
())
copyText
(
"MyLocationCode"
,
binding
.
tvCode
.
text
.
toString
())
toast
(
resources
.
getString
(
R
.
string
.
copy
))
toast
(
resources
.
getString
(
R
.
string
.
copy
))
}
}
AdsMgr
.
showNative
(
binding
.
flAd
,
R
.
layout
.
layout_admob_app_exit
,)
}
}
override
fun
initListener
()
{
override
fun
initListener
()
{
...
...
app/src/main/java/com/base/locationsharewhite/ui/main/LocationShareActivity.kt
View file @
c357bb44
...
@@ -3,10 +3,14 @@ package com.base.locationsharewhite.ui.main
...
@@ -3,10 +3,14 @@ package com.base.locationsharewhite.ui.main
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.content.Intent
import
android.content.Intent
import
android.graphics.Color
import
android.graphics.Color
import
android.view.View
import
android.view.inputmethod.InputMethodManager
import
androidx.activity.addCallback
import
androidx.activity.addCallback
import
androidx.core.view.updatePadding
import
androidx.core.view.updatePadding
import
androidx.lifecycle.lifecycleScope
import
androidx.lifecycle.lifecycleScope
import
com.base.locationsharewhite.R
import
com.base.locationsharewhite.R
import
com.base.locationsharewhite.ads.AdsMgr
import
com.base.locationsharewhite.ads.AdsShowCallBack
import
com.base.locationsharewhite.bean.ViewerBean
import
com.base.locationsharewhite.bean.ViewerBean
import
com.base.locationsharewhite.databinding.ActivityLocationShareBinding
import
com.base.locationsharewhite.databinding.ActivityLocationShareBinding
import
com.base.locationsharewhite.helper.BaseActivity
import
com.base.locationsharewhite.helper.BaseActivity
...
@@ -28,6 +32,7 @@ import com.base.locationsharewhite.utils.ToastUtils.toast
...
@@ -28,6 +32,7 @@ import com.base.locationsharewhite.utils.ToastUtils.toast
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.launch
import
kotlinx.coroutines.launch
/**
/**
* 添加谁可以看我
* 添加谁可以看我
*/
*/
...
@@ -71,7 +76,7 @@ class LocationShareActivity : BaseActivity<ActivityLocationShareBinding>() {
...
@@ -71,7 +76,7 @@ class LocationShareActivity : BaseActivity<ActivityLocationShareBinding>() {
showViewerMoreDialog
(
anchorView
,
deleteAction
=
{
showViewerMoreDialog
(
anchorView
,
deleteAction
=
{
LocationShareListUtils
.
deleteShare
(
viewerBean
.
device
)
{
LocationShareListUtils
.
deleteShare
(
viewerBean
.
device
)
{
runOnUiThread
{
runOnUiThread
{
toast
(
it
.
toString
())
toast
(
it
.
toString
()
,
true
)
}
}
}
}
},
renameAction
=
{
},
renameAction
=
{
...
@@ -84,7 +89,6 @@ class LocationShareActivity : BaseActivity<ActivityLocationShareBinding>() {
...
@@ -84,7 +89,6 @@ class LocationShareActivity : BaseActivity<ActivityLocationShareBinding>() {
}
}
binding
.
rv
.
adapter
=
adapter
binding
.
rv
.
adapter
=
adapter
initShareData
()
initShareData
()
}
}
...
@@ -100,37 +104,66 @@ class LocationShareActivity : BaseActivity<ActivityLocationShareBinding>() {
...
@@ -100,37 +104,66 @@ class LocationShareActivity : BaseActivity<ActivityLocationShareBinding>() {
binding
.
tvShare
.
setOnClickListener
{
binding
.
tvShare
.
setOnClickListener
{
val
code
=
binding
.
editCode
.
text
.
toString
()
val
code
=
binding
.
editCode
.
text
.
toString
()
if
(
code
.
isEmpty
())
{
if
(
code
.
isEmpty
())
{
toast
(
"code is empty"
)
toast
(
"code is empty"
,
true
)
return
@setOnClickListener
return
@setOnClickListener
}
}
if
(
code
.
length
>=
8
)
{
if
(
code
.
length
>=
8
)
{
hideKeyBoard
()
AdsMgr
.
showInsert
(
this
,
false
,
object
:
AdsShowCallBack
()
{
override
fun
close
(
where
:
Int
)
{
shareLocationCode
(
code
)
}
override
fun
failed
(
where
:
Int
)
{
shareLocationCode
(
code
)
}
override
fun
googleFailed
(
where
:
Int
)
{
shareLocationCode
(
code
)
}
})
}
else
{
toast
(
"code verification failed"
,
true
)
}
}
}
fun
hideKeyBoard
()
{
val
imm
=
getSystemService
(
INPUT_METHOD_SERVICE
)
as
InputMethodManager
if
(
currentFocus
!=
null
)
{
imm
.
hideSoftInputFromWindow
(
currentFocus
!!
.
windowToken
,
0
)
}
binding
.
editCode
.
clearFocus
()
}
private
fun
shareLocationCode
(
code
:
String
)
{
LocationShareUtils
.
shareMyLocationByInvitationCode
(
code
)
{
status
->
LocationShareUtils
.
shareMyLocationByInvitationCode
(
code
)
{
status
->
LogEx
.
logDebug
(
TAG
,
"status=$status"
)
runOnUiThread
{
runOnUiThread
{
toast
(
"status=$status"
,
true
)
when
(
status
)
{
when
(
status
)
{
SHARE_STATE_FAILED
->
{
SHARE_STATE_FAILED
->
{
toast
(
"Code verification failed"
)
toast
(
"Code verification failed"
,
true
)
}
}
SHARE_STATE_SUCCESS
->
{
SHARE_STATE_SUCCESS
->
{
toast
(
"Code verification success"
)
toast
(
"Code verification success"
,
true
)
initShareData
()
initShareData
()
}
}
SHARE_STATE_SHARED
->
{
SHARE_STATE_SHARED
->
{
toast
(
"Sharing code has been added"
)
toast
(
"Sharing code has been added"
,
true
)
}
}
SHARE_STATE_MYSELF
->
{
SHARE_STATE_MYSELF
->
{
toast
(
"Sharing code is yourself code"
)
toast
(
"Sharing code is yourself code"
,
true
)
}
}
}
}
}
}
}
}
}
else
{
toast
(
"code verification failed"
)
}
}
}
}
private
fun
initShareData
()
{
private
fun
initShareData
()
{
...
@@ -138,6 +171,12 @@ class LocationShareActivity : BaseActivity<ActivityLocationShareBinding>() {
...
@@ -138,6 +171,12 @@ class LocationShareActivity : BaseActivity<ActivityLocationShareBinding>() {
val
nickList
=
SpStringUtils
.
getSpStringList
(
VIEWER_NICKNAME_KEY
)
val
nickList
=
SpStringUtils
.
getSpStringList
(
VIEWER_NICKNAME_KEY
)
it
.
forEach
{
viewer
->
changeLocalNickName
(
viewer
,
nickList
)
}
it
.
forEach
{
viewer
->
changeLocalNickName
(
viewer
,
nickList
)
}
runOnUiThread
{
runOnUiThread
{
if
(
it
.
isEmpty
())
{
binding
.
flAd
.
visibility
=
View
.
VISIBLE
AdsMgr
.
showNative
(
binding
.
flAd
,
R
.
layout
.
layout_admob_app_exit
)
}
else
{
binding
.
flAd
.
visibility
=
View
.
GONE
}
adapter
.
submitList
(
it
)
adapter
.
submitList
(
it
)
}
}
})
})
...
...
app/src/main/java/com/base/locationsharewhite/ui/main/MainActivity.kt
View file @
c357bb44
...
@@ -15,7 +15,7 @@ import com.base.locationsharewhite.ads.AdsMgr
...
@@ -15,7 +15,7 @@ import com.base.locationsharewhite.ads.AdsMgr
import
com.base.locationsharewhite.ads.AdsShowCallBack
import
com.base.locationsharewhite.ads.AdsShowCallBack
import
com.base.locationsharewhite.ads.admob.AdBannerMgr
import
com.base.locationsharewhite.ads.admob.AdBannerMgr
import
com.base.locationsharewhite.ads.admob.AdInsertMgr
import
com.base.locationsharewhite.ads.admob.AdInsertMgr
import
com.base.locationsharewhite.config.ConfigBean
import
com.base.locationsharewhite.
bean.
config.ConfigBean
import
com.base.locationsharewhite.databinding.ActivityMainBinding
import
com.base.locationsharewhite.databinding.ActivityMainBinding
import
com.base.locationsharewhite.fcm.NotificationUiUtil.sendAllAllowedNotification
import
com.base.locationsharewhite.fcm.NotificationUiUtil.sendAllAllowedNotification
import
com.base.locationsharewhite.helper.BaseActivity
import
com.base.locationsharewhite.helper.BaseActivity
...
...
app/src/main/java/com/base/locationsharewhite/ui/set/RenameActivity.kt
View file @
c357bb44
...
@@ -108,7 +108,7 @@ class RenameActivity : BaseActivity<ActivityRenameBinding>() {
...
@@ -108,7 +108,7 @@ class RenameActivity : BaseActivity<ActivityRenameBinding>() {
val
sp
=
device
+
_DEVICE_NICKNAME_
+
newName
val
sp
=
device
+
_DEVICE_NICKNAME_
+
newName
SpStringUtils
.
addSpString
(
VIEWER_NICKNAME_KEY
,
sp
)
SpStringUtils
.
addSpString
(
VIEWER_NICKNAME_KEY
,
sp
)
toast
(
"Rename success"
)
toast
(
"Rename success"
,
true
)
finish
()
finish
()
}
}
...
@@ -126,7 +126,7 @@ class RenameActivity : BaseActivity<ActivityRenameBinding>() {
...
@@ -126,7 +126,7 @@ class RenameActivity : BaseActivity<ActivityRenameBinding>() {
val
sp
=
device
+
_DEVICE_NICKNAME_
+
newName
val
sp
=
device
+
_DEVICE_NICKNAME_
+
newName
SpStringUtils
.
addSpString
(
VIEWING_NICKNAME_KEY
,
sp
)
SpStringUtils
.
addSpString
(
VIEWING_NICKNAME_KEY
,
sp
)
toast
(
"Rename success"
)
toast
(
"Rename success"
,
true
)
finish
()
finish
()
}
}
...
@@ -139,9 +139,9 @@ class RenameActivity : BaseActivity<ActivityRenameBinding>() {
...
@@ -139,9 +139,9 @@ class RenameActivity : BaseActivity<ActivityRenameBinding>() {
LocationNameUtils
.
renameNickName
(
newName
)
{
flag
->
LocationNameUtils
.
renameNickName
(
newName
)
{
flag
->
runOnUiThread
{
runOnUiThread
{
if
(
flag
)
{
if
(
flag
)
{
toast
(
"Rename success"
)
toast
(
"Rename success"
,
true
)
}
else
{
}
else
{
toast
(
"Rename failed"
)
toast
(
"Rename failed"
,
true
)
}
}
finish
()
finish
()
}
}
...
...
app/src/main/java/com/base/locationsharewhite/utils/ToastUtils.kt
View file @
c357bb44
...
@@ -5,8 +5,8 @@ import android.widget.Toast
...
@@ -5,8 +5,8 @@ import android.widget.Toast
import
com.base.locationsharewhite.BuildConfig
import
com.base.locationsharewhite.BuildConfig
object
ToastUtils
{
object
ToastUtils
{
fun
Context
.
toast
(
content
:
String
)
{
fun
Context
.
toast
(
content
:
String
,
isMust
:
Boolean
=
false
)
{
if
(
BuildConfig
.
DEBUG
)
{
if
(
BuildConfig
.
DEBUG
||
isMust
)
{
Toast
.
makeText
(
this
,
content
,
Toast
.
LENGTH_SHORT
).
show
()
Toast
.
makeText
(
this
,
content
,
Toast
.
LENGTH_SHORT
).
show
()
}
}
}
}
...
...
app/src/main/res/layout/activity_location_code.xml
View file @
c357bb44
...
@@ -101,6 +101,11 @@
...
@@ -101,6 +101,11 @@
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"18sp"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
<com.base.locationsharewhite.ads.NativeParentView
android:id=
"@+id/fl_ad"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/activity_location_share.xml
View file @
c357bb44
...
@@ -121,13 +121,24 @@
...
@@ -121,13 +121,24 @@
android:textStyle=
"bold"
/>
android:textStyle=
"bold"
/>
</LinearLayout>
</LinearLayout>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/ll"
>
<com.base.locationsharewhite.ads.NativeParentView
android:id=
"@+id/fl_ad"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv"
android:id=
"@+id/rv"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"0dp
"
android:layout_height=
"wrap_content
"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/ll"
tools:listitem=
"@layout/item_viewer"
/>
tools:listitem=
"@layout/item_viewer"
/>
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
build.gradle.kts
View file @
c357bb44
// Top-level build file where you can add configuration options common to all sub-projects/modules.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins
{
plugins
{
alias
(
libs
.
plugins
.
androidApplication
)
apply
false
alias
(
libs
.
plugins
.
androidApplication
)
apply
false
alias
(
libs
.
plugins
.
jetbrainsKotlinAndroid
)
apply
false
alias
(
libs
.
plugins
.
jetbrainsKotlinAndroid
)
apply
false
...
...
smartcl.jks
0 → 100644
View file @
c357bb44
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment