728x90
반응형

https://support.google.com/googleplay/android-developer/answer/9799150?hl=ko 

 

백그라운드 위치 정보 액세스 요청하기 - Play Console 고객센터

도움이 되었나요? 어떻게 하면 개선할 수 있을까요? 예아니요

support.google.com

 

받은메일

반응형
728x90
반응형

Debug 에서는 발생되지 않았던 오류가 Release 모드에서 아래처럼 발생되었다.

>------ 빌드 시작: 프로젝트: HybridPermission.Android, 구성: Release Any CPU ------
>  HybridPermission.Android -> C:\Users\kjun\source\repos\HybridPermission\HybridPermission\HybridPermission.Android\bin\Release\HybridPermission.Android.dll
>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Legacy.targets(643,5): error XALNK7000: Mono.Linker.MarkException: Error processing method: 'System.Void AndroidX.RecyclerView.Widget.RecyclerView/LayoutManager::n_OnInitializeAccessibilityNodeInfo_Landroidx_recyclerview_widget_RecyclerView_Recycler_Landroidx_recyclerview_widget_RecyclerView_State_Landroidx_core_view_accessibility_AccessibilityNodeInfoCompat_(System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr)' in assembly: 'Xamarin.AndroidX.RecyclerView.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve AndroidX.Core.View.Accessibiity.AccessibilityNodeInfoCompat

해결방법은 간단하다 Nuget Package 에서 'Xamarin.AndroidX.RecyclerView' 를 설치해 주면된다.

 

 

반응형
728x90
반응형


<
Label>

    <Label.FormattedText>

        <FormattedString>

            <FormattedString.Spans>

                <Span Text="("/>

                <Span Text="{Binding MainNotice.created_at}"/>

                <Span Text=") "/>

                <Span Text="{Binding MainNotice.title}" />

            </FormattedString.Spans>

        </FormattedString>

    </Label.FormattedText>

</Label>

 

 

반응형
728x90
반응형

 

 

             xmlns:zx="clr-namespace:ZXing.Net.Mobile.Forms;assembly=ZXing.Net.Mobile.Forms"

             xmlns:zxcm="clr-namespace:ZXing.Common;assembly=zxing.portable"

 

            <zx:ZXingBarcodeImageView x:Name="barcodeImage" BarcodeFormat="QR_CODE" BarcodeValue="{Binding QrCodeString}" WidthRequest="180" HeightRequest="180">

                <zx:ZXingBarcodeImageView.BarcodeOptions>

                    <zxcm:EncodingOptions Width="450" Height="450" />

                </zx:ZXingBarcodeImageView.BarcodeOptions>

            </zx:ZXingBarcodeImageView>

 

 

 

반응형
728x90
반응형

아래처럼 빠른 배포 사용(디버그 모드 전용) 을 체크 해제하면 된다.

반응형
728x90
반응형

 

 

public Stream ConvertImageStream(string text, int width = 300, int height = 300)

{

var barcodeWriter = new ZXing.Mobile.BarcodeWriter

{

Format = ZXing.BarcodeFormat.QR_CODE,

Options = new ZXing.Common.EncodingOptions

{

Width = width,

Height = height,

Margin = 10

}

};

 

barcodeWriter.Renderer = new ZXing.Mobile.BitmapRenderer();

var bitmap = barcodeWriter.Write(text);

var stream = new MemoryStream();

bitmap.Compress(Bitmap.CompressFormat.Png, 100, stream);

stream.Position = 0;

return stream;

}

 

 

반응형
728x90
반응형

Xamarin 에서 몇개 샘플앱을 실행하는데 아래와 같은 에러 표시가 뜨면서 기기로 배포가 안되고 생략이 되버렸다.

 

 

솔루션의 속성에서 배포 부분을 체크해 주면된다.

 

 

반응형
728x90
반응형

https://github.com/NateRickard/Plugin.AudioRecorder

 

NateRickard/Plugin.AudioRecorder

Audio Recorder plugin for Xamarin and Windows. Contribute to NateRickard/Plugin.AudioRecorder development by creating an account on GitHub.

github.com

위 누겟을 사용하여 마이크 녹음을 처리하고 있는데 iOS 에러 아래와 같은 에러가 발생되었다.

'audioQueue.Start() returned non-OK status: GeneralParamError'

처음에는 파일 저장문제 인줄 알았는데 깃헙 이슈에 여러사람이 위문제를 물어보고 있었다 

답은 

AppDelegate.cs 에 아래 내용을 넣으면 된다.

AudioPlayer.RequestAVAudioSessionCategory(AVAudioSessionCategory.Playback); 
AudioRecorderService.RequestAVAudioSessionCategory(AVAudioSessionCategory.Record);
    // The UIApplicationDelegate for the application. This class is responsible for launching the 
    // User Interface of the application, as well as listening (and optionally responding) to 
    // application events from iOS.
    [Register("AppDelegate")]
    public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
    {
        //
        // This method is invoked when the application has loaded and is ready to run. In this 
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();

            CrossMediaManager.Current.Init();
            AudioPlayer.RequestAVAudioSessionCategory(AVAudioSessionCategory.Playback); 
            AudioRecorderService.RequestAVAudioSessionCategory(AVAudioSessionCategory.Record);

            LoadApplication(new App());

            return base.FinishedLaunching(app, options);
        }
    }

 

 

반응형
728x90
반응형

private string GetDeviceSerialNumber()

        {

            // https://gist.github.com/flawyte/efd23dd520fc2320f94ba003b9aabfce

            try

            {

                Java.Lang.String sn = null;

                Java.Lang.Class c = Java.Lang.Class.ForName("android.os.SystemProperties");

                Method get = c.GetMethod("get", Java.Lang.Class.FromType(typeof(Java.Lang.String)));

 

                sn = (Java.Lang.String)(get.Invoke(c, "sm.sn1"));

 

                if (string.IsNullOrEmpty(sn.ToString()))

                {

                    sn = (Java.Lang.String)(get.Invoke(c, "gsm.sn1"));

                }

 

                if (string.IsNullOrEmpty(sn.ToString()))

                {

                    sn = (Java.Lang.String)(get.Invoke(c, "ril.serialnumber"));

                }

                

                if (string.IsNullOrEmpty(sn.ToString()))

                {

                    sn = (Java.Lang.String)(get.Invoke(c, "sys.serialnumber"));

                }

 

                if (string.IsNullOrEmpty(sn.ToString()))

                {

                    sn = (Java.Lang.String)(get.Invoke(c, "ro.serialno"));

                }

 

                if (sn == null)

                    return "";

 

                else

                    return sn.ToString();

            }

 

            catch (global::Java.Lang.Exception ex)

            {

                return "";

            }

        }

 

반응형
728x90
반응형

var metrics = new DisplayMetrics();
var windowManager = this.GetSystemService(Context.WindowService) as IWindowManager;
windowManager.DefaultDisplay.GetMetrics(metrics);

var height = metrics.HeightPixels;
var width = metrics.WidthPixels;
var xdpi = metrics.Xdpi;
var ydpi = metrics.Ydpi;
var density = metrics.Density;

반응형

+ Recent posts