/// <summary>
 ///    Disables collecting location automatically. Will do nothing if Leanplum-Location is
 ///    not used. Not supported on Native.
 /// </summary>
 public override void DisableLocationCollection()
 {
     NativeSDK.CallStatic("disableLocationCollection");
 }
 /// <summary>
 ///     Gets a value indicating whether Leanplum has started and the device is registered as a
 ///     developer.
 /// </summary>
 /// <value><c>true</c> if Leanplum has started and the device registered as developer;
 ///     otherwise, <c>false</c>.</value>
 public override bool HasStartedAndRegisteredAsDeveloper()
 {
     return(NativeSDK.CallStatic <bool>("hasStartedAndRegisteredAsDeveloper"));
 }
 /// <summary>
 ///     Set location manually. Calls SetDeviceLocationWithLatitude with cell type. Best if
 ///     used in after calling DisableLocationCollection. Not supported on Native.
 /// </summary>
 /// <param name="latitude"> Device location latitude. </param>
 /// <param name="longitude"> Device location longitude. </param>
 /// <param name="city"> Location city. </param>
 /// <param name="region"> Location region. </param>
 /// <param name="country"> Country ISO code. </param>
 /// <param name="type"> Location accuracy type. </param>
 public override void SetDeviceLocation(double latitude, double longitude, string city, string region, string country, LPLocationAccuracyType type)
 {
     NativeSDK.CallStatic("setDeviceLocation", latitude, longitude, (int)type);
 }
 /// <summary>
 ///     Advances to a particular state in your application. The string can be
 ///     any value of your choosing, and will show up in the dashboard.
 ///     A state is a section of your app that the user is currently in.
 /// </summary>
 public override void AdvanceTo(string state, string info,
                                IDictionary <string, object> parameters)
 {
     NativeSDK.CallStatic("advanceTo", state, info, Json.Serialize(parameters));
 }
 /// <summary>
 ///     Pauses the current state.
 ///     You can use this if your game has a "pause" mode. You shouldn't call it
 ///     when someone switches out of your app because that's done automatically.
 /// </summary>
 public override void PauseState()
 {
     NativeSDK.CallStatic("pauseState");
 }
 public override void SetLogLevel(Constants.LogLevel logLevel)
 {
     NativeSDK.CallStatic("setLogLevel", (int)logLevel);
 }
 /// <summary>
 ///     Logs a particular event in your application. The string can be
 ///     any value of your choosing, and will show up in the dashboard.
 ///     To track purchases, use Leanplum.PURCHASE_EVENT_NAME as the event name.
 /// </summary>
 public override void Track(string eventName, double value, string info,
                            IDictionary <string, object> parameters)
 {
     NativeSDK.CallStatic("track", eventName, value, info, Json.Serialize(parameters));
 }
 /// <summary>
 ///     Must call either this or SetAppIdForProductionMode
 ///     before issuing any calls to the API, including start.
 /// </summary>
 /// <param name="appId"> Your app ID. </param>
 /// <param name="accessKey"> Your development key. </param>
 public override void SetAppIdForDevelopmentMode(string appId, string accessKey)
 {
     NativeSDK.CallStatic("setAppIdForDevelopmentMode", appId, accessKey);
 }
 /// <summary>
 ///     Must call either this or SetAppIdForDevelopmentMode
 ///     before issuing any calls to the API, including start.
 /// </summary>
 /// <param name="appId"> Your app ID. </param>
 /// <param name="accessKey"> Your production key. </param>
 public override void SetAppIdForProductionMode(string appId, string accessKey)
 {
     NativeSDK.CallStatic("setAppIdForProductionMode", appId, accessKey);
 }
 /// <summary>
 ///     The default timeout is 10 seconds for requests, and 15 seconds for file downloads.
 /// </summary>
 /// <param name="seconds"> Timeout in seconds for standard webrequests. </param>
 /// <param name="downloadSeconds"> Timeout in seconds for downloads. </param>
 public override void SetNetworkTimeout(int seconds, int downloadSeconds)
 {
     NativeSDK.CallStatic("setNetworkTimeout", seconds, downloadSeconds);
 }
 /// <summary>
 ///     Sets the time interval between uploading events to server.
 ///     Default is <see cref="EventsUploadInterval.AtMost15Minutes"/>.
 /// </summary>
 /// <param name="uploadInterval"> The time between uploads. </param>
 public override void SetEventsUploadInterval(EventsUploadInterval uploadInterval)
 {
     NativeSDK.CallStatic("setEventsUploadInterval", (int)uploadInterval);
 }
 /// <summary>
 ///     Optional. Sets the socket server path for Development mode.
 ///     Path is of the form hostName:port
 /// </summary>
 /// <param name="hostName"> The host name of the socket server. </param>
 /// <param name="port"> The port to connect to. </param>
 public override void SetSocketConnectionSettings(string hostName, int port)
 {
     NativeSDK.CallStatic("setSocketConnectionSettings", hostName, port);
 }
 /// <summary>
 ///     Optional. Sets the API server.
 ///     The API path is of the form http[s]://hostname/servletName
 /// </summary>
 /// <param name="hostName"> The name of the API host, such as www.leanplum.com </param>
 /// <param name="servletName"> The name of the API servlet, such as api </param>
 /// <param name="useSSL"> Whether to use SSL </param>
 public override void SetApiConnectionSettings(string hostName, string servletName = "api",
                                               bool useSSL = true)
 {
     NativeSDK.CallStatic("setApiConnectionSettings", hostName, servletName, useSSL);
 }
 /// <summary>
 ///     Gets whether or not developer mode is enabled.
 /// </summary>
 /// <value><c>true</c> if developer mode; otherwise, <c>false</c>.</value>
 public override bool IsDeveloperModeEnabled()
 {
     return(NativeSDK.CallStatic <bool>("isDeveloperModeEnabled"));
 }
 public override void SetPushDeliveryTrackingEnabled(bool enabled)
 {
     NativeSDK.CallStatic("setPushDeliveryTracking", enabled);
 }
 /// <summary>
 ///   Sets a custom device ID. Device IDs should be unique across physical devices.
 /// </summary>
 /// <param name="deviceId">Device identifier.</param>
 public override void SetDeviceId(string deviceId)
 {
     NativeSDK.CallStatic("setDeviceId", deviceId);
 }
 public override void SetMiPushApplication(string miAppId, string miAppKey)
 {
     NativeSDK.CallStatic("setMiPushApplication", miAppId, miAppKey);
 }
 /// <summary>
 ///     Get user id.
 /// </summary>
 public override string GetUserId()
 {
     return(NativeSDK.CallStatic <string>("getUserId"));
 }
 /// <summary>
 ///     Logs a purchase event in your application. The string can be any
 ///     value of your choosing, however in most cases you will want to use
 ///     Leanplum.PURCHASE_EVENT_NAME
 /// </summary>
 public override void TrackPurchase(string eventName, double value, string currencyCode,
                                    IDictionary <string, object> parameters)
 {
     NativeSDK.CallStatic("trackPurchase", eventName, value, currencyCode, Json.Serialize(parameters));
 }
 /// <summary>
 ///     This should be your first statement in a unit test. Setting this to true
 ///     will prevent Leanplum from communicating with the server.
 /// </summary>
 public override void SetTestMode(bool testModeEnabled)
 {
     NativeSDK.CallStatic("setTestModeEnabled", testModeEnabled);
 }
 /// <summary>
 ///     Sets the traffic source info for the current user.
 ///     Keys in info must be one of: publisherId, publisherName, publisherSubPublisher,
 ///     publisherSubSite, publisherSubCampaign, publisherSubAdGroup, publisherSubAd.
 /// </summary>
 public override void SetTrafficSourceInfo(IDictionary <string, string> info)
 {
     NativeSDK.CallStatic("setTrafficSourceInfo", Json.Serialize(info));
 }
 /// <summary>
 ///     Sets whether realtime updates to the client are enabled in development mode.
 ///     This uses websockets which can have high CPU impact. Default: true.
 /// </summary>
 public override void SetRealtimeUpdatesInDevelopmentModeEnabled(bool enabled)
 {
     NativeSDK.CallStatic("setFileUploadingEnabledInDevelopmentMode", enabled);
 }
 /// <summary>
 ///     Updates the user ID and adds or modifies user attributes.
 /// </summary>
 /// <param name="newUserId">New user identifier.</param>
 /// <param name="value">User attributes.</param>
 public override void SetUserAttributes(string newUserId, IDictionary <string, object> value)
 {
     NativeSDK.CallStatic("setUserAttributes", newUserId, Json.Serialize(value));
 }
 /// <summary>
 ///     Set location manually. Calls SetDeviceLocationWithLatitude with cell type. Best if
 ///     used in after calling DisableLocationCollection. Not supported on Native.
 /// </summary>
 /// <param name="latitude"> Device location latitude. </param>
 /// <param name="longitude"> Device location longitude. </param>
 public override void SetDeviceLocation(double latitude, double longitude)
 {
     NativeSDK.CallStatic("setDeviceLocation", latitude, longitude);
 }
 /// <summary>
 ///     Resumes the current state.
 /// </summary>
 public override void ResumeState()
 {
     NativeSDK.CallStatic("resumeState");
 }
 /// <summary>
 ///     Gets a value indicating whether Leanplum has finished starting.
 /// </summary>
 /// <value><c>true</c> if this instance has started; otherwise, <c>false</c>.</value>
 public override bool HasStarted()
 {
     return(NativeSDK.CallStatic <bool>("hasStarted"));
 }