xamarin.android

reCaptcha in android xamarin

北城余情 提交于 2019-12-11 04:52:18
问题 I would like to implement captcha in Xamarin android app. I got hold of this integrate googles reCaptcha validation in Android. But its a native android project. I also found this, but I am unable to make it work. I am getting Failed to Check Compatibility alert. The API SafetyNetClass.SafetyNetApi.AttestAsync is returning an error. Not sure why. Is there any other way to go about captcha validation. Any help would be appreciated. 回答1: In order to use the SafetyNetApi to do reCaptcha

How to resolve “Can't Update the app(Error Code : 901)” error?

余生长醉 提交于 2019-12-11 04:47:49
问题 I'm migrating one of my live applications from Native to Xamarin. I have successfully done that and now I'm trying to release the same on Google Play Store. I have generated a release build for the same in Xamarin android. Following are the scenarios which will describe the issue I'm facing - Fresh Install - As I have a release apk for my application, I'm able to install it on my device and it's working smoothly. Update Scenario - As I have mentioned earlier that the application is already

How to list all children in Google Drive's appfolder and read file contents with Xamarin / c#?

ε祈祈猫儿з 提交于 2019-12-11 04:37:56
问题 I'm trying to work with text files in the apps folder. Here's my GoogleApiClient constructor: googleApiClient = new GoogleApiClient.Builder(this) .AddApi(DriveClass.API) .AddScope(DriveClass.ScopeFile) .AddScope(DriveClass.ScopeAppfolder) .UseDefaultAccount() .AddConnectionCallbacks(this) .EnableAutoManage(this, this) .Build(); I'm connecting with: googleApiClient.Connect() And after: OnConnected() I need to list all files inside the app folder. Here's what I got so far: IDriveFolder

Xamarin Archive tool - Seemingly normal error but unknown cause

流过昼夜 提交于 2019-12-11 04:35:23
问题 Today, for no reason that I can determine, my Android builds started showing this error below whenever I try to archive them: Please ensure that you are using a release configuration and that the "Use Shared Mono Runtime" option in your project's build options is unchecked. I have, of course, ensured that the "Use Shared Runtime" (that's the closest thing to the error message) option is unchecked. I am also using the same exact Release configuration that has successfully built and archived

Xamarin.Forms: Start an activity using DependencyService

人走茶凉 提交于 2019-12-11 04:33:47
问题 In my Xamarin.Forms.Page I have a DependencyService that must activate an activity in my .Droid project. How do I activate the Activity? I've tried StartActivity(typeof(FacebookActivity)); but I get Java.Lang.NullPointerException: Exception of type 'Java.Lang.NullPointerException' was thrown. What do I have to initialize? 回答1: Found out the problem. I have to put an explicit constructor public FacebookActivity(){} 来源: https://stackoverflow.com/questions/28874892/xamarin-forms-start-an

Setting a light navigation bar makes it invisible

删除回忆录丶 提交于 2019-12-11 04:28:13
问题 I have set the following to have a light navigation bar: Window.DecorView.SystemUiVisibility = (StatusBarVisibility)SystemUiFlags.LightNavigationBar; However, in my app, the navigation bar became invisible: Gmail app showing the wanted result: 回答1: Setting LightNavigationBar, means that your buttons will fit a light theme (so they will be black, for a light background) - but you might want to change the navigationbar background as well. Here is how to do so in your activity: Window

Xamarin Android app crashes on Release mode

試著忘記壹切 提交于 2019-12-11 04:25:43
问题 Xamarin is making me crazy! Several months ago I updated Xamarin to 4.5.0.476 (Xamarin Android 7.3.1.2) and today, updating an App, I discovered that I cannot run my apk in release mode because it crashes when runs. And I can't understand why. I tryed to set all type of permissions on the android manifest. Linker setting is SDK Assembly only but I also tried None . I cleaned and rebuilt several times. There's not conditional code that can fail on sturtup. Nothing, app always crashes when

Floating action button over a scrollview stuck at top

强颜欢笑 提交于 2019-12-11 04:23:28
问题 I'm trying to get a Floating Action Button (FAB) to "float" over a scrollview at the bottom right of the screen and it just gets "stuck" at the top of the scrollview and doesn't move. Here's my XML: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap

ViewPagerIndicator.CirclePageIndicator crash in OnSaveInstanceState

老子叫甜甜 提交于 2019-12-11 04:15:58
问题 So I have this activity with a ViewPager and a CirclePageIndicator. The problem is that if I make a phone call from this page, the activity crashes in OnSaveInstanceState. The log contains the following message : System.MethodAccessException: Method '(wrapper dynamic-method) object:dynamic_callback_0 (intptr,intptr)' is inaccessible from method 'ViewPagerIndicator.CirclePageIndicator/SavedState:InitializeCreator ()' The page is quite simple : <?xml version="1.0" encoding="utf-8"?>

How to use Activity attribute android:showForAllUsers in Xamarin?

折月煮酒 提交于 2019-12-11 04:04:30
问题 The attribute is not implemented in Xamarin. This mean I can't declare it as an attribute of my Activity Class like it should: [Activity(Label = "@string/app_name", Theme = "@style/MainTheme.StopAlarm", LaunchMode = Android.Content.PM.LaunchMode.SingleTask, ScreenOrientation = Android.Content.PM.ScreenOrientation.Portrait, NoHistory = true)] public class StopAlarmActivity : Activity { ... } There's no ShowForAllUsers option. The other option is to edit Properties => AndroidManifest.xml and