Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
p x
GeelyHMIWeb
Commits
3c1fafd6
Commit
3c1fafd6
authored
Jan 07, 2026
by
p x
Browse files
添加加载webview 的方式
parent
6704f076
Changes
4
Show whitespace changes
Inline
Side-by-side
app/src/main/java/com/sd/geelyhmiweb/JsApi.kt
View file @
3c1fafd6
package
com.sd.geelyhmiweb
import
android.util.Log
import
android.webkit.JavascriptInterface
import
androidx.lifecycle.MutableLiveData
import
com.sd.geelyhmiweb.dsbridge.CompletionHandler
...
...
@@ -53,6 +52,4 @@ class JsApi {
}*/
}
\ No newline at end of file
app/src/main/java/com/sd/geelyhmiweb/ui/BootActivity.kt
View file @
3c1fafd6
...
...
@@ -4,26 +4,21 @@ import android.Manifest
import
android.content.Intent
import
android.os.Build
import
android.os.Bundle
import
androidx.activity.enableEdgeToEdge
import
androidx.appcompat.app.AppCompatActivity
import
androidx.core.view.ViewCompat
import
androidx.core.view.WindowInsetsCompat
import
com.permissionx.guolindev.PermissionX
import
com.sd.geelyhmiweb.MainActivity
import
com.sd.geelyhmiweb.R
import
com.sd.geelyhmiweb.databinding.ActivityBootBinding
import
com.sd.geelyhmiweb.databinding.ActivityLoginBinding
import
com.sd.geelyhmiweb.utils.ToastHelper
class
BootActivity
:
AppCompatActivity
()
{
private
lateinit
var
binding
:
ActivityBootBinding
//是否AVP项目- 没有登录页
private
var
isAvp
=
true
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
binding
=
ActivityBootBinding
.
inflate
(
layoutInflater
)
binding
=
ActivityBootBinding
.
inflate
(
layoutInflater
)
// enableEdgeToEdge()
setContentView
(
binding
.
root
)
requestPers
()
...
...
app/src/main/java/com/sd/geelyhmiweb/utils/LocationUtils.kt
View file @
3c1fafd6
...
...
@@ -92,7 +92,8 @@ class LocationUtils {
private
fun
setLocation
(
location
:
Location
)
{
this
.
location
=
location
val
loc
=
"${location.longitude} ${location.latitude}"
//经度,维度,航向角,高度(此位置在WGS84参考椭球上方的高度,以米为单位)
val
loc
=
"${location.longitude} ${location.latitude} ${location.bearing} ${location.altitude}"
onJsLoc
?.
onJsLoc
(
loc
)
}
...
...
app/src/main/java/com/sd/geelyhmiweb/utils/MyContants.kt
View file @
3c1fafd6
...
...
@@ -9,7 +9,7 @@ object MyContants {
* 1 = Cesium
* 2 = ThreeJS
*/
var
LOAD_WEB_FILE
=
1
var
LOAD_WEB_FILE
=
1
// var PORT = if (IS_DEBUG) "123" else "34534"
...
...
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