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.
Code Block |
---|
|
/*
* 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
Code Block |
---|
|
/*
* 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);
...
/*
|
Info |
---|
If For the measurement we need the device ID should be readed, . Please set the right of for reading this ID needs to be entered in the device ID into a config file (WMAppManifest.xml). Code Block |
---|
|
...
<Capabilities>
...
<Capability Name="ID_CAP_IDENTITY_DEVICE"/> ...
</Capabilities>
...
|
|