Android Resource Name From Xamarin Forms Button

前端 未结 1 944
囚心锁ツ
囚心锁ツ 2021-01-13 21:45

The Play Store now allows you to specify credentials for the Pre-launch Report emulator to use. In order for the emulators to know which text field to add the credentials to

相关标签:
1条回答
  • 2021-01-13 21:51

    You have two options to use the Pre-launch reports with Xamarin.Forms:

    1) Define a Login Activity via a Layout XML resource that includes a username & password Entry fields, a login button is optional and if not supplied, the robots will tap every available button on the screen.

    You can either define this Activity as your main launcher (or the activity that gets launched after "splash screen" activity) and perform the login authentication independently of Xamarin.Forms code, of course you can access PCL/NStd library code. After authentication success, proceed to the "MainActivity" which does the normal Xamarin.Forms initiation or present this Login Activity (or ViewGroup, Fragment, ...) via a custom renderer (or a dependency service which is the easiest for a complete Activity....)

    Now you know the resource ids that Google needs as they are hardcoded in the Login layout XML...

    2) Publish your app as an Alpha/Beta and either have it auto-login to a test account or just present a login screen that have a pre-supplied test account user and pwd filled in and have those entries set to read-only. The robot will tap the login button.

    Option 2 is the quickest and easiest to setup as you would already have a login Page and just need to define a test account id/pwd to those two fields as defaults and then set those fields to read-only....

    0 讨论(0)
提交回复
热议问题