xamarin.android

Android Xamarin - retrieve the image stored in an imageview

╄→гoц情女王★ 提交于 2019-12-24 10:24:45
问题 I retrieve an image as a byte arrary stored in a database convert it to a bitmap and display it in an Imageview. I want to be able to retrieve that image from the Imageview and store it back to the database. My database retrieval code is: TheService myService = new TheService.DataInterface(); DataSet MyPhoto = myService.GetPhoto(id); byte[] imageBytes = (byte[])MyPhoto.Tables[0].Rows[0][0]; Bitmap bitmap = BitmapFactory.DecodeByteArray(imageBytes, 0, imageBytes.Length); imageview

Navigate from Xamarin Forms to Xamarin Native

拈花ヽ惹草 提交于 2019-12-24 10:12:56
问题 My problem is that I require the first pages of my app to be Native. I need a way to Navigate from a Xamarin Forms Content Page to the first native pages of the app when a user signs out. Is there anyway of from a Forms page starting a native ViewController (iOS) or starting an Activity (Android). I use custom renderers regularly. It would be brilliant if I could somehow restart the app or call AppDelegate again or something. Any help is appreciated. 回答1: If you use custom renderers regularly

How to call methods of a .so file from Xamarin Android?

对着背影说爱祢 提交于 2019-12-24 10:08:02
问题 I have a .so file from an Android driver manufacturer. They provide an example in Java. The problem is that my app is developed in Xamarin Android. Is it possible to call methods of a .so file from Xamarin? 回答1: 1.Create a lib folder in your project 2.Under that create additional subfolders for the platform: armeabi, armeabi-v7a etc. 3.Add your .so files to the appropriate directory. Make sure they are set to type AndroidNativeLibrary or whatever it is. 4.Create p/invoke signatures for the c

System.EntryPointNotFoundException on SqlDataAdapter.Fill Method

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 10:04:02
问题 We are concurrently developing Android and iPhone apps and the core code (written in C#) is shared between them. The SQLite database initialization code, for example, is the same in both apps with only slight variations to accommodate the file structure on each platform. The following code is working in MonoTouch, but throws an EntryPointNotFoundException in Mono for Android: try { System.Data.Common.DbDataAdapter adapter = new SqliteDataAdapter(selectCommand); retVal = adapter.Fill(dataSet);

create image file from byte array in documents Xamarin Android

冷暖自知 提交于 2019-12-24 09:59:06
问题 Could anyone help me about how to create image file from byte array in documents Xamarin Android and get the new path for the image please ? Here my code : Stream stream = ContentResolver.OpenInputStream(data.Data); Bitmap bitmap = BitmapFactory.DecodeStream(stream); MemoryStream memStream = new MemoryStream(); bitmap.Compress(Bitmap.CompressFormat.Jpeg, 50, memStream); byte[] picData; picData = memStream.ToArray(); now picData is byte array, and I need to create a Jpeg file in doucments and

How to show ProgressBar and make it progress?(Xamarin.Android)

…衆ロ難τιáo~ 提交于 2019-12-24 09:50:03
问题 I call a web service which gets 4 files, and while these files are loading I want to show progress to the user (circular or horizontal it doesn't matter). I've followed the examples on internet but nothing appears on screen. MobileSellReference.Service1 service = new MobileSellReference.Service1(); service.Url = settings.Synchronization.Msellurl; ProgressBar progressBar = FindViewById<ProgressBar>(Resource.Id.progressBar); progressBar.Max = 100; progressBar.Progress = 0; byte[][]

Xamarin in Visual Studio packaging failed | mono-symbolicate error -1073740791

笑着哭i 提交于 2019-12-24 09:40:47
问题 I'm getting the following error when trying to packaging my Xamarin Android application. The application works perfectly in debug mode on my mobile, now I'm just trying to generate the APK and I get this error message: Archiving App Bundle 'PoolHeatingClient'... Creating archive directory 'PoolHeatingClient'... Creating directory 'C:\Users\entro\AppData\Local\Xamarin\Mono for Android\Archives\2016-10-29\PoolHeatingClient 10-29-16 4.21 PM.apkarchive'... Deleting files '*.apk'... Packaging

upload image files using google drive Api

情到浓时终转凉″ 提交于 2019-12-24 09:37:30
问题 Trying to upload an image file (already existing) from a user's phone (Android) on his google drive via my app using drive API and Xamarin (C#). There are several solutions to upload but they all are showing to upload a new file.. for example Google Drive API implementation Xamarin Android Upload file into google drive folder using Xamarin.Android both the solution given by @sushihangover create a new text file and then upload it via v3 API. I looked into the API as well but couldn't sort it

How to query an IDriveResource in Google Drive for Xamarin.Android using the Drive API?

给你一囗甜甜゛ 提交于 2019-12-24 09:26:34
问题 I'm trying to get an IDriveResource in the Google Drive Apps Folder using a query, but I'm having trouble with type casting. Here's the code I got so far: using (IDriveFolder appFolder = DriveClass.DriveApi.GetAppFolder(googleApiClient)) using (QueryClass query = new QueryClass.Builder().AddFilter(Filters.Eq(SearchableField.Title, MY_FILE_NAME)).Build()) using (var queryResult = await appFolder.QueryChildrenAsync(googleApiClient, query)) using (var driveItem = queryResult.MetadataBuffer) {

Immersive mode while using keyboard

被刻印的时光 ゝ 提交于 2019-12-24 09:11:23
问题 In Xamarin.Forms app in MainActivity.cs I set immersive sticky mode: protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); Xamarin.Forms.Forms.Init(this, bundle); SetFullscreen(); LoadApplication(new App()); } void SetFullscreen() { var uiOptions = (int)Window.DecorView.SystemUiVisibility; uiOptions |= (int)SystemUiFlags.LowProfile; uiOptions |= (int)SystemUiFlags.Fullscreen; uiOptions |=