Example #1
0
        public void MessageResponseReceived(string messageType, PushMessage messagePayload,
                                            string responseType, IDictionary <string, string> responsePayload,
                                            Java.Lang.Ref.WeakReference activityHolder)
        {
            // Handle a message response
            Log.Debug("MessageResponseReceived", messageType);
            if (messagePayload != null)
            {
                Log.Debug("MessageResponseReceived", messagePayload.ToJson());
            }
            Log.Debug("MessageResponseReceived", responseType);
            if (responsePayload != null)
            {
                foreach (KeyValuePair <string, string> keypair in responsePayload)
                {
                    Log.Debug("MessageResponseReceived", keypair.Key + " - " + keypair.Value);
                }
            }
            if (messageType == "push" && !string.IsNullOrEmpty(messagePayload.Url))
            {
                Log.Debug("Debug: MessageResponseReceived Deeplinking with ", messagePayload.Url);
                ((AnnexioWebAppPage)App.Current.MainPage).ConfigureDeeplink(messagePayload.Url);
            }
            Dictionary <string, string> dict = JsonConvert.DeserializeObject <Dictionary <string, string> >(messagePayload.ToJson());

            if (messageType == "push" && dict.ContainsKey("deeplink"))
            {
                ((AnnexioWebAppPage)App.Current.MainPage).ConfigureDeeplink(dict["deeplink"]);
            }
        }
 public BitmapWorkerTask(ImageView img, string picturename, Context c, string path)
 {
     context = c;
     refer = new Java.Lang.Ref.WeakReference (img);
     this.picturename = picturename;
     this.path = path;
 }
 public void OnActivityError(ICall call, Java.Lang.Ref.WeakReference activity, CallException error)
 {
     Log.Debug(TAG, "onCallActivityDestroyed: "
               + call.CallInfo.Caller + ", "
               + System.String.Join(", ", call.CallInfo.Callees)
               + "\n"
               + "exception: " + error.Message);
 }
Example #4
0
 internal NativeGestureListener(Android.Views.View view, List <Listener> listeners)
 {
     _id = _instances++;
     //_view = view;
     _weakReferenceView = new Java.Lang.Ref.WeakReference(view);
     //Views.Add(_view);
     _listeners = listeners;
     _touchSlop = ViewConfiguration.Get(Droid.Settings.Context).ScaledTouchSlop;
 }
Example #5
0
        public static void SetCurrentActivity(Activity currentActivity)
        {
            if (AppApplication.Lua != null)
            {
                AppApplication.Lua.activity = currentActivity;
            }

            _currentActivity = new Java.Lang.Ref.WeakReference(currentActivity);
        }
Example #6
0
        private Drawable getCachedDrawable()
        {
            Drawable drawable = (Drawable)drawableWeakRef?.Get();

            if (drawable == null)
            {
                drawable        = Drawable;
                drawableWeakRef = new WeakReference(drawable);
            }

            return(drawable);
        }
Example #7
0
 protected override void Dispose(bool disposing)
 {
     if (!_disposed)
     {
         StopTapLongPress();
         _weakReferenceView?.Clear();
         _weakReferenceView = null;
         _listeners         = null;
         _disposed          = true;
     }
     base.Dispose(disposing);
 }
 public void OnActivityStarted(IChat chat, Java.Lang.Ref.WeakReference activity)
 {
     Log.Debug(TAG, "onChatActivityStarted");
 }
 public void OnActivityError(IChat chat, Java.Lang.Ref.WeakReference activity, ChatException error)
 {
     Log.Debug(TAG, "onChatActivityError " + error.Message);
 }
 public void OnActivityStarted(ICall call, Java.Lang.Ref.WeakReference activity)
 {
     Log.Debug(TAG, "onCallActivityStarted: "
               + call.CallInfo.Caller + ", "
               + System.String.Join(", ", call.CallInfo.Callees));
 }
Example #11
0
 public static void SetCurrentActivity(Activity currentActivity)
 {
     _currentActivity = new Java.Lang.Ref.WeakReference(currentActivity);
 }
 public JavaObjectWeakReference(Java.Lang.Object item)
     : base(item, true)
 {
     _nativeRef = new Java.Lang.Ref.WeakReference(item);
 }
Example #13
0
 public ModelLoader(MainActivity owner)
 {
     this.owner = new Java.Lang.Ref.WeakReference(owner);
 }
 public AsyncDrawable(BitmapWorkerTask  decoder, Bitmap bitmap)
     : base(bitmap)
 {
     reference = new Java.Lang.Ref.WeakReference (decoder);
 }
Example #15
0
 public void InboxBadgeUpdated(int i, Java.Lang.Ref.WeakReference activityHolder)
 {
     //print out inbox badge
     Log.Debug("Inbox Badge is : ", i + "");
 }
Example #16
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="target">The target object</param>
 /// <param name="trackResurrection">not used by Dot42</param>
 public WeakReference(object target, bool trackResurrection)
 {
     weakReference = new Java.Lang.Ref.WeakReference<object>(target);
     this.trackResurrection = trackResurrection;
 }
Example #17
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="target">The target object</param>
 /// <param name="trackResurrection">not used by Dot42</param>
 public WeakReference(object target, bool trackResurrection)
 {
     weakReference          = new Java.Lang.Ref.WeakReference <object>(target);
     this.trackResurrection = trackResurrection;
 }