xamarin.android

MvvmCross initialization

﹥>﹥吖頭↗ 提交于 2020-01-09 08:01:24
问题 In question Using MvvmCross from content providers and activities I wanted to know of how to initialize the MvvmCross system. The answer given worked then, but with recent updates of MvvmCross the function which I used (MvxAndroidSetupSingleton.GetOrCreateSetup()) has been deprecated. I have now changed my initialization and it seems to work so far, but is it correct and proper? Should I do things differently to improve portability? Setup class, in platform specific DLL for Android: public

Xamarin AlarmManager Android

依然范特西╮ 提交于 2020-01-09 07:27:04
问题 I've created a quick xamarin android project. Eventually I will want to take the learning below and apply it to a xamarin forms project that is shared between android and ios. For now I'm just focusing on the Android side of things. I've been trying to learn how to schedule a local notification to appear at some time in the future. Made a quick throw away application, below is the AlarmReceiver Class I've written, as well as the MainActivity.cs below. class AlarmReceiver : BroadcastReceiver {

Download Image stream from android universal image loader

会有一股神秘感。 提交于 2020-01-09 07:07:10
问题 I use android universal image loader in monodroid for my android app. some time i need to save some images in sdcard. In this cases i need to download images in streams and then save them into sdcard. Is there any way to download images by stream with this library. because in many cases the image is cached in the library? 回答1: UIL can cache image on SD card (enable caching in DisplayImageOptions). You can define your own folder for cache (in ImageLoaderConfiguration). If you want to display

Download Image stream from android universal image loader

早过忘川 提交于 2020-01-09 07:05:32
问题 I use android universal image loader in monodroid for my android app. some time i need to save some images in sdcard. In this cases i need to download images in streams and then save them into sdcard. Is there any way to download images by stream with this library. because in many cases the image is cached in the library? 回答1: UIL can cache image on SD card (enable caching in DisplayImageOptions). You can define your own folder for cache (in ImageLoaderConfiguration). If you want to display

Xamarin.Forms, Prism.Forms, Android Lolliop 5.1.1, Navigation transitions/animations

岁酱吖の 提交于 2020-01-07 05:31:06
问题 I have a problem when using Xamarin.Forms in conjunction with Prism.Forms (Unity) on an Android 5.1.1 (Lollipop) device. Specifically, if I navigate to/from forms with "animation: true" those forms do not always work correctly afterward - specifically, the forms are not always updated in response to a PropertyChanged event. The forms work perfectly on Android 6.0 and 7.1 (the only other devices I have available for testing). If I change all of my calls to INavigationService.NavigateAsync so

Get value of Xamarin Forms Custom Rendered Checkbox

瘦欲@ 提交于 2020-01-07 05:07:10
问题 I have a Checkbox view rendering properly in Xamarin Forms: public class CheckBoxRenderer : ViewRenderer<LegalCheckbox, CheckBox> { protected override void OnElementChanged(ElementChangedEventArgs<LegalCheckbox> e) { base.OnElementChanged (e); CheckBox control = new Android.Widget.CheckBox(this.Context); control.Checked = false; control.Text = "I agree to terms"; control.SetTextColor (Android.Graphics.Color.Rgb (60, 60, 60)); this.SetNativeControl(control); } } I want to check whether or not

Share file to another app (whatsapp, telegram, gmail)

爷,独闯天下 提交于 2020-01-07 05:01:08
问题 I'm developing an android app using Xamarin.Forms. So far i did not found too much difficulties during the development, but now i think i'm missing something. I would like to: share a custom file (*.sl) from my app to any app that can handle Attachments (like whatsapp, telegram, gmail.. etc) Open my custom file (*.sl) with my app So, i digged a bit around the web and ended up with this; In my AndroidManifest.xml to handle my custom file <intent-filter> <action android:name="android.intent

Xamarin Android FFImageLoading ImageService.Instance.LoadUrl() System.NullReferenceException

爱⌒轻易说出口 提交于 2020-01-07 02:44:11
问题 I've got a strange problem with FFImageLoading . Compiler don't show any error, but while application is starting on device, there is thrown an exception: System.NullReferenceException . Code: C# private void setUserImage() { ImageService.Instance.Initialize(); imgThunbailUsername = FindViewById<ImageViewAsync>(Resource.Id.imgDisplay); string url = @"https://lh4.googleusercontent.com/-Lfgi-xEMwuk/VNWoy8EDWcI/AAAAAAAAACk/rwsluNfhSZY/w1486-h832-no/photo.jpg"; ImageService.Instance.LoadUrl(url)

TChart inside LinearLayout generates “width and height must be > 0”

余生颓废 提交于 2020-01-07 02:17:30
问题 I have just started using Steema TChart on Mono for Android. I tried this simple code and it works fine: protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); var tChart1 = new Steema.TeeChart.TChart(this); var bar1 = new Steema.TeeChart.Styles.Bar(); tChart1.Series.Add(bar1); bar1.Add(3, "Pears", Color.Red); bar1.Add(4, "Apples", Color.Blue); bar1.Add(2, "Oranges", Color.Green); var theme = new Steema.TeeChart.Themes.BlackIsBackTheme(tChart1.Chart); theme.Apply();

How can i send data by USB port in Android C#?

删除回忆录丶 提交于 2020-01-07 02:04:47
问题 I am developed a app in Visual Studio with mono for android. C# So. How can i send data by USB port in Android. C#? The type serialPort1.Write("1"); 回答1: Long story short - you can not do it the way you intended. USB is not a serial port that you can just write to and data comes out on the other side. Serial ports can be emulated over USB, but Android does not support that. Android typically can act as device that offers different profiles: disk, camera and proprietary debug (if enabled on