Windows Phone 8 Secondary Methods

Attention! The support of the SDK for this platform has been suspended!


Connecting to social network

/**
* Tracks the existence of a connection with a social network.
* Use pre-defined or custom values as an identifier.
* <param name="socialNetwork"> Social network ID </param>
*/

DevToDev.SDK.SocialNetworkConnect(SocialNetwork socialNetwork);

Example:

DevToDev.SDK.SocialNetworkConnect(SocialNetwork.Facebook);

Use the current constants to specify social network:

SocialNetwork.Facebook
SocialNetwork.Twitter
SocialNetwork.GooglePlus
SocialNetwork.Vk
and so on...

Otherwise, create social network the object of your own:

SocialNetwork socialNetwork = SocialNetwork.Custom(string networkName); //(max. 24 symbols)

Posting to social network

Track publications to social networks from the app to improve viral marketing efficiency.The event is sent after the social network confirms the publication.

The social network ID is the same as with DevToDev.SDK.SocialNetworkConnect(). It is possible to use pre-defined or custom values as the reason (pReason parameter) .

/**
*  <param name="networkName"> Social network ID </param>
*  <param name="reason"> The reason of posting. (max. 32 symbols)</param>
*/

DevToDev.SDK.SocialNetworkPost(SocialNetwork socialNetwork, String reason)

Example:

DevToDev.SDK.SocialNetworkPost(SocialNetwork.Facebook, "newLevelReached");

As a «reason» parameter we recommend that  you indicate actions which encourage users to make publication.

For example:

  • Start playing

  • New level reached

  • New building

  • New ability

  • Quest completed

  • New item

  • Collection completed

  • Invitation

 
  • Asking for help

  • New Record

  • Acheivement

  • URL sharing

  • Recommendation

  • Review

and so on...

Use the current constants to specify social network:

SocialNetwork.Facebook
SocialNetwork.Twitter
SocialNetwork.GooglePlus
SocialNetwork.Vk
and so on...

Otherwise, create social network the object of your own:

SocialNetwork socialNetwork = SocialNetwork.Custom(string networkName); //(max. 24 symbols)

Age

/**
* <param name="age"> User's age </param>
*/

DevToDev.SDK.Age(int age);

Example:

DevToDev.SDK.Age(27);

Gender

/**
* <param name="gender"> User's gender </param>
*/

DevToDev.SDK.Gender(Gender gender);

Example:

DevToDev.SDK.Gender(Gender.Male);

Cheater

In case you have your own methods of determining cheaters in the application, you can have such users marked. Payments made by them will not be taken into account in the statistics.

/**
* <param name="isCheater"> Not cheater/cheater </param>
*/

DevToDev.SDK.Cheater(bool isCheater);

Example:

DevToDev.SDK.Cheater(false);

User identifier

Property allows to set or get custom user identifier:

DevToDev.SDK.UserId

OpenUDID

Property allows to get UDID:

DevToDev.SDK.OpenUdid

ODIN

Property allows to get ODIN:

DevToDev.SDK.ODIN

Debug  mode

To enable the debug mode and make SDK notifications displayed in the console use this method:

//to enable logging
DevToDev.SDK.LogEnabled = true;

//to disable loging
DevToDev.SDK.LogEnabled = false;

Forced sending

To send events pack before it is filled or before its formation period you can use immediate dispatch:

DevToDev.SDK.sendBufferedEvents();

Current SDK version

To get the version of integrated SDK use this method:

DevToDev.SDK.getSdkVersion();

 

Basic Methods
Anticheat methods