Not logged in. · Lost password · Register
Forum: MatriX RSS
Page: previous  1  2 
Avatar
Alex #16
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post ID 9550
if you want the latest Xamarin builds you can contact us directly by EMail.

There is changing a lot at Xamarin right now with the acquisition from Microsoft. We are upgrading all the build machines right now and had some problems on some of them. We don't wanna publish releases to NuGet before we are 100% sure that all is working fine. This needs some more testing this time than usual.
Avatar
wmorrison #17
Member since Dec 2015 · 50 posts · Location: Kingston, Jamaica
Group memberships: Members
Show profile · Link to this post
I have noticed this as well in vs2015 update 1.  I  will wait until you guys do the official release.  I am getting weird things happening when doing an iqfilter in the oncreate procedure call in my android activity.  I am getting his error:

 "System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation."

OR
  Sometimes  the "_xmppAdmin.IqFilter.SendIq(jidCheckIq, UserResponse, "VALIDATE");" statement does not call the UserReponse function. It just jump to the next statement.

The same Iqfilter works fine if called somewhere else.

On another note: Can you explain the differences between
SendIq :  I am currently using this one.
SendIqAsync :  How to access the return IQ?
SendIqSynchronous:  How to access the return IQ:
This post was edited on 2016-04-04, 06:08 by wmorrison.
Avatar
Alex #18
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Have you looked at the Android exampel from here?
https://gitlab.com/matrix-xmpp/samples/tree/master/csharp/…

Quote by wmorrison:
"System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation."
you have to invoke non thread safe code in your app. Usually the events from MatriX need to be invoked to your UI thread. See also in the example linked above.

Quote by wmorrison:
  Sometimes  the "_xmppAdmin.IqFilter.SendIq(jidCheckIq, UserResponse, "VALIDATE");" statement does not call the UserReponse function. It just jump to the next statement.

The same Iqfilter works fine if called somewhere else.
SendIq is async. The UserRespnse callback gets called asynchronous, whenever the result gets received. Which can be pretty fast, or some seconds later.

Quote by wmorrison:
On another note: Can you explain the differences between
SendIq :  I am currently using this one.
SendIqAsync :  How to access the return IQ?
SendIqSynchronous:  How to access the return IQ:

SendIq
is async, based on the APM programming pattern

SendIqSynchronous
This is synchronous. The code blocks and waits for the result.
  1. var result = SendIqSynchronous(request, timeout);

SendIqAsync
This is async based on the new TPL pattern (Task/sync/await)

Alex
Avatar
wmorrison #19
Member since Dec 2015 · 50 posts · Location: Kingston, Jamaica
Group memberships: Members
Show profile · Link to this post
Thanks for the information.  I have an idea of what is happening but I was not sure what was causing it.  But off I go...
Avatar
Alex #20
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
my guess is that you don't invoke back to your UI thread like described here in the example:
https://gitlab.com/matrix-xmpp/samples/blob/master/csharp/…

Alex
Avatar
wmorrison #21
Member since Dec 2015 · 50 posts · Location: Kingston, Jamaica
Group memberships: Members
Show profile · Link to this post
Hi Alex,
      I know your projects very well. I have been through them properly.  I actually tried to execute the iqfilter on the UI Thread, but it breaks the debugger.  There is something about iqfilter being executed in the Oncreate or OncreateView of an android activity that is not right.  I am doing some details testing and tracing to pin point what could be wrong.  I am going to revert back to VS 2013 and Matrix 1.X.  I hope to post my findings by the end of the week. 

Peace...
Will
This post was edited on 2016-04-05, 07:20 by wmorrison.
Avatar
wmorrison #22
Member since Dec 2015 · 50 posts · Location: Kingston, Jamaica
Group memberships: Members
Show profile · Link to this post
Hi Alex,
         The issue was all my doing.  I was not handling the task properly.  Glad that I did this as I learnt a lot about how Matrix really works.  I am thinking of building a wrapper around the entire login process of Matrix.

Regards,
Will
Avatar
Alex #23
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Great to hear that its working now.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page: previous  1  2 
Forum: MatriX RSS