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...
  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