xamarin.android

How to make Zebra Xing (Zxing) as subview in Xamarin Android

假如想象 提交于 2020-01-17 07:29:47
问题 In my Xamarin.Android app, I want to use ZXing to scan barcode. I want to display the scanner in the view of an activity. Code: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:weightSum="5"> <Button android:text="Scan with Default Overlay" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id=

Stop auto buffer in VideoView android

北战南征 提交于 2020-01-17 06:40:12
问题 I am implementing Video Downloader App . In which user can view video before downloading it.But problem is that when activity starts video starts auto buffering, which waste more internet data of user. I have provided videoview with download button so user can view video if he want's and then download. Because of auto buffer user needs twice the data for video. Is there any way to stop auto buffer video as soon as activity/videoview comes in focus. All point of my question is to conserve user

Android MediaPlayer setNextMediaPlayer not working

人走茶凉 提交于 2020-01-17 06:14:07
问题 My objective is to create a VideoView that can play videos in a pre-defined play list. I'm trying to use MediaPlayer.setNextMediaPlayer(...) to allow a seamless transition between two videos. However, when the first video finishes playing, the 2nd video will not start automatically as it should according to the documentation. Xamarin Android Code : Queue<MediaPlayer> MediaPlayerList = null; private void PlayVideo() { MediaPlayerList = new Queue<MediaPlayer>(); //Let's go ahead and create all

MonoDroid lacks support for System.IO.Ports

百般思念 提交于 2020-01-17 05:07:15
问题 I have an application written in C# .NET 4.0. I consider using MonoDroid for making it run also on Android systems. Thing is, the application relies heavily on .NET Framework namespace System.IO.Ports which doesn't seem to exist in MonoDroid. What solution is there for me, so I could still use MonoDroid? 回答1: I've added an enhancement request for serial port support to Mono for Android: https://bugzilla.novell.com/show_bug.cgi?id=687407 However, I'm not sure how useful it would be, as cursory

Xamarin How to add service reference to SSL username authentication WCF service?

心不动则不痛 提交于 2020-01-17 04:42:46
问题 I'm building a Xamarin app that requires a WCF service, the service will be protected using SSL (self signed cert for development purposes) and Username Authentication. The service works and when creating a service reference in a WinForms project it all works fine like so: CategoryServiceClient csc = new CategoryServiceClient(); csc.ClientCredentials.UserName.UserName = "shaun"; csc.ClientCredentials.UserName.Password = "TEST"; System.Net.ServicePointManager

How to properly subclass SeekBar in MonoDroid?

倖福魔咒の 提交于 2020-01-17 04:10:08
问题 I'm currently having a issue with the SeekBar class in MonoDroid. Currently I have extended it like this: public class TTSeekBar : SeekBar, ITTComponent { public TTSeekBar(Context context): base(context) { } private int _min = 0; public int Min { get { return _min; } set { _min = value;} } public override int Progress { get { return base.Progress + _min; } set { base.Progress = value; } } public override int Max { get { return base.Max + _min; } set { base.Max = value + _min; } } public

Monodroid - passing data to ListView according to GREF limit

血红的双手。 提交于 2020-01-17 02:17:25
问题 C#, Mono for Android. I need to output a large portion of combined data into ListView. To achieve this, I use the following obvious approach with Adapter: class ItemInfo { public string Id; public string Name; public string Description; public int Distance; //Some more data } class ItemAdapter : ArrayAdapter<ItemInfo> { public WorldItemAdapter (Context context, int textViewResourceId, List<WorldItemInfo> items) : base(context, textViewResourceId, items) { } //... public override View GetView

how ca in get data from choosed file with Intent.CreateChooser(Intent, “Select Any File”) as byte

不打扰是莪最后的温柔 提交于 2020-01-16 19:11:11
问题 I want when choosing non-type files(apk, exe, pdf, ...) with intent chooser then extract data chose the file as a byte array in OnActivityResult I have a lot of searches but I can't do this, please help me. This is my pick button Code: private void Pick_Click(object sender, EventArgs e) { Intent = new Intent(); Intent.SetType("*/*"); Intent.SetAction(Intent.ActionGetContent); Intent chooser = Intent.CreateChooser(Intent, "Select Any File"); StartActivityForResult(chooser, 1); } Now how can I

how ca in get data from choosed file with Intent.CreateChooser(Intent, “Select Any File”) as byte

旧巷老猫 提交于 2020-01-16 19:09:06
问题 I want when choosing non-type files(apk, exe, pdf, ...) with intent chooser then extract data chose the file as a byte array in OnActivityResult I have a lot of searches but I can't do this, please help me. This is my pick button Code: private void Pick_Click(object sender, EventArgs e) { Intent = new Intent(); Intent.SetType("*/*"); Intent.SetAction(Intent.ActionGetContent); Intent chooser = Intent.CreateChooser(Intent, "Select Any File"); StartActivityForResult(chooser, 1); } Now how can I

Error when building Android Project on Window 10

守給你的承諾、 提交于 2020-01-16 16:44:32
问题 When building for Android I keep having this error: Severity Code Description Project File Line Suppression State Error Failed to create JavaTypeInfo for class: Android.Support.V4.View.Accessibility.AccessibilityManagerCompat/IAccessibilityStateChangeListenerImplementor due to System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Iain Smith\Documents\Developer\Work\Clients\Client1\Project1\Xamarin.Dev.Playground\Source\Client1.Playground.Android\obj\Debug\90