显示安卓终端所提供的各种传感器信息,包括类型、测量值、上限值、供应商信息。

Discussion in 'Chinese Forum' started by liyy, Apr 25, 2018.

?

这个只能获得安卓设备传感器参数列表,怎么获取具体的姓名、供应商等信息呢

  1. B4A 中怎么获取对象的属性呢

    0 vote(s)
    0.0%
  2. 。。。

    0 vote(s)
    0.0%
Multiple votes are allowed.
  1. liyy

    liyy New Member

    Sub Process_Globals
    Dim NativeMe As JavaObject
    End Sub

    Sub Globals

    End Sub

    Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    NativeMe.InitializeContext
    Dim returnlist As List
    returnlist = NativeMe.RunMethod("myDeviceSensors",Null)
    For i = 0 To returnlist.Size - 1
    Log(returnlist.Get(i))'
    Next


    End Sub

    Sub Activity_Resume

    End Sub

    Sub Activity_Pause (UserClosed As Boolean)

    End Sub
     
  2. hongbii khaw

    hongbii khaw Member Licensed User

    Code:
    Dim p As Phone
    Dim Manufacturer As String = p.Manufacturer '厂商
    Dim Model as string = p.Model '型号
     
    Johan Hormaza likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice