xamarin.android

Xamarin set password to SQLite database

你。 提交于 2019-12-20 05:13:14
问题 The conn.setPassword and conn.open have error, can SQLite.NET set the password to the sqlite database? private void Btnsign_Click(object sender, EventArgs e) { try { SQLiteConnection conn = new SQLiteConnection("Data Source=user.db3;Version=3;"); conn.SetPassword("password"); conn.open(); var data = conn.Table<login>(); var data1 = data.Where(x => x.username == txtusername.Text && x.password == txtPassword.Text).FirstOrDefault(); if (data1 != null) { Toast.MakeText(this, "Login Success",

Prevent activity from reload after rotation in xamarin, monodroid

末鹿安然 提交于 2019-12-20 04:25:06
问题 Ok... So my problem is to prevent from activity to reload after orientation is changed. Basically, what I did is this: [Activity(Label = "migs", ConfigurationChanges = Android.Content.PM.ConfigChanges.Orientation)] This is worked fine, until I changed "Target API" to 14. If I'm changing it back to 12, then everything is working, but on 14, activity is being restarted (OnCreate method is fires after rotation). So... You'll ask why do I need "Target API" 14? - Easy! Because in my app, I'm

Avoid OK Retry button for Xamarin Camera

坚强是说给别人听的谎言 提交于 2019-12-20 04:13:55
问题 I am using the Camera code base from https://github.com/rasmuschristensen/XamarinFormsImageGallery to open camera, take picture and show in the gallery. In the droid project, after taking the picture, the dialog asks either to keep the photo or discard it using OK and Retry button. Is there anyway, I can avoid this step and go to next step. Regards 回答1: Using the Media plugin you won't be able to do it. This plugin use the standard way of capturing photos in Android which rely on the device

Xamarin.android - Copy .jpg to shared folder

▼魔方 西西 提交于 2019-12-20 03:52:20
问题 I'm using a Samba File Server for copy files from my Android device to a shared folder on Windows. With .txt files i haven't any problems, works fine, but I tried to copy a .jpg file into shared folder and it fails. I searched a lot of codes from internet but anyone solved my problem. I managed to copy the image, but when I open it, is damaged. Does anyone have any sample code? My code is this: Java.IO.File mfile = new Java.IO.File(item.FullName); var mSharedFolderCalidad = new SmbFile

Can't set the textview in the navigation drawer using navigation view in main activity. Xamarin Android

自作多情 提交于 2019-12-20 03:28:06
问题 This is the main activity where I am setting all the icons, menu, drawer and my navigation view. Here I set another view by inflating nav_header into the view and set the textview but I still can't seem to change the textview in the navigation drawer. MainActivity using Android.App; using Android.Content.PM; using Android.OS; using Android.Support.V4.Widget; using Android.Views; using RoutineApp.Fragments; using Android.Support.V7.App; using Android.Support.V4.View; using Android.Support

MvvmCross Android Bind Image from byte[]

怎甘沉沦 提交于 2019-12-20 03:17:00
问题 Does anyone know how to bind a byte[] (image) to a Image control in a axml view. My ViewModel inherit from MvxViewModel. All my other bindings works great but I cannot find a way to bind that image. 回答1: I think you could bind this using a custom UI control. To do this, you'll need to do something like: inherit a new MyImageView from ImageView add the default constructor (which passes the context and attributes down to the base constructor) add a new RawImage property to MyImageView ,

How to create view's actions listener for MvxItemTemplate

岁酱吖の 提交于 2019-12-20 03:11:35
问题 I have a view which contains an MvxListView and a form. I can hide the softkeyboard using the following code in my view's code (as this is pure view concerns) var editText = FindViewById<EditText>(Resource.Id.newCheckbookName); editText.EditorAction += (object sender, TextView.EditorActionEventArgs e) => { if (e.ActionId == ImeAction.Done) { InputMethodManager inputMgr = GetSystemService(InputMethodService) as InputMethodManager; inputMgr.HideSoftInputFromWindow(CurrentFocus.WindowToken, 0);

Why does my Xamarin Android application suddenly require external storage permissions?

亡梦爱人 提交于 2019-12-20 03:07:26
问题 I have a Xamarin Android application I've been trying to create an update for. Right when everything was hooked up and working, and I finally made the release APK, I get a message from Google Play that the uploaded APK now requires two extra permissions. For reading and writing to external storage! I don't need these permissions in my application at all. I tried looking at my project's Android Manifest, and saw no such permissions listed there. Older versions of my application (using older

Xamarin.Android java.lang.ClassNotFoundException

本小妞迷上赌 提交于 2019-12-20 02:15:27
问题 I'm trying to receive files from external apps using Intent and Action.Send. I chose my app at chooser list and then app trying to start but it crashes: java.lang.ClassNotFoundException: Didn't find class "net.inlu.Incrypta.MainActivity" on path: DexPathList[[zip file "/data/app/net.inlu.Incrypta-1.apk"],nativeLibraryDirectories=[/data/app-lib/net.inlu.Incrypta-1, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader

Xamarin android app throws ResourceNotFoundException

喜夏-厌秋 提交于 2019-12-20 02:08:21
问题 Since 1 week I discovered Xamarin framework, and my job is to make Android app work. iOS app has been already launched before. I had to deal first with some NuGet Packages dependencies, but now the only exception I get is : 06-26 15:01:40.719 E/mono-rt (20038): [ERROR] FATAL UNHANDLED EXCEPTION: Android.Content.Res.Resources+NotFoundException: Resource ID #0x0 06-26 15:01:40.719 E/mono-rt (20038): at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder