Esempio n. 1
0
 /// <summary>
 /// Returns unique id of device
 /// Following ID makes a unique ID that:
 /// - (Android 8.0 or higher): Is unique in an app and will be different on another app.
 /// - (Android lower that 8.0): Is a unique ID for all apps and each device will have only one id.
 /// </summary>
 public static string GetDeviceId()
 {
     return(PusheAndroidUtils.Native().CallStatic <string>("getDeviceId"));
 }
Esempio n. 2
0
 /// <summary>
 /// Simply pass a void no argument function to this to handle initialization.
 ///
 /// * NOTE: This is not like Pushe.initialize() from Pushe 1.x. This is different.
 /// </summary>
 /// <param name="initCallback"></param>
 public static void OnPusheInitialized(PusheUnity.PusheDelegate initCallback)
 {
     PusheAndroidUtils.Native().CallStatic("setInitializationCompleteListener", new RegisterCallback(initCallback));
 }
Esempio n. 3
0
 /// <summary>
 /// Get device advertising id (Google: Google Ad id, Huawei: Huawei OAID)
 /// </summary>
 /// <returns>Null if this feature was disabled by user and true otherwise</returns>
 public static string GetAdvertisingId()
 {
     return(PusheAndroidUtils.Native().CallStatic <string>("getAdvertisingId"));
 }
Esempio n. 4
0
 /// <summary>
 /// Returns true if all pushe modules (Core, notification, etc.) were initialized.
 /// </summary>
 public static bool IsInitialized()
 {
     return(PusheAndroidUtils.Native().CallStatic <bool>("isInitialized"));
 }
Esempio n. 5
0
 /**
  * Simply pass a void no argument function to this function to handle registration
  */
 public static void OnPusheRegistered(PusheUnity.PusheDelegate pusheCallback)
 {
     PusheAndroidUtils.Native().CallStatic("setRegistrationCompleteListener", new RegisterCallback(pusheCallback));
 }
Esempio n. 6
0
 public static AndroidJavaObject PusheAnalyticsService()
 {
     return(PusheAndroidUtils.Native().CallStatic <AndroidJavaObject>("getPusheService", "analytics"));
 }
Esempio n. 7
0
 public static void SetCustomId(string id)
 {
     PusheAndroidUtils.Native().CallStatic("setCustomId", id);
 }
Esempio n. 8
0
        public static void RemoveTags(params string[] tags)
        {
            var tagsToRemove = PusheAndroidUtils.CreateJavaArrayList(tags);

            PusheAndroidUtils.Native().CallStatic("removeTags", tagsToRemove);
        }
Esempio n. 9
0
 /// <summary>
 /// GDPR related.
 /// If the user consent was given about necessary data collection for Pushe,
 ///     use this function to let pushe registration begin.
 /// To be able to use GDPR, add "pushe_requires_user_consent" meta-data value to "true",
 /// After showing the dialog and getting user's consent, call this onAccept.
 /// NOTE: Calling this only once is enough.
 /// </summary>
 public static void Initialize()
 {
     PusheAndroidUtils.Native().CallStatic("initialize");
 }
Esempio n. 10
0
 public static string GetUserPhoneNumber()
 {
     return(PusheAndroidUtils.Native().CallStatic <string>("getUserPhoneNumber"));
 }
Esempio n. 11
0
        public static void AddTags(IDictionary <string, string> tags)
        {
            var mapOfTags = PusheAndroidUtils.CreateJavaMapFromDictionary(tags);

            PusheAndroidUtils.Native().CallStatic("addTags", mapOfTags);
        }
Esempio n. 12
0
 public static bool SetUserPhoneNumber(string phone)
 {
     return(PusheAndroidUtils.Native().CallStatic <bool>("setUserPhoneNumber", phone));
 }
Esempio n. 13
0
 public static string GetUserEmail()
 {
     return(PusheAndroidUtils.Native().CallStatic <string>("getUserEmail"));
 }
Esempio n. 14
0
 public static bool SetUserEmail(string email)
 {
     return(PusheAndroidUtils.Native().CallStatic <bool>("setUserEmail", email));
 }
Esempio n. 15
0
 public static void SubscribeTo(string topic)
 {
     PusheAndroidUtils.Native().CallStatic("subscribeToTopic", topic, null);
 }
Esempio n. 16
0
 /// Set user's consent
 public static void SetUserConsentGiven()
 {
     PusheAndroidUtils.Native().CallStatic("setUserConsentGiven");
 }
Esempio n. 17
0
 private static AndroidJavaObject PiamService()
 {
     return(PusheAndroidUtils.Native().CallStatic <AndroidJavaObject>("getPusheService", "inappmessaging"));
 }
Esempio n. 18
0
 /// <summary>
 /// Check if pushe is registered to FCM
 /// </summary>
 public static bool IsRegistered()
 {
     return(PusheAndroidUtils.Native().CallStatic <bool>("isRegistered"));
 }
Esempio n. 19
0
 public static AndroidJavaObject PusheNotificationService()
 {
     return(PusheAndroidUtils.Native().CallStatic <AndroidJavaObject>("getPusheService", "notification"));
 }
Esempio n. 20
0
 public static void UnsubscribeFrom(string topic)
 {
     PusheAndroidUtils.Native().CallStatic("unsubscribeFromTopic", topic, null);
 }