xamarin.android

specific ringtone firebase notification xamarin.android

主宰稳场 提交于 2021-02-10 05:48:07
问题 How i can force the push notification to run ringtone instead of default notification sound is there any way to ovveride the default behaviour for firebase onMessageReceived 回答1: You could set the specific ringtone in firebase notification. When you use API 26 or later, you would use Channel of Notification. Use the SetSound of channel would cover the default notification sound. Set the Ringtone with SetSound method of Channel. channel.SetSound(RingtoneManager.GetDefaultUri(RingtoneType

Android image localisation in Xamarin Form

别来无恙 提交于 2021-02-08 11:44:18
问题 I have a Xamarin Form application which has a language dropdown so user can select the application language. When user select a language I call: CultureInfo culture = CultureInfo.CreateSpecificCulture(language); System.Globalization.CultureInfo.CurrentUICulture = culture; Thread.CurrentThread.CurrentCulture = culture; Thread.CurrentThread.CurrentUICulture = culture; AppResources.Culture = culture; The application works fine and picks the strings from AppResources.{language}.resx My problem is

What is Mono shared runtime?

戏子无情 提交于 2021-02-08 11:44:15
问题 I am building an android app on Xamarin. Every time I run the app on my device for testing, it uninstalls the shared runtime and installs Mono shared runtime on the device. I cannot find what is Mono shared runtime exactly. I also want to know whether installing it on the device is harmful in any way, and how can I rollback the changes. 回答1: What is Mono shared runtime? Refer to the document: https://docs.microsoft.com/en-us/xamarin/android/deploy-test/building-apps/build-process The shared

How to set the android datepicker to spinner (not calendar) mode in Xamarin Forms?

霸气de小男生 提交于 2021-02-08 11:28:24
问题 When selecting the datepicker control in Xamarin Forms on an android device the Calendar Mode view of the datepicker is shown. How can I change it to show the Spinner Mode? The only sample I found was to update my styles.xml Here is what I have, which is not working <resources> <style name="MyTheme.Base" parent="@android:style/Theme.Holo.Light.DarkActionBar"> </style> <style name="MyTheme" parent="MyTheme.Base"> <item name="android:actionBarStyle">@style/MyTheme.ActionBarStyle</item> <item

How to determine android device resolution is small, medium, or large

此生再无相见时 提交于 2021-02-08 10:44:50
问题 I am working on a Xamarin.Forms app and I need to identify the android screen/resolution is whether small, medium or large to adjust some content with the available space. For example, some labels (single line) are getting truncated in smaller devices. So I could make some adjustments if the resolution is smaller or not. In iOS, when iPhone screen getting bigger, the resolution is also getting increased so it's easy to identify smaller resolution devices in iOS. But in android, this seems

Remove left space in title view xamarin forms

淺唱寂寞╮ 提交于 2021-02-08 10:08:01
问题 I had an issue in removing the extra left space in title view as shown in the image below please see the screenshot here Ps: I'm using tabbed page and that bar is the navigation title view. 回答1: Set the xml below in your Toolbar.xml of Android part. app:contentInsetLeft="0dp" app:contentInsetStart="0dp" app:contentInsetStartWithNavigation="0dp" Do not forget to add the namespace of app in your Toolbar.xaml . xmlns:app="http://schemas.android.com/apk/res-auto" And check the code below, it need

Remove left space in title view xamarin forms

情到浓时终转凉″ 提交于 2021-02-08 10:05:16
问题 I had an issue in removing the extra left space in title view as shown in the image below please see the screenshot here Ps: I'm using tabbed page and that bar is the navigation title view. 回答1: Set the xml below in your Toolbar.xml of Android part. app:contentInsetLeft="0dp" app:contentInsetStart="0dp" app:contentInsetStartWithNavigation="0dp" Do not forget to add the namespace of app in your Toolbar.xaml . xmlns:app="http://schemas.android.com/apk/res-auto" And check the code below, it need

How to save selected tab when rotating screen/changing tab on Xamarin.Android?

混江龙づ霸主 提交于 2021-02-08 08:45:26
问题 I'm using Xamarin Studio and developing a small test project for Android. I have an Activity with three Tabs on it, each Tab have a different Fragment . So far I got the hang of how to add Tabs and event handlers. But when I rotate the screen, the default Tab I set is selected which causes the Fragment assigned to that Tab to be displayed. Another problem I face is that when I change Tabs , I want to preserve the state of the previous Tab , so when I select it again it won't be rendered again

What is com.android.externalstorage?

戏子无情 提交于 2021-02-08 08:06:39
问题 Despite this being a simple question I cannot find the answer on google or stackoverflow. When I use the following code I get this result //com.android.externalstorage.documents/tree/primary:Podcasts var intent = new Intent(Intent.ActionOpenDocumentTree); intent.PutExtra("android.content.extra.SHOW_ADVANCED", true); intent.PutExtra("android.content.extra.FANCY", true); intent.PutExtra("android.content.extra.SHOW_FILESIZE", true); Can you help me understand the parts of my result? 回答1: How

What is com.android.externalstorage?

寵の児 提交于 2021-02-08 08:05:28
问题 Despite this being a simple question I cannot find the answer on google or stackoverflow. When I use the following code I get this result //com.android.externalstorage.documents/tree/primary:Podcasts var intent = new Intent(Intent.ActionOpenDocumentTree); intent.PutExtra("android.content.extra.SHOW_ADVANCED", true); intent.PutExtra("android.content.extra.FANCY", true); intent.PutExtra("android.content.extra.SHOW_FILESIZE", true); Can you help me understand the parts of my result? 回答1: How