cancel
Showing results for 
Search instead for 
Did you mean: 

Read device attributes from WD JAVA App

Former Member
0 Kudos

Hi folks,

I'm working on MI 7.10, developing laptop apps and I'm facing a customer requirement which imply to modify WD JAVA apps behaviour depending on device. For example, one of these applications, need to connect to an Oracle DB via JDBC drivers and connection URL depends by device location.

The idea I got to solve this issue is to use device's single attributes, so when the admin configure every device, he/she set an attribute with the JDBC connection URL, but the problem is how to get this value into my WD JAVA app?

Do you have any hint? Of course, if you have some suggestions on how to reach this goal in a better way, i.e. don't using device attributes, please address me.

Many thanks

cheers

Roberto

Accepted Solutions (0)

Answers (1)

Answers (1)

rohith_deraje
Advisor
Advisor
0 Kudos

Hi Roberto

Check out for "Agents".. You can create agent and assign some value to it from NWMA. Assign the agent to device. Upon sync agent and its value goes to the client. You should have the logic on client to identify this agent.

Regards

Rohith

Former Member
0 Kudos

Hi Rohith,

thanks for your suggestoin, but my issue still persist, how can I get values transported by the agents into my WD JAVA apps?

many thanks again

BR

Roberto

Edited by: roberto.urban on Dec 6, 2010 11:06 AM

Former Member
0 Kudos

Hi guys,

do you have any hints on how read device attributes within WD JAVA app on MI 7.10?

many thanks

Regards

Roberto

former_member53099
Participant
0 Kudos

Hi Roberto

one can read the Config Agent values by using the following api available in the NW mobile client's Configuration

getProperty( <property name>)

You can check the following link to read more about agents

<http://help.sap.com/saphelp_nwmobile71/helpdata/en/45/18ee41c2d64a8be10000000a1553f7/frameset.htm>

To read more about the 'Configuration' class

<http://help.sap.com/javadocs/nwmobile/SP3/laptops/index.html>

So once you create a config type of agent and assign it to a device, the property-value pair gets stored in the configuration tables of client framework services. Now, these values can be accessed via the above mentioned api of 'Configuration'

Hope this helps

Best Regards

vaidehi