Android Question Get ElapsedRealtime reflection (solved)

Discussion in 'Android Questions' started by Marion Opperman, Jul 29, 2015.

  1. Marion Opperman

    Marion Opperman Member Licensed User

    Hi There,

    Could someone please help me with getting a field using reflection. i would like to do something like this:

    l = r.GetField("SystemClock.elapsedRealtime()")

    Thanks
     
  2. LucaMs

    LucaMs Expert Licensed User

    I'm a "not expert" of reflection.

    Try so and tell me if it works :D

    Code:
    Sub GetElapsedRealtime As Long
        
    Dim r As Reflector
        
    Return r.RunStaticMethod("android.os.SystemClock""elapsedRealtime"NullNull)
    End Sub
     
    DonManfred likes this.
  3. Marion Opperman

    Marion Opperman Member Licensed User

    It Works. Thanks a lot.
     
Loading...