xamarin.android

Creating custom notification with xamarin.android

柔情痞子 提交于 2020-01-04 11:50:00
问题 I have been trying to make a fully custom notification with Xamarin.android. My project targets min API of 14, so expended notification are supported. I'm trying to achieve the same look for all API's so i'm using Android.Support.V4.App.NotificationCompat.Builder . I have found out that you can use setCustomContentView to set a custom View that will change the layout of the notification complitly, which is what i aim for. Here is the code that i have tried to run: RemoteViews widgetLayout =

Which .Net Standard version supports which Android versions?

假装没事ソ 提交于 2020-01-04 09:40:46
问题 I want to convert a Xamarin PCL project to .Net Standard. My question is, what versions of Android will that support? My current project supports Android 4. Will .Net Standard be able to support it? Does it depend on the .Net Standard version? I've seen this table but it only tells me the "Xamarin" version supported, and I don't understand the connection between that and the Android version. Is .Net Standard unrelated to the Android version (somewhat like the C# version is separate from the

HttpClient not working on android

北战南征 提交于 2020-01-04 09:35:46
问题 I'm making Xamarin.Forms app which should get JSON from api and then allow to display it. My code so far: public async void jsonDownload() { connect(); await downloadData(); } public void connect() { client = new HttpClient(); client.MaxResponseContentBufferSize = 256000; } public async Task<List<Jsonclass>> downloadData() { String url = "https://my-json-server.typicode.com/kgbzoma/TestJsonFile/all"; var uri = new Uri(string.Format(url, string.Empty)); try { var response = await client

HttpClient not working on android

﹥>﹥吖頭↗ 提交于 2020-01-04 09:33:20
问题 I'm making Xamarin.Forms app which should get JSON from api and then allow to display it. My code so far: public async void jsonDownload() { connect(); await downloadData(); } public void connect() { client = new HttpClient(); client.MaxResponseContentBufferSize = 256000; } public async Task<List<Jsonclass>> downloadData() { String url = "https://my-json-server.typicode.com/kgbzoma/TestJsonFile/all"; var uri = new Uri(string.Format(url, string.Empty)); try { var response = await client

Mono for Android is a framework that need to be installed on android devices or is a compiler that compiles to java bytecode?

二次信任 提交于 2020-01-04 08:06:05
问题 I'm trying to understand how mono for android works and I'm not found this explanation in official site. Taking into account that android reads java bytecode, Mono for Android is a framework that need to be installed on android devices or is a compiler that compiles to java byte code? 回答1: This article on Xamarin's site describes how the architecture is put together. Long story short, there is nothing compiling C# into Java byte code. Mono for Android applications ship with the Mono runtime

Upload fails on google play even after adding android:debuggable=“false”

送分小仙女□ 提交于 2020-01-04 07:09:30
问题 I am trying to upload my apk to the google store and it says You uploaded a debuggable APK. For security reasons you need to disable debugging before it can be published in Google Play. I have added android:debuggable="false" and i am signing it in release mode with a unique key still I am getting the error. I am building using xamarin <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mycompApp.MyApp" android:versionCode="1" android:versionName="1.0" android

How to change color of tabbed page indicator in Xamarin.Droid?

断了今生、忘了曾经 提交于 2020-01-04 05:39:09
问题 I'm building an application with Xamarin.Forms and a Portable Class Library. I have a tabbed page. I want to change the color of the tabbed page indicator. Changing the rest of the layout is something I already managed, the only thing I do need is to change the light blue tabbed page indicator like shown below: I couldn't find anything that could work in Xamarin.Droid. This is the code that creates the tabbed page with content: class TabbedPageTry : TabbedPage { public TabbedPageTry() { Title

ZXing QR Code Generation in Xamarin Forms PCL

萝らか妹 提交于 2020-01-04 05:38:24
问题 I'm trying to generate and display QR code using ZXing package, I tried in following code I was not able to show QR code. It's showing blank image (transparent). private void OnGenerateQRCodeButton_Clicked(object sender, EventArgs e) { var writer = new BarcodeWriter { Format = BarcodeFormat.QR_CODE, Options = new EncodingOptions { Height = (int)imageCompanyLogo.Height, Width = (int) imageCompanyLogo.Width, Margin = 0, PureBarcode = true } }; var bitmap = writer.Write("www.helloworld.com");

My Xamarin.Android app sometimes crashes on launch

坚强是说给别人听的谎言 提交于 2020-01-04 05:36:29
问题 Recently, my Xamarin.Android app has started to crash on launch, caused by: Java.Lang.ClassNotFoundException: mono.android.app.Application This exception is being thrown more often than not. Usually, a rebuild fixes the issue for a build or two. I tried to combat the issue by making my own application class: [Application(AllowBackup = true, Debuggable = true, Label = "My Application", Theme = "@style/AppBaseTheme", Icon = "@drawable/icon", Logo = "@drawable/icon")] [MetaData("com.google

Update ViewModel from another ViewModel Xamarin.Forms

笑着哭i 提交于 2020-01-04 04:57:08
问题 I am working on a Xamari.Forms application in which I have a MainPageView.Xaml and MainPageViewModel.cs , also I have stackLayout inside MainPageView.Xaml where I'm loading a view ( binded to another viewmodel ) dynamically. I have to update some values in second ViewModel which is binded to the view when ever there are some changes in MainPageViewModel.cs . I'm using Messaging Center for that now but everytime i cannot use Messaging center because I have to Unsubscribe it else it will get