예제 #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"));
 }
예제 #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));
 }
예제 #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"));
 }
예제 #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"));
 }
예제 #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));
 }
예제 #6
0
 public static AndroidJavaObject PusheAnalyticsService()
 {
     return(PusheAndroidUtils.Native().CallStatic <AndroidJavaObject>("getPusheService", "analytics"));
 }
예제 #7
0
 public static void SetCustomId(string id)
 {
     PusheAndroidUtils.Native().CallStatic("setCustomId", id);
 }
예제 #8
0
        public static void RemoveTags(params string[] tags)
        {
            var tagsToRemove = PusheAndroidUtils.CreateJavaArrayList(tags);

            PusheAndroidUtils.Native().CallStatic("removeTags", tagsToRemove);
        }
예제 #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");
 }
예제 #10
0
 public static string GetUserPhoneNumber()
 {
     return(PusheAndroidUtils.Native().CallStatic <string>("getUserPhoneNumber"));
 }
예제 #11
0
        public static void AddTags(IDictionary <string, string> tags)
        {
            var mapOfTags = PusheAndroidUtils.CreateJavaMapFromDictionary(tags);

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