xamarin.android

How to create a db3 database with Sqlite-Net

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 20:17:33
问题 In a mono project I want to create a database and use that, and Sqlite-Net is optimzied for mono so would go with that. But I cant find any documentation how to create a database with it. So I just try to connect to it and hope it will say "Database dont exists, I will create one" but I get an exception so that approch dont work readonly string _pathToDatabase = "Meter_db.db3"; public InstallMeterRepository() { if(!File.Exists(_pathToDatabase)) { using (var conn = new SQLite.SQLiteConnection(

Problem running a MonoDevelop App

∥☆過路亽.° 提交于 2019-12-11 20:05:27
问题 This is a continuation of my Problem in creating a MonoDevelop App question, The problem is solved, I am able to create an App, but now I'm having problems running it, When I run the application I get an error saying, C:\Users\tarun\Documents\Projects\myAndroidApp\myAndroidApp\aresgen: Error 1: Could not find SDK platform directory 'C:\Program Files (x86)\Android\android-sdk\platforms\android-4'. Ensure you have installed support for this Android platform version in the Android SDK Manager.

Android: Custom Dialog has wrong dimensions

点点圈 提交于 2019-12-11 19:58:22
问题 I'm trying to display a dialog with a custom view. The Layout is pretty simple; basicly there are two LinearLayouts ; every Layout with a TextView and an EditText . The Layout i'm using is this: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <LinearLayout android:orientation="vertical" android:layout_margin="5dip" android:layout_width="wrap_content"

Helping the GC in mono droid using mvvmCross

痞子三分冷 提交于 2019-12-11 19:55:08
问题 I am working with mono droid, using the mvvmcross framework provided by slodge. However I am having some memory issues. I am disposing bitmaps in the activities ondestroy methods and I am wondering if it is possible to help the GC collecting unused objects of viewmodels. If you try setting the viewmodel in the activity to null it all goes to hell and it is clearly not the right way to go. Do you guys have any suggestions to an approach? Regards 回答1: The mvx framework tries to ensure that the

Xamarin forms with Android Binding (.jar) [closed]

旧时模样 提交于 2019-12-11 19:51:37
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . How can I use a .dll generated with Android Binding (.jar) from Xamarin Forms? For example in this Picasso android binding, I can successfully use the .dll in Xamarin.Android, but i do not know how to use it in Xamarin Forms. 回答1: You cannot do that! Xamarin.Forms Bindings (.dll)

MyLocationOverlay - Custom image, but no shadow

倾然丶 夕夏残阳落幕 提交于 2019-12-11 19:18:24
问题 I have an application, which uses a custom implementation of MyLocationOverlay . In the implementation I set a Bitmap property that is used when it has been specified, by an overload of Draw. It works nicely, using my custom image, but it doesn't display a shadow - as is done automatically in an ItemizedOverlay . Can anyone help? Here is (the relevant code from) my class: public class LocationOverlay: MyLocationOverlay { /// <summary>Bitmap to use for indicating the current fixed location.<

how to use textcolor on label of Xamarin forms?

断了今生、忘了曾经 提交于 2019-12-11 19:12:09
问题 The question is very easy and strange… I'm thinking that it may be a bug... Go it. I have Label where I try to set the background color with key of static resource where it has the Hex value of color. It works good. then, I want to use this color on text instead of background so I have changed it from brackgroundcolor property of Xaml to TextColor property. And it is showed with white color instead the custom color. Should I have to do something in order to set the my custom color instead

I've exported my highlighting scheme in Xamarin Studio. Now how do I import it?

萝らか妹 提交于 2019-12-11 19:07:57
问题 The lastest update of Xamarin Studio changed how syntax highlighting is stored and exported, apparently to make it compatible with Visual Studio, and as a result my customized scheme was lost. I painstakingly reconfigured the scheme and exported it. But now when I try to 'add' the scheme into Xamarin Studio on another computer, nothing happens. How can I import the exported scheme onto another computer? 回答1: If the exported file ends with Style.json it will import, e.g.

how to implement Android In App BillingClient in Xamarin.Android Asynchronously

故事扮演 提交于 2019-12-11 18:47:14
问题 I am trying to implement below java code in c# referring to Android documentation List<String> skuList = new ArrayList<> (); skuList.add("premium_upgrade"); skuList.add("gas"); SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder(); params.setSkusList(skuList).setType(SkuType.INAPP); billingClient.querySkuDetailsAsync(params.build(), new SkuDetailsResponseListener() { @Override public void onSkuDetailsResponse(BillingResult billingResult, List<SkuDetails> skuDetailsList) { // Process

Can't write file in USB flash drive with Xamarin Android/Uwp

我的未来我决定 提交于 2019-12-11 18:45:24
问题 I have some troubles. It's about this subject => System.UnauthorizedAccessException : Access to the path “/storage/[Name]/[nameFolder]/[fileName].txt is denied. At System.IO.FileStream etc…. I know this subject is already here in SOF, but I can't find a solution for Xamarin.Android. It's the same for Xamarin.Uwp, no access right. I can't write a file in the root path (from the USB Flash Drive path) = /storage/[NameOfTheFlashDrive] It's the same if I use the Android path = content://com