Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

The following example shows the basic installation for the Windows Phone 7 platform. When generating the class SpringMobile a site identifier (<site>) has to be indicated, which is shipped together with this documentation and the libraries.

/*
 * Importing SpringMobile
 */
using spring_mobile_wp7;

/*
 * Generating SpringMobile entity with site id and 
 * application name
 */
SpringMobile spring = new SpringMobile("<site>", "myApplication1");
/*
 * Sending the start of the application to the measurement system
 */
Dictionary<String, String> target = new Dictionary<string, string>();
target.Add(SpringMobile.VAR_ACTION, SpringMobile.APP_STARTED);
spring.commit(target);
...
/*
 * Sending the action spring.BACKGROUND 
 */
Dictionary<String, String> target = new Dictionary<string, string>();
target.Add(SpringMobile.VAR_ACTION, SpringMobile.APP_BACKGROUND);
spring.commit(target);
/*
 * Example CP
 */
using spring_mobile_wp7;

/*
 * Generating SpringMobile entity with site id and application name
 */
SpringMobile spring = new SpringMobile("<site>", "myApplication1");
/*
 * Sending CP to the measurement system
 */
Dictionary<String, String> target = new Dictionary<string, string>();
target.Add("cp", "Mainpage");
spring.commit(target);
...
/*

If the device ID should be readed, the right of reading this ID needs to be entered in a config file (WMAppManifest.xml).

...
<Capabilities>
...
<Capability Name="ID_CAP_IDENTITY_DEVICE"/> ...
</Capabilities>
...
  • No labels