xamarin.android

Xamarin.Android apk crashes after building on visualstudioonline

雨燕双飞 提交于 2019-12-23 01:34:23
问题 We got a Xamarin.Android project and are using visualstudioonline for building our app. When I build locally with my IDE (Visual Studio 2015) the app works as expected in Debug and also in Release mode. I tried to deploy the app directly from Visual Studio (Run) and also to grab the .apk file after a build from the bin directory. Everything works. Now when I build the app with the build server on visualstudioonline the app instantly crashes when I launch the app on a device. Ive got another

Xamarin Android: using StartActivityForResult(); resultCode in OnActivityResult is always “Canceled”

前提是你 提交于 2019-12-23 01:14:28
问题 I have two separate applications written using Xamarin.Android; for the sake of discussion, let's call them "Tristan" and "Isolde". Tristan has some state information that Isolde sometimes needs to know. Complication: Tristan may or may not be running at the moment Isolde develops the need to know his state. I've got kludge working now where Isolde sends a special launch intent to Tristan, who then uses a broadcast intent to send information back to Isolde. (See my earlier question for

OxyPlot in RecyclerView -MVVMCross Xamarin.Android

删除回忆录丶 提交于 2019-12-23 01:12:45
问题 I have the following implementation where I have recycler view, in each view I am trying to display a data using OxyPlot. I could able to see hard coded Plotvalues on the each card, but when I scroll, it is kind of a slow response and app freezes a while. I wonder what I am doing wrong or how to improve this performance issue? MainView.xml <MvxRecyclerView android:id="@+id/myRecyclerView" android:layout_marginTop="10dp" android:scrollbars="vertical" android:divider="@null" android:layout

MvvmCross for MonoDroid - How to bind to Menu Item Click event

只谈情不闲聊 提交于 2019-12-22 18:13:57
问题 I have an MvvmCross PCL and a related MonoDroid UI project (pattern copied from following Stuart Lodge's excellent N+1 video series). I want to bind the click of an Action Bar menu item to an ICommand in my ViewModel. I've seen this post but an IMenuItem doesn't appear to have a suitable property to bind to. I'm aware of the SetOnMenuItemClickListener method but (and this is no doubt my lack of understanding) don't know how to leverage this to bind a System.Windows.Input.ICommand to it. Also,

Cant create single view Application in Xamarin Studio

…衆ロ難τιáo~ 提交于 2019-12-22 15:59:08
问题 I'm trying to create a single view application in Xamarin Studio from the multiplatform tab. However the target platform checkboxes as well as the "Next" button are greyed out/disabled. I'm on a Mac. 回答1: If you have installed free version of Xamarin long time ago when iOs development was not included for free, the iOs and Android components are missing. Even if you upgrade Xamarin from the "Check for updates", it only upgrades the Xamarin Studio to latest version and doesn't add iOs not

How to save images to sqlite database

*爱你&永不变心* 提交于 2019-12-22 15:34:47
问题 In my classe I have a method that searches the image in the photo gallery and also receives the image taken from the camera of the mobile phone, I need now to save this image in the sqlite database. I am using a database field like BLOB, but not like serializing the image in bity [] or transforming in decode64 to write to the database. I would like to know if anyone has any examples to pass on xaramin android I am posting the method that receives the image protected override void

Mono for Android - OutOfMemoryError

三世轮回 提交于 2019-12-22 14:05:48
问题 I am having problems finding a memory leak in my Mono for Android application. I believe I am following all best practices, outlined later, but I keep getting OutOfMemoryError after a consistent, reproducible number of run-throughs of an activity. Using ddms on the emulator I can see that my app is consuming around 200 extra "data objects" and about 30kB of memory every time our ViewFlipper flips to the next page. We are also consuming other resources, but at a much lower rate. I use the

Xamarin.UITest: How to Retrieve All Elements in List

女生的网名这么多〃 提交于 2019-12-22 14:02:23
问题 I have a list of 500 elements and when I use app.Query on the page, Xamarin.UITest gives me only 6 elements as only 6 elements are visible in UI. How can I retrieve all 500 elements from the list inside of my UITest? 回答1: As described above, the expected behavior of app.Query will only return the results of all visible controls on the page. Thus, if a control is not visible, app.Query will not return it. The way to retrieve all of the data in a list is to use a Backdoor Method. Xamarin has

MonoDroid: Sharing non-trivial data between Activities

ぐ巨炮叔叔 提交于 2019-12-22 13:30:54
问题 I have some data that multiple Activities need to manipulate. Basically there is one read-only screen and multiple edit screens that hang off it. At first I considered passing the data as a string parameter on the intent, but if the user presses the back button after editing a field those changes would be lost. So what is the recomended way to share data across the different Activities? Should I just save it to a temp file before each page transition? 回答1: The easiest way to do this is

How can I run something Async in OncreateView?

我只是一个虾纸丫 提交于 2019-12-22 13:07:36
问题 I have a problem with my app. Firstly, I made two Tabs using fragments which inflates an activity . The tabs implemented is working fine. Secondly i have displayed the XAML right. However, I now need to run something asynchronously in OnCreateView in the Fragment. How can i manage this without getting errors? Any help is greatly appreciated! Thanks Here is my Fragment: public class FragmentSettings : SupportFragment { private Button mBtnOk; public FragmentSettings(Context context) { mContext