B4A Class GetProp: read device properties

Discussion in 'Additional libraries, classes and official updates' started by DavideV, Jul 10, 2015.

  1. DavideV

    DavideV Active Member Licensed User

    Hello guys,
    with this simple class you can retrieve (read only) device properties stored on the device.
    The device properties are stored as a pair of Key/Value in string format and is very similar to windows registry.
    The number of properties is different from one device to another and some of these could be really useful and some not.
    In the attached full working example you can see all properties in your device.
    The example contains the class fully commented.

    Edit 2015/07/13 added a second example for IP infos only

    Read here for more info:
    http://rxwen.blogspot.se/2010/01/android-property-system.html
     

    Attached Files:

    Last edited: Jul 13, 2015
  2. cambopad

    cambopad Active Member Licensed User

    Nice! I tried it, but it cannot show the IP?

    2015-07-11_161938.png
     
  3. DavideV

    DavideV Active Member Licensed User

    Hi, in my phone it show data from the last wifi connection, in my tablet i get same result as you. The example is 'as it is' and in some cases the result my vary (i haven't tried to disabile and enable WiFi again, for example)
     
    cambopad likes this.
  4. cambopad

    cambopad Active Member Licensed User

    So is it reliable to display the ip of the phone or tablet?
     
  5. DavideV

    DavideV Active Member Licensed User

    Try the other example i just added in the first post.
    Note that there is more simple code over there to do the same if you only need the device IP.
    Bye
     
    cambopad likes this.
  6. cambopad

    cambopad Active Member Licensed User

    Thanks you! I will try your example!
     
Loading...