mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-26 11:56:27 -08:00
1 parent
0859abf08d
commit
58ca3fe8c1
13 files changed
+505
-290
No files matched your search
@@ -2,6 +2,8 @@
|
||||
|
||||
package dev.slimevr.android
|
||||
|
||||
import android.content.Context
|
||||
import android.net.wifi.WifiManager
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import dev.slimevr.Keybinding
|
||||
import dev.slimevr.VRServer
|
||||
@@ -50,6 +52,12 @@ fun main(activity: AppCompatActivity) {
|
||||
vrServer = VRServer(
|
||||
configPath = File(activity.filesDir, "vrconfig.yml").absolutePath,
|
||||
serialHandlerProvider = { _ -> AndroidSerialHandler(activity) },
|
||||
acquireMulticastLock = {
|
||||
val wifi = activity.getSystemService(Context.WIFI_SERVICE) as WifiManager
|
||||
val lock = wifi.createMulticastLock("slimevr-jmdns-multicast-lock")
|
||||
lock.setReferenceCounted(true)
|
||||
lock.acquire()
|
||||
},
|
||||
)
|
||||
vrServer.start()
|
||||
Keybinding(vrServer)
|
||||
|
||||
Reference in new issue
Block a user