To query the device we process this configuration:
<wap-provisioningdoc>
<characteristic-query type="UnInstall"/>
</wap-provisioningdoc>
The query above will only return installed application that can be uninstalled. The device would then respond with something like this:
<wap-provisioningdoc>
<characteristic type="UnInstall">
<characteristic type="Microsoft Application#2">
<parm name="uninstall" value="0"/>
</characteristic>
<characteristic type="Microsoft Application#1">
<parm name="uninstall" value="0"/>
</characteristic>
<characteristic type="Demo Home Screen">
<parm name="uninstall" value="0"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>
And here's how to accomplish this task using .NETCF and C#
var doc = new XmlDocument();
doc.LoadXml(@"<wap-provisioningdoc><characteristic-query type=""UnInstall""/></wap-provisioningdoc>");
doc = ConfigurationManager.ProcessConfiguration(doc, true);
var nodes = doc.SelectNodes("wap-provisioningdoc/characteristic[@type='UnInstall']/characteristic/@type");
foreach (var node in nodes.Cast<XmlNode>())
{
Trace.WriteLine(node.InnerText);
}
I hope you found this useful.
No comments:
Post a Comment