xamarin.android

Retrieving the component name of a service defined in another Xamarin application

本秂侑毒 提交于 2019-12-25 09:05:09
问题 I'm currently implementing an Android Service which is to be consumed by another application of a partner company. They implement the frontend GUI, we do the business logic inside the Service. The Service is declared like this: [Service] [IntentFilter(new[] { "PsiServiceHost" })] public class PsiServiceHost : Service { ... } The consuming application (optionally) starts the service and connects to it using this Intent: serviceIntent = new Intent("PsiServiceHost"); Starting the service using .

Unable to get provider (ClassNotFoundException) Xamarin

混江龙づ霸主 提交于 2019-12-25 08:58:41
问题 I am working on a Solution in Xamarin which contains at least 4 different Android Applications. My Goal is to create a shared content provider for all of these four apps so that I can have the Master data in one place (If an application updates that data, I can get that updated version in another app). In Visual Studio, I have create a PCL project where I have defined the Content provider (which I can reference in all applications and do the CRUD operations). My Content Provider is as follows

How to perform some actions before letting user to do anything?

对着背影说爱祢 提交于 2019-12-25 08:56:00
问题 I need to perform some actions before application actually started. I tried this but can't reach breakpoint: public class MyApplication : Android.App.Application { public MyApplication(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer) { } public override void OnCreate() { base.OnCreate(); int test = 1; //breakpoint } } Am I doing something wrong? Or here is some debugger problem? 回答1: The key item here is to "Register" your custom Application class by using

Aligning Two LinearLayout Side By Side Inside a CardView

本秂侑毒 提交于 2019-12-25 08:49:54
问题 I am trying to align two TextView s OR LinearLayout s side by side in order to reach this cardView: I have used layout_gravity and layout_weight attributes inorder to solve this situation, but with no luck. I am open to any other suggestions that may accomplish my goal as log as I can generate cardview dynamicaly using BaseAdapter with ListView in the Activity Code. I am looking for XML solution. Here is my xml code: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http:/

Xamarin displaying wrong images

橙三吉。 提交于 2019-12-25 08:49:32
问题 I have a xamarin forms project that started behaving strangely... It started randomly replacing images with different images from the resource folder. It seems to only be happening in the Android project, iOS is behaving correctly. I've removed the recently added images and readded them, clean, rebuild, nothing sees to be helping. The images that are getting changed are not being overwritten, and the code references the correct file. Has anyone run into a similar issue before? Thoughts on how

MonoDevelop android - no emulators listed (Windows XP)?

我与影子孤独终老i 提交于 2019-12-25 08:46:13
问题 Just installed MonoDevelop for Android 2.8.6.5 on Windows XP. When I try to run the project there are no emulators showing up in the emulator list. Any ideas why? 回答1: Run-> Select Device . You need to select the emulator devices listed and then click on " Start Emulator", it will take a while to start the emulator OR click "Create Emulator", it will start AVD manager and select the device and "Start". After the emulator boots up completely, try Run->Run With Hope it helps 来源: https:/

Xamarin 5.10.3 installation error (on mac)

给你一囗甜甜゛ 提交于 2019-12-25 07:39:27
问题 I have a problem while running Xamarin 5.10.3 . I installed xamarin 5.10.3 and MonoFramework-MDK-4.4.0.142 among other dependencies, but I keep getting this error: 回答1: The error indicates that the MonoDroid addin is disabled. So you can try enabling it in the Add-in Manager or if that is not possible you can edit the following file and make sure the MonoDroid addin is enabled there: ~/Library/Caches/XamarinStudio-5.0/addin-db-002/config.xml If none of the above work I would close Xamarin

xamarin forms label in a scroll view pinch and zoom android

拜拜、爱过 提交于 2019-12-25 07:27:36
问题 I need a label with large text like a article which needs pinch to zoom capability for that I have written a ZoomableScrollview which works fine in IOS and Windows but not in android. Please see the code below. Code in PCL public class ZoomableScrollView:ScrollView { public static readonly BindableProperty MinimumZoomScaleProperty = BindableProperty.Create("MinimumZoomScale", typeof(float), typeof(ZoomableScrollView), default(float)); public float MinimumZoomScale { get { return (float

How can i display an emoji in the Toolbar title?

为君一笑 提交于 2019-12-25 07:21:39
问题 I have an emoji(ex: "\U0001F610") and I'd like to display it in the toolbar title. It works well in a TextView, but it doesn't seem to work for the toolbar. Can you give me any advice on how to do it properly? 回答1: ActionBar.Title = "\uD83D\uDE03"; ActionBar.Title = "\uD83D\uDE03" + "\uD83D\uDE0F" + "\uD83D\uDE10"; 来源: https://stackoverflow.com/questions/38396429/how-can-i-display-an-emoji-in-the-toolbar-title

Unable to save the changes in XML file

 ̄綄美尐妖づ 提交于 2019-12-25 06:58:20
问题 i am facing problem when i try to save the XML file i store the XML file in Assets folder and set build action to Android Assets but when xml.Save("Q317664.xml"); line comes it gives exception System.UnauthorizedAccessException: Access to the path "/Q317664.xml" is denied.i am not sure why this is occurring using System; using Android.App; using Android.Content; using Android.Runtime; using Android.Views; using Android.Widget; using Android.OS; using System.IO; using System.Reflection; using