xamarin.android

How wake up device and show an activity on top of lock screen for alarm?

£可爱£侵袭症+ 提交于 2019-12-18 05:09:10
问题 I have an old android app with an alarm where the user can set a time and alarm behavior like ringtone and ring duration, volume, if it only vibrates or if it's silent. It was working but it stopped working a long time ago due to new android rules and just now I had time to update it but I can't find an up-to-date answer to these questions. Once the alarm is due I need to open an activity, on top of anything, including another app or lock screen, just like the default android alarm or an

Start an Android activity in Xamarin Forms?

自闭症网瘾萝莉.ら 提交于 2019-12-18 05:06:25
问题 I am trying to view a hosted PDF file with the default Android pdf viewer in my App with the following code var intent = new Intent(Intent.ActionView); intent.SetDataAndType(Uri.Parse("http://sample/url.pdf"), "application/pdf"); intent.SetFlags(ActivityFlags.ClearTop); Android.Content.Context.StartActivity(intent); I have used this code in a Native project, so I know that it works within an Android activity. For Xamarin Forms, is there a way for me to start an Android activity from a content

Saving Bitmap to File - Xamarin, Monodroid

喜夏-厌秋 提交于 2019-12-18 04:55:10
问题 I am trying to save a bitmap image to a directory (gallery) inside my phone. The app is being developed in Xamarin so the code is C#. I cant seem to figure out how to make a directory, and save a Bitmap. Any suggestions? public void createBitmap(View view){ view.DrawingCacheEnabled = true; view.BuildDrawingCache (true); Bitmap m_Bitmap = view.GetDrawingCache(true); String storagePath = Android.OS.Environment.ExternalStorageDirectory.AbsolutePath; Java.IO.File storageDirectory = new Java.IO

VS 2015 Xamarin: Warning IDE0006 Error encountered while loading the project

谁说我不能喝 提交于 2019-12-18 04:45:33
问题 I am developing an Android app using Xamarin. Visual Studio shows this warning, and I don't know what it means. I've followed the instructions but I can't seem to find the temp\\file Severity Code Description Project File Line Suppression State Detail Description Warning IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled. daijoubu-app 1 Active To see what caused

Monodroid: Where should I put configuration settings?

旧时模样 提交于 2019-12-18 04:09:29
问题 From Miguel de Icaza: We use a library profile that is better suited for mobile devices, so we removed features that are not necessary (like the entire System.Configuration stack, just like Silverlight does). After years of .NET development, I'm accustomed to storing configuration settings in web.config and app.config files. When using Mono for Android, where should I put my configuration settings? If it matters, I'd like to store different configuration settings for different build

Error: JNI ERROR (app bug): accessed stale global reference

怎甘沉沦 提交于 2019-12-18 03:57:00
问题 I am getting this error JNI ERROR (app bug): accessed stale global reference When I run my app in Android OS v4, But when I run the same application in Android v2.3 I don't get this error. This error occurs at the point where I call AsyncTask class, where I pass a string array as argument Could Anyone Help me?? 回答1: This error occurs when you call a method with an incorrect parameter type. Make sure your method signature matches exactly what you are passing. For a string array: jmethodID mid

Custom Keyboard in Xamarin forms

流过昼夜 提交于 2019-12-18 03:32:10
问题 I've read the many posts on the forum and on StackOverflow and other places on making custom keyboards, but have not found an approach that will work for my Xamarin forms cross-platform project. It is programmatically generated. For example, I built this keyboard that was recommended in several places: I try to integrate this into my Xamarin forms app but not able to do this https://github.com/Vaikesh/CustomKeyboard/blob/master/CustomKeyboard/Activity1.cs It works fine as a standalone I want

Targeting/Developing for multiple mobile platforms with one programming language (C#)? Cost-Benefit?

假如想象 提交于 2019-12-17 22:37:04
问题 Today it is possible to use C# programming for multiple mobile platforms such as: WindowPhone7 Android - Monodroid iPhone - Monotouch (feel free to edit if I missed some) Of course, it is still programming effort for UI, but main libraries of app can be shared. We can all thank to a team gathered around Mono project and superhero Miguel de Icaza whose effort is priceless. What bothers me is, what are the benefits of these options? Is it cost of maintaining one app across multiple mobile

Bind button click inside customlayout using mvvmcross and mvxlistview

南笙酒味 提交于 2019-12-17 21:32:12
问题 i wanted to bind a button click event inside my customlayout, below is my customlayout <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:local="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="63dp"> <LinearLayout android:orientation="horizontal" android:minWidth="25px" android:minHeight="25px" android:layout_width="match_parent" android:layout_height="match_parent" >

How can I place a button in the the tabs of a TabbedPage in Xamarin.Forms?

纵饮孤独 提交于 2019-12-17 20:33:28
问题 I am using a Tabbed Page combined with a Master Detail Page for navigation in my Xamarin.Forms app. Currently when a menu option is selected from the Master Detail Page a new tabbed page is added with the page's content. I want to place a button to close the tab in the title field of the tab. Is this possible? Currently I just have a button within the content page for the tab, but this is less than ideal. I want it to be very web browser like. Thanks in advance! Edit: I have added the image.