SpaceCore is a virtual Android system engine that can engage users clone and run dual applications,this engine can also support device simulation, fake GPS and many other features.SpaceCore是一个虚拟引擎内核,提供在Android上克隆和运行虚拟应用程序,并且已支持设备模拟、模拟定位以及其他更多的功能。
我在 DeviceMapping.kt这个文件里加了如下代码
`private var mLocaton: FLocation? = FCore.get().getLocation(userID,"test")
var location: String = ""
get() {
return "${mLocaton?.longitude},${mLocaton?.latitude}"
}
set(value) {
field = value
var lng = value.split(",").first().toDouble()
var lat = value.split(",").last().toDouble()
FCore.get().setLocationEnable(userID,"test",enable)
FCore.get().setLocation(userID,"test",FLocation(lat,lng))
}
`
设置和获取是生效的,但是高德之类的软件还是真实的位置信息
我在 DeviceMapping.kt这个文件里加了如下代码 `private var mLocaton: FLocation? = FCore.get().getLocation(userID,"test")
var location: String = "" get() { return "${mLocaton?.longitude},${mLocaton?.latitude}" } set(value) { field = value var lng = value.split(",").first().toDouble() var lat = value.split(",").last().toDouble() FCore.get().setLocationEnable(userID,"test",enable) FCore.get().setLocation(userID,"test",FLocation(lat,lng)) } ` 设置和获取是生效的,但是高德之类的软件还是真实的位置信息