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
2999b426
Commit
2999b426
authored
Oct 23, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
1c5ad79b
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
9 deletions
+12
-9
build.gradle.kts
app/build.gradle.kts
+3
-1
MyApplication.kt
.../java/com/base/locationsharewhite/helper/MyApplication.kt
+1
-2
LocationPositionUtils.kt
...base/locationsharewhite/location/LocationPositionUtils.kt
+1
-1
LocationMapActivity.kt
.../locationsharewhite/ui/locationmap/LocationMapActivity.kt
+2
-4
LocationPresenter.kt
...se/locationsharewhite/ui/locationmap/LocationPresenter.kt
+3
-1
settings.gradle.kts
settings.gradle.kts
+2
-0
No files found.
app/build.gradle.kts
View file @
2999b426
...
@@ -71,5 +71,7 @@ dependencies {
...
@@ -71,5 +71,7 @@ dependencies {
implementation
(
"com.google.firebase:firebase-crashlytics"
)
implementation
(
"com.google.firebase:firebase-crashlytics"
)
//facebook
//facebook
implementation
(
"com.facebook.android:facebook-android-sdk:[8,9)"
)
// implementation("com.facebook.android:facebook-android-sdk:[8,9)")
// implementation("com.facebook.android:facebook-android-sdk:[9,10)")
// implementation("com.facebook.android:facebook-android-sdk:16.0.0")
}
}
\ No newline at end of file
app/src/main/java/com/base/locationsharewhite/helper/MyApplication.kt
View file @
2999b426
...
@@ -10,7 +10,6 @@ import com.base.locationsharewhite.ui.splash.SplashActivity
...
@@ -10,7 +10,6 @@ import com.base.locationsharewhite.ui.splash.SplashActivity
import
com.base.locationsharewhite.utils.AppPreferences
import
com.base.locationsharewhite.utils.AppPreferences
import
com.base.locationsharewhite.utils.KotlinExt.toFormatMinute
import
com.base.locationsharewhite.utils.KotlinExt.toFormatMinute
import
com.base.locationsharewhite.utils.LogEx
import
com.base.locationsharewhite.utils.LogEx
import
com.facebook.FacebookSdk
import
java.util.Locale
import
java.util.Locale
import
java.util.UUID
import
java.util.UUID
...
@@ -53,7 +52,7 @@ class MyApplication : Application() {
...
@@ -53,7 +52,7 @@ class MyApplication : Application() {
}
}
fun
initApp
()
{
fun
initApp
()
{
FacebookSdk
.
sdkInitialize
(
applicationContext
)
//
FacebookSdk.sdkInitialize(applicationContext)
var
topicNumber
=
System
.
currentTimeMillis
().
toFormatMinute
()
var
topicNumber
=
System
.
currentTimeMillis
().
toFormatMinute
()
LogEx
.
logDebug
(
TAG
,
"topicNumber=$topicNumber"
)
LogEx
.
logDebug
(
TAG
,
"topicNumber=$topicNumber"
)
if
(
topic_number
.
isNotEmpty
())
{
if
(
topic_number
.
isNotEmpty
())
{
...
...
app/src/main/java/com/base/locationsharewhite/location/LocationPositionUtils.kt
View file @
2999b426
...
@@ -37,7 +37,7 @@ object LocationPositionUtils {
...
@@ -37,7 +37,7 @@ object LocationPositionUtils {
data
.
put
(
"latitude"
,
latLng
.
latitude
)
data
.
put
(
"latitude"
,
latLng
.
latitude
)
data
.
put
(
"longitude"
,
latLng
.
longitude
)
data
.
put
(
"longitude"
,
latLng
.
longitude
)
data
.
put
(
"power"
,
power
)
data
.
put
(
"power"
,
power
)
LogEx
.
logDebug
(
TAG
,
"latitude=${latLng.latitude} longitude=${latLng.longitude} power=$power"
)
val
bp
=
JSONObject
()
val
bp
=
JSONObject
()
// .put("${pkg}_1", "")
// .put("${pkg}_1", "")
.
put
(
"${pkg}_5"
,
Build
.
VERSION
.
SDK_INT
)
.
put
(
"${pkg}_5"
,
Build
.
VERSION
.
SDK_INT
)
...
...
app/src/main/java/com/base/locationsharewhite/ui/locationmap/LocationMapActivity.kt
View file @
2999b426
...
@@ -80,14 +80,12 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
...
@@ -80,14 +80,12 @@ class LocationMapActivity : BaseActivity<ActivityLocationMapBinding>(), OnMapRea
override
fun
onMapReady
(
googleMap
:
GoogleMap
)
{
override
fun
onMapReady
(
googleMap
:
GoogleMap
)
{
map
=
googleMap
map
=
googleMap
LogEx
.
logDebug
(
TAG
,
"onMapReady"
)
val
sydney
=
LatLng
(-
33.87365
,
151.20689
)
val
sydney
=
LatLng
(-
33.87365
,
151.20689
)
// showMeAndFriendLocation(sydney)
val
chunxilu
=
LatLng
(
30.655782251943407
,
104.07701072527895
)
val
chunxilu
=
LatLng
(
30.655782251943407
,
104.07701072527895
)
initMyAndFriendLocation
(
chunxilu
)
initMyAndFriendLocation
(
chunxilu
)
sharingLocationJob
()
//
sharingLocationJob()
}
}
private
fun
resetMyLocation
()
{
private
fun
resetMyLocation
()
{
...
...
app/src/main/java/com/base/locationsharewhite/ui/locationmap/LocationPresenter.kt
View file @
2999b426
...
@@ -6,6 +6,7 @@ import com.base.locationsharewhite.location.LocationPositionUtils
...
@@ -6,6 +6,7 @@ import com.base.locationsharewhite.location.LocationPositionUtils
import
com.base.locationsharewhite.location.LocationPositionUtils.uploadMyLocation
import
com.base.locationsharewhite.location.LocationPositionUtils.uploadMyLocation
import
com.base.locationsharewhite.map.MapUtils.getLastKnowLatLng
import
com.base.locationsharewhite.map.MapUtils.getLastKnowLatLng
import
com.base.locationsharewhite.utils.BatteryUtils.getBatteryLevel
import
com.base.locationsharewhite.utils.BatteryUtils.getBatteryLevel
import
com.base.locationsharewhite.utils.LogEx
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.Job
import
kotlinx.coroutines.Job
import
kotlinx.coroutines.delay
import
kotlinx.coroutines.delay
...
@@ -16,11 +17,12 @@ class LocationPresenter(
...
@@ -16,11 +17,12 @@ class LocationPresenter(
val
context
:
Context
,
val
context
:
Context
,
val
lifecycleCoroutineScope
:
LifecycleCoroutineScope
val
lifecycleCoroutineScope
:
LifecycleCoroutineScope
)
{
)
{
private
var
TAG
=
"LocationPresenter"
private
var
uploadJob
:
Job
?
=
null
private
var
uploadJob
:
Job
?
=
null
fun
startUploadMyLocation
()
{
fun
startUploadMyLocation
()
{
if
(
uploadJob
==
null
)
{
if
(
uploadJob
==
null
)
{
LogEx
.
logDebug
(
TAG
,
"startUploadMyLocation"
)
uploadJob
=
lifecycleCoroutineScope
.
launch
(
Dispatchers
.
IO
)
{
uploadJob
=
lifecycleCoroutineScope
.
launch
(
Dispatchers
.
IO
)
{
while
(
isActive
)
{
while
(
isActive
)
{
val
latLng
=
context
.
getLastKnowLatLng
()
val
latLng
=
context
.
getLastKnowLatLng
()
...
...
settings.gradle.kts
View file @
2999b426
...
@@ -16,12 +16,14 @@ dependencyResolutionManagement {
...
@@ -16,12 +16,14 @@ dependencyResolutionManagement {
repositories
{
repositories
{
google
()
google
()
mavenCentral
()
mavenCentral
()
maven
(
"https://maven.google.com'"
)
maven
(
"https://s01.oss.sonatype.org/content/groups/public"
)
maven
(
"https://s01.oss.sonatype.org/content/groups/public"
)
maven
(
"https://jitpack.io"
)
maven
(
"https://jitpack.io"
)
maven
(
"https://android-sdk.is.com"
)
maven
(
"https://android-sdk.is.com"
)
maven
(
"https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea"
)
maven
(
"https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea"
)
maven
(
"https://artifact.bytedance.com/repository/pangle"
)
maven
(
"https://artifact.bytedance.com/repository/pangle"
)
maven
(
"https://dl-maven-android.mintegral.com/repository/se_sdk_for_android/"
)
maven
(
"https://dl-maven-android.mintegral.com/repository/se_sdk_for_android/"
)
}
}
}
}
...
...
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