Android Secondary Methods

Connecting to social networks

/**
* Tracks the existence of a connection with a social network.
* Use pre-defined or custom values as an identifier.
* @param SocialNetwork socialNetwork - social network id
*/
DevToDev.socialNetworkConnect(SocialNetwork socialNetwork);

Use the current constants to specify a social network:

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

Otherwise, create your own social network object.

/**
* Custom social network object
* @param networkName - social network name (max. 24 symbols)
*/
SocialNetwork socialNetwork = SocialNetwork.Custom(String networkName);

Posting to social networks

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

/**
* Tracks the existence of posts to a social network.
* @param socialNetwork - social network Id
* @param reason - the reason of posting (max. 32 symbols)
*/
DevToDev.socialNetworkPost(SocialNetwork socialNetwork, String reason);

As a «reason» parameter we recommend that you indicate actions which encourage users to make a 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 a social network:

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

Otherwise, create your own social network object.

/**
* Custom social network object
* @param networkName - social network name (max. 24 symbols)
*/
SocialNetwork socialNetwork = SocialNetwork.Custom(String networkName);

OpenUdid

/**
* @return Open Udid
*/
DevToDev.getOpenUdid();

ODIN1

/**
* @return ODIN1
*/
DevToDev.getOdin1();

UUID

/**
* @return UUID
*/
DevToDev.getUUID();

Debug mode

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

/**
* @param logLevel
*/
DevToDev.setLogLevel(LogLevel logLevel);

Forced sending

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

DevToDev.sendBufferedEvents();

Current SDK version

To get the version of integrated SDK use this method:

/**
* @return SDKVersion
*/
DevToDev.getSdkVersion();

Tracking state (GDPR)

The method of limiting the processing of user data. The right to be forgotten.

This method is implemented in accordance with the GDPR requirements.
In case a user doesn’t want their data to be sent and processed in the devtodev system, a developer must send a ’false’ value to this method.
When calling the method setTrackingAvailability with a ‘false’ value, SDK sends a command to the server to delete all user’s personal data that has been collected by devtodev from this app and a command to block the collection of any data of this user in future, and then stops sending any messages to the devtodev system.
The user will remain listed as an impersonal unit in previously aggregated metrics.
When sending a ‘true’ value, the permission to block data collection is removed.
/**
* The method of limiting the processing of user data. The right to be forgotten.
* @param isAvailable - send 'false' to erase user's personal data and stop collecting data of this user.
* Send 'true' if you want to resume data collection.
*/
DevToDev.setTrackingAvailability(boolean isAvailable);

 

User profile
Anticheat methods