User Profile & Activity

Jimmy Tungol Member
Page
of 13
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Users/builder/data/lanes/1978/f98871a9/source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61
  at Android.Runtime.JNIEnv.CallVoidMethod (IntPtr jobject, IntPtr jmethod, Android.Runtime.JValue* parms) [0x00063] in /Users/builder/data/lanes/1978/f98871a9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:571
  at Android.Widget.TextView.set_TextFormatted (ICharSequence value) [0x0004b] in /Users/builder/data/lanes/1978/f98871a9/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Android.Widget.TextView.cs:2020
  at Android.Widget.TextView.set_Text (System.String value) [0x00013] in /Users/builder/data/lanes/1978/f98871a9/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Android.Widget.TextView.cs:2031
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00044] in /Users/builder/data/lanes/1978/f98871a9/source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230
  --- End of managed exception stack trace ---
android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
    at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6094)
    at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:857)
    at android.view.ViewGroup.invalidateChild(ViewGroup.java:4320)
    at android.view.View.invalidate(View.java:10878)
    at android.widget.TextView.invalidateRegion(TextView.java:4651)
    at android.widget.TextView.invalidateCursor(TextView.java:4594)
    at android.widget.TextView.spanChange(TextView.java:7502)
    at android.widget.TextView$ChangeWatcher.onSpanAdded(TextView.java:9210)
    at android.text.SpannableStringBuilder.sendSpanAdded(SpannableStringBuilder.java:979)
    at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:688)
    at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:588)
    at android.text.Selection.setSelection(Selection.java:76)
    at android.text.Selection.setSelection(Selection.java:87)
    at android.text.method.ArrowKeyMovementMethod.initialize(ArrowKeyMovementMethod.java:302)
    at android.widget.TextView.setText(TextView.java:3801)
    at android.widget.TextView.setText(TextView.java:3671)
    at android.widget.EditText.setText(EditText.java:80)
    at android.widget.TextView.setText(TextView.java:3646)
    at dalvik.system.NativeStart.run(Native Method)

Any idea on how we might accomplish this on the server side using the Web API? Currently, we are using AfterSaveChangesDelegate to reload or load navigation properties, including the entity that is being updated. However, there are numerous forums that state that context cannot live long and are not meant to live long for that matter. There are suggestions that the original DbContext should be disposed and create another one. While that can be accomplished, we don't see how that is going to work with Crosslight's Enterprise design through the AfterSaveChangesDelegate. Disposing the original context also means that any change tracking behind the scene will stop. The solution provided by Arief in this thread does work at times in simple scenarios where a trigger is simple enough that the results of an updated row are refected in an instant. However, most of the triggers that we have require complex calculations that updating the expected results of a row or record might be delayed at some point; thus, it might make sense the the navigation properties are updated on the second time an entity is being saved from the client-side. That being said, we can't save the same data twice from the client-side in order to get the updated data for a navigation property.

Although triggers should be synchronous in nature, and calling SaveChanges in a DbContext should have triggered the changes of the affected rows. We don;t understand why the reload or load methods of the entity functions are unable to retrieve an update record for the navigation properties attached to the entity that has been saved. Any solutions or workarounds would be very much appreciated. Thanks!
Yes, I believe we have that one setup as documented; however, we are receiving an error from Android that has something to do with multi-thread violation while running "await this.Repository.GetSingleAsync(..., ...);". It states that the view can only be updated on the same thread that owns the view. I have no idea what that is, running the same code using the IViewService with RunOnUIThread method still fails. Any idea what we can do to get rid of this error?

Only the original thread that created a view hierarchy can touch its views.


Any updates?
That's great! We'll give it a try and see how it works. Good to hear from you Yudi. Hope you've been doing well.
Hi Arief,

The test phone we're using is LG L80 - Dual. But no, we haven't tried using your sample project yet.
Posted: August 18, 2015 11:59 AM
Hi Yudi,

This may be a little off-topic... but looking at that video, are you using a 3rd party to show the screen of a physical device? If so, are you able to control the screen from Mac or you were controlling the device itself?
Hi Arief,

Any updates for these items yet? Thanks!
Well, I am using a physical Android phone. There is of course a sim card and I've been using the phone to call and is able to receive incoming calls. When you say "Ensure to turn on the Telephony Services", are you suggesting to look at the phone's Settings and enabling something from there? Please advise. Thanks!

So there are specific FilterOperators used for strings or nulls. Okay, I guess that answers the question then. But what about for dates... are there specific filter operators for them too? Where can I find these information where it can tell us which operators to use for which data types. We did used FilterOperator.IsEqualTo and FilterOperator.IsNotEqualTo for some strings or nulls because it should filter specifically equal values. Using starts with or ends with operators will also validate other records that we don't want to de displayed (e.g. if we want results for 'John', we only need records for John and not records for Johnny, Johnson, etc). Using starts with operator will basically include those records that we don't need, correct me if I'm wrong.

So yes, we did add qualifiers to values being passed to a FilterDescriptor to conform to OData specifications when using strings. That leads to my question of how to properly use those filter descriptors. That being said, we need to find guides in doing so because this section the sample was comment out. Anyway, we hope you can give us more information about this.

Thanks!

All times are GMT -5. The time now is 9:30 PM.
Previous Next