강명진 11월 11일, 2021에 포스트됨 공유하기 11월 11일, 2021에 포스트됨 전화 걸기를 하면 아래와 같은 에러 메세지가 나타나는데 해결방법이 있을가요? Java type Jcontent_ContextCompact count not be found. 인용하기 이 댓글 링크 다른 사이트에 공유하기 더 많은 공유 선택 사항
0 c2design 11월 11일, 2021에 포스트됨 공유하기 11월 11일, 2021에 포스트됨 단순히 전화걸기만 했다고 하시면 어떻게 하셨는지 알수가 없습니다. 관련 소스도 같이 올려주셔야 답변해 드릴수 있습니다. 인용하기 이 댓글 링크 다른 사이트에 공유하기 더 많은 공유 선택 사항
0 강명진 11월 15일, 2021에 포스트됨 Author 공유하기 11월 15일, 2021에 포스트됨 (edited) 소스 올려드립니다. Edited 11월 16일, 2021 by 강명진 인용하기 이 댓글 링크 다른 사이트에 공유하기 더 많은 공유 선택 사항
0 강명진 11월 15일, 2021에 포스트됨 Author 공유하기 11월 15일, 2021에 포스트됨 On 2021. 11. 12. at 오전 12시 58분, c2design said: 단순히 전화걸기만 했다고 하시면 어떻게 하셨는지 알수가 없습니다. 관련 소스도 같이 올려주셔야 답변해 드릴수 있습니다. unit CustTelD; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Controls.Presentation, FMX.Layouts, FMX.Effects, FMX.Edit, FMX.ListBox, FMX.Objects, FMX.PhoneDialer, FMX.Platform, System.Permissions, FMX.Memo.Types, FMX.ScrollBox, FMX.Memo; type TfmCustTelD = class(TForm) Layout1: TLayout; Panel3: TPanel; Timer: TTimer; ToolBar1: TToolBar; txTitle: TText; Panel6: TPanel; Line3: TLine; Panel7: TPanel; ShadowEffect4: TShadowEffect; Panel1: TPanel; ShadowEffect1: TShadowEffect; lbxSUnitPrice: TListBox; lbiS1: TListBoxItem; lbTDate: TLabel; Label7: TLabel; lbTTime: TLabel; Label11: TLabel; lbTClass: TLabel; lbiS2: TListBoxItem; lbCustName: TLabel; lbiS3: TListBoxItem; lbRepName: TLabel; lbiS4: TListBoxItem; lbPhone: TLabel; Label1: TLabel; lbMobile: TLabel; lbiS5: TListBoxItem; lbAddr: TLabel; ShadowEffect2: TShadowEffect; Layout3: TLayout; lbClock2: TLabel; lbClock1: TLabel; Layout4: TLayout; Button1: TButton; bbnInsert: TButton; bbnCancel: TButton; Panel2: TPanel; Line4: TLine; Layout5: TLayout; bbnSUnit: TButton; lbJobName: TLabel; bbnCancel2: TButton; bbnPhone: TButton; bbnMobile: TButton; Layout2: TLayout; txLocName: TText; Text1: TText; Splitter1: TSplitter; Line1: TLine; Panel12: TPanel; memComment2: TMemo; Panel11: TPanel; memComment1: TMemo; procedure TimerTimer(Sender: TObject); procedure FormCreate(Sender: TObject); procedure bbnPhoneClick(Sender: TObject); procedure bbnMobileClick(Sender: TObject); procedure bbnInsertClick(Sender: TObject); procedure bbnCancelClick(Sender: TObject); private { Private declarations } FPhoneDialerService: IFMXPhoneDialerService; FCallPhonePermission: string; type TCustTel = Record CustTelNo : LongInt; end; var TTCustTel : TCustTel; procedure DisplayRationale(Sender: TObject; const APermissions: TClassicStringDynArray; const APostRationaleProc: TProc); procedure MakePhoneCallPermissionRequestResultP(Sender: TObject; const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray); procedure MakePhoneCallPermissionRequestResultM(Sender: TObject; const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray); public { Public declarations } sComment2 : String; end; var fmCustTelD: TfmCustTelD; implementation uses uDM, Globals, {$IFDEF ANDROID} Androidapi.Helpers, Androidapi.JNI.JavaTypes, Androidapi.JNI.Os, {$ENDIF} FMX.DialogService; {$R *.fmx} procedure TfmCustTelD.FormCreate(Sender: TObject); begin {$IFDEF ANDROID} FCallPhonePermission := JStringToString(TJManifest_permission.JavaClass.CALL_PHONE); {$ENDIF} { test whether the PhoneDialer services are supported } TPlatformServices.Current.SupportsPlatformService(IFMXPhoneDialerService, FPhoneDialerService); txLocName.Text := Globals.CurrentLocName; lbJobName.Text := Globals.CurrentJobName; G_IsCustTelJobOK := False; end; // Optional rationale display routine to display permission requirement rationale to the user procedure TfmCustTelD.DisplayRationale(Sender: TObject; const APermissions: TClassicStringDynArray; const APostRationaleProc: TProc); begin // Show an explanation to the user *asynchronously* - don't block this thread waiting for the user's response! // After the user sees the explanation, invoke the post-rationale routine to request the permissions TDialogService.ShowMessage('The app needs to be able to support your making phone calls', procedure(const AResult: TModalResult) begin APostRationaleProc; end) end; procedure TfmCustTelD.bbnPhoneClick(Sender: TObject); begin if not G_IsPhoneCall then Exit; if Trim(lbPhone.Text) = '' then begin //Please type in a telephone number. TDialogService.ShowMessage('전화번호를 입력하세요..'); Activecontrol := lbPhone; // lbPhone.SetFocus; Exit end; MessageDlg('[ '+Trim(lbPhone.Text)+' ]로/으로 전화하시겠습니까?', TMsgDlgType.mtConfirmation, [TMsgDlgBtn.mbYes, TMsgDlgBtn.mbNo], 0, procedure(const AResult: TModalResult) begin if AResult = mrYes then begin if FPhoneDialerService <> nil then begin { if the Telephone Number is entered in the edit box then make the call, else display an error message } PermissionsService.RequestPermissions([FCallPhonePermission], MakePhoneCallPermissionRequestResultP, DisplayRationale) end else TDialogService.ShowMessage('PhoneDialer service not supported'); end; end ); end; procedure TfmCustTelD.MakePhoneCallPermissionRequestResultM(Sender: TObject; const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray); begin // 1 permission involved: CALL_PHONE if (Length(AGrantResults) = 1) and (AGrantResults[0] = TPermissionStatus.Granted) then FPhoneDialerService.Call(lbMobile.Text) else TDialogService.ShowMessage('Cannot make a phone call because the required permission has not been granted'); end; procedure TfmCustTelD.MakePhoneCallPermissionRequestResultP(Sender: TObject; const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray); begin // 1 permission involved: CALL_PHONE if (Length(AGrantResults) = 1) and (AGrantResults[0] = TPermissionStatus.Granted) then FPhoneDialerService.Call(lbPhone.Text) else TDialogService.ShowMessage('Cannot make a phone call because the required permission has not been granted'); end; procedure TfmCustTelD.bbnCancelClick(Sender: TObject); begin if not G_IsCustTelJobOK and ((Trim(memComment2.Text) <> Trim(sComment2))) then begin ShowMessage('[입력/수정]을 먼저 하십시오.'); Exit; end; Close; end; procedure TfmCustTelD.bbnInsertClick(Sender: TObject); begin if not ConnectionRtn then begin //ShowMessage(sG_ConnectionErr); //'인터넷 접속이 원활치 않습니다.' Exit; end; if Trim(memComment2.Text) = '' then Exit; MessageDlg('자료를 [입력/수정]하시겠습니까?', TMsgDlgType.mtConfirmation, [TMsgDlgBtn.mbYes, TMsgDlgBtn.mbNo], 0, procedure(const AResult: TModalResult) begin if AResult = mrYes then begin with dm.cdsCustTelCmdUpd do begin //if not dm.SQLConnection.InTransaction then //InTransaction // dm.SQLConnection.BeginTransaction; //BeginTransaction try ParamByName('pLocNo').AsInteger := Globals.CurrentLocNo; ParamByName('pCustTelNo').AsInteger := dm.cdsCustTelCustTelNo.Value; ParamByName('pComment2').AsString := Trim(memComment2.Text); ParamByName('pComment1').AsString := Trim(memComment1.Text); paramByName('pJobDateTimeUpd').Value := Now; //StrToDateTime(FormatDateTime(gDateFormat+' h:nn:ss',now)); ParamByName('pJobNameUpd').Value := Globals.CurrentJobName; Execute; except ShowMessage('Error... [cdsCustTelCmdUpd]'+CR+sG_SysErr); Raise; end; end; end; end); G_IsCustTelJobOK := True; end; procedure TfmCustTelD.bbnMobileClick(Sender: TObject); begin if not G_IsPhoneCall then Exit; if Trim(lbMobile.Text) = '' then begin //Please type in a telephone number. TDialogService.ShowMessage('전화번호를 입력하세요..'); lbMobile.SetFocus; Exit end; MessageDlg('[ '+Trim(lbMobile.Text)+' ]로/으로 전화하시겠습니까?', TMsgDlgType.mtConfirmation, [TMsgDlgBtn.mbYes, TMsgDlgBtn.mbNo], 0, procedure(const AResult: TModalResult) begin if AResult = mrYes then begin if FPhoneDialerService <> nil then begin { if the Telephone Number is entered in the edit box then make the call, else display an error message } PermissionsService.RequestPermissions([FCallPhonePermission], MakePhoneCallPermissionRequestResultM, DisplayRationale) end else TDialogService.ShowMessage('PhoneDialer service not supported'); end; end ); end; procedure TfmCustTelD.TimerTimer(Sender: TObject); begin lbClock1.Text := FormatDateTime('ampm h:nn:ss', now); lbClock2.Text := FormatDateTime(gDateFormat+' [ddd]', now); end; end PhoneCallError.txt 인용하기 이 댓글 링크 다른 사이트에 공유하기 더 많은 공유 선택 사항
0 강명진 11월 17일, 2021에 포스트됨 Author 공유하기 11월 17일, 2021에 포스트됨 RAD STUDIO 11로 변경 후 앱에서 전화걸기를 누르면 다운되거나 에러가 발생합니다. 샘플과 똑같이 변경하였는데도 에러 발생하는데.. 이유를 알수가 없네요 도움 부탁드립니다. PhoneCallError.txt 인용하기 이 댓글 링크 다른 사이트에 공유하기 더 많은 공유 선택 사항
0 험프리 11월 24일, 2021에 포스트됨 공유하기 11월 24일, 2021에 포스트됨 저도 PoneDialer 샘플로 테스트 진행해 봤습니다. C:\Users\Public\Documents\Embarcadero\Studio\22.0\Samples\Object Pascal\Mobile Snippets\PhoneDialer (오래된 버전의 안드로이드 기기에서)테스트한 결과 정상적으로 실행되고, 전화연결까지 확인했습니다. On 2021. 11. 12. at 오전 12시 12분, 강명진 said: Java type Jcontent_ContextCompact count not be found. 또한, 델파이 11의 소스코드 전체에서 Jcontent_ContextCompact 로 검색 시 검색결과가 없습니다. (해당 클래스는 델파이 11에서 사용하지 않는 것으로 예상됩니다.) 혹시 이전 버전으로 만든 프로젝트를 11버전에서 컴파일 하셨다면, 위의 PhoneDialoer 샘플을 안드로이드 폰으로 배포해 다시한번 테스트 진행 부탁드립니다. 만약, 위의 이슈라면 안드로이드 라이브러리 업데이트와 관련이 있을 수 있다면, 아래 조치가 필요할 수도 있습니다. 11.0 알렉산드리아 FMX 신기능 - 안드로이드 API 30 지원과 라이브러리 업데이트 안드로이드 API 30 을 타겟으로 지정 (구글 플레이 스토어의 2021년 요구사항) 지원 이전의 “Support Library” 라이브러리를 새 “AndroidX” 라이브러리로 마이그레이션 이전과 다른 자바 라이브러리 세트가 포함 됨에 따라 이전 버전과 호환되지 않는다. RAD 스튜디오 이전 버전에서 작성한 프로젝트를 열 때에는 다음 절차를 진행해야 한다. IDE의 Projects 창으로 간다. Android 32-bit 또는 Android 64-bit를 활성 타겟 플랫폼으로 지정한다. Libraries 노드를 마우스 오른쪽 클릭한다. Revert System Files to Default를 선택한다. (출처: https://welcome.devgear.co.kr/rad-feature/v110/110-알렉산드리아-fmx-r3/#Android+API30) 해결이 되었는지 여부와 관련하여 진행한 방법을 남겨 주시기 바랍니다. 같은 문제에 당면한 다른 개발자들에게 도움이 됩니다. 인용하기 이 댓글 링크 다른 사이트에 공유하기 더 많은 공유 선택 사항
0 c2design 10월 28일, 2022에 포스트됨 공유하기 10월 28일, 2022에 포스트됨 아래 링크에 해결방법 올렸습니다. 인용하기 이 댓글 링크 다른 사이트에 공유하기 더 많은 공유 선택 사항
질문
강명진
전화 걸기를 하면 아래와 같은 에러 메세지가 나타나는데 해결방법이 있을가요?
Java type Jcontent_ContextCompact count not be found.
이 댓글 링크
다른 사이트에 공유하기
6 answers to this question
Recommended Posts
이 토의에 참여하세요
지금 바로 의견을 남길 수 있습니다. 그리고 나서 가입해도 됩니다. 이미 회원이라면, 지금 로그인하고 본인 계정으로 의견을 남기세요.