안드로이드 API 레벨 26 지원

RAD 스튜디오 10.3 리오는 안드로이드 API 레벨 26을 공식 지원합니다.

구글은 보안과 성능에 최적화된 최신 API 기반으로 앱을 만들고, 사용자가 혜택을 누릴 수 있도록, 플레이 스토어에 등록 시 안드로이드 레벨 26 이상을 요구하도록 정책을 변경했습니다.(신규앱 등록 2018년 8월 부터, 기존앱 업데이트 2018년 11월 부터)

 

RAD 스튜디오 10.3 리오는 최신 SDK와 NDK를 지원하고, 매니페스트에 적절한 API레벨을 설정할 수 있도록 업데이트 되었습니다.

또한 최신 API에서 변경된 권한 모델등을 제공하도록 업데이트 되었습니다.

 

새로운 안드로이드 런타임 권한 모델 지원

안드로이드 API의 최신버전은 런타임 시 권한을 요청하는 매커니즘으로 변경되었습니다.

 

기존의 권한 모델은 설치 시 전체 권한을 승인하는 방식이었습니다. 새로운 권한 모델은 기능 사용 시 개별 권한을 묻는 방식으로, 사용자는 기능 별 허용 및 거부가 가능해졌습니다.

 

기존 권한 요청 방식

old_perminssion.png

새로운 권한 요청 방식

new_permissions2.png

 

위 변경에 따라 10.3 리오에서는 사용 권한을 요청하는 메소드가 추가되었고, 그 결과를 콜백 메소드로 받아 기능을 수행할 수 있도록 업데이트 되었습니다.

 

다음 델파이 코드는 위치를 권한을 요청하는 델파이 Location 샘플코드(Object Pascal/Mobile Snippets/Location)의 일부입니다.

procedure TLocationForm.swLocationSensorActiveSwitch(Sender: TObject);
begin
{$IFDEF ANDROID}
  if swLocationSensorActive.IsChecked then
    PermissionsService.RequestPermissions([JStringToString(TJManifest_permission.JavaClass.ACCESS_FINE_LOCATION)],
      procedure(const APermissions: TArray<string>; const AGrantResults: TArray<TPermissionStatus>)
      begin
        if (Length(AGrantResults) = 1) and (AGrantResults[0] = TPermissionStatus.Granted) then
          { activate or deactivate the location sensor }
          LocationSensor1.Active := True
        else
        begin
          swLocationSensorActive.IsChecked := False;
          TDialogService.ShowMessage('Location permission not granted');
        end;
      end)
  else
{$ENDIF}
    LocationSensor1.Active := False;
end;

다음 샘플 프로젝트에서 새로운 안드로이드 권한 모델의 실제 사용사례를 확인할 수 있습니다. 여러분들의 안드로이드 코드를 업데이트 하기 위해 참고하실 수 있습니다.

  • CPP/Mobile Snippets/AccessCameraApp
  • CPP/Mobile Snippets/AudioRecPlay
  • CPP/Mobile Snippets/CameraComponent
  • CPP/Mobile Snippets/CameraRoll
  • CPP/Mobile Snippets/Location
  • CPP/Mobile Snippets/PhoneDialer
  • CPP/Mobile Snippets/ShareSheet
  • CPP/Multi-Device Samples/Device Sensors and Services/Address Book/BirthdayReminder
  • CPP/Multi-Device Samples/Device Sensors and Services/Address Book/Contacts
  • CPP/Multi-Device Samples/Device Sensors and Services/Bluetooth/BLEScanner
  • CPP/Multi-Device Samples/Device Sensors and Services/FlashLight
  • CPP/Multi-Device Samples/Device Sensors and Services/Map Type Selector
  • CPP/Multi-Device Samples/Device Sensors and Services/SensorInfo
  • CPP/Multi-Device Samples/Media/MusicPlayer
  • CPP/Multi-Device Samples/Media/PhotoEditorDemo
  • Object Pascal/Mobile Snippets/AccessCameraApp
  • Object Pascal/Mobile Snippets/AudioRecPlay
  • Object Pascal/Mobile Snippets/CameraComponent
  • Object Pascal/Mobile Snippets/CameraRoll
  • Object Pascal/Mobile Snippets/Location
  • Object Pascal/Mobile Snippets/PhoneDialer
  • Object Pascal/Mobile Snippets/ShareSheet
  • Object Pascal/Multi-Device Samples/Device Sensors and Services/Address Book/BirthdayReminder
  • Object Pascal/Multi-Device Samples/Device Sensors and Services/Address Book/Contacts
  • Object Pascal/Multi-Device Samples/Device Sensors and Services/App Tethering/PhotoWall/Mobile
  • Object Pascal/Multi-Device Samples/Device Sensors and Services/Bluetooth/BLEScanner
  • Object Pascal/Multi-Device Samples/Device Sensors and Services/FlashLight
  • Object Pascal/Multi-Device Samples/Device Sensors and Services/Map Type Selector
  • Object Pascal/Multi-Device Samples/Device Sensors and Services/SensorInfo
  • Object Pascal/Multi-Device Samples/Media/MusicPlayer
  • Object Pascal/Multi-Device Samples/Media/PhotoEditorDemo
  • Object Pascal/RTL/Tethering/PhotoWall/Mobile

 

관련글


 

 

 

 

10.3 리오의 업데이트 버전들

 

 

 

번호 제목 글쓴이 날짜 조회 수
공지 [DelphiCon 요약] 코드사이트 로깅 실전 활용 기법 (Real-world CodeSite Logging Techniques) 관리자 2021.01.19 15414
공지 [UX Summit 요약] 오른쪽 클릭은 옳다 (Right Click is Right) 관리자 2020.11.16 13960
공지 [10.4 시드니] What's NEW! 신기능 자세히 보기 관리자 2020.05.27 16496
공지 RAD스튜디오(델파이,C++빌더) - 고객 사례 목록 관리자 2018.10.23 22048
공지 [데브기어 컨설팅] 모바일 앱 & 업그레이드 마이그레이션 [1] 관리자 2017.02.06 23267
공지 [전체 목록] 이 달의 기술자료 & 기술레터 관리자 2017.02.06 18921
공지 RAD스튜디오(델파이, C++빌더) - 시작하기 [1] 관리자 2015.06.30 39245
공지 RAD스튜디오(델파이,C++빌더) - 모바일 앱 개발 사례 (2020년 11월 업데이트 됨) 험프리 2014.01.16 174696
708 [REST API] REST 기반 파일 업로드와 다운로드 구현하기 험프리 2020.08.31 83034
707 델파이 튜토리얼 자습서 이용 안내 관리자 2014.09.01 71936
706 이 달의 기술자료 - 2014년 11월 험프리 2014.10.13 54120
705 이 달의 기술자료 - 2014년 6월 file 험프리 2014.06.05 50357
704 이 달의 기술자료 - 2014년 12월 file 험프리 2014.11.26 32457
703 RAD Studio XE6 Update1 발표 [1] Humphery 2014.06.20 29462
702 [10.4 시드니 신기능] 새로운 VCL TEdgeBrowser 컴포넌트 험프리 2020.05.18 22908
701 이 달의 기술자료 - 2014년 4월 file 험프리 2014.04.03 16811
700 "Could not load SSL library." 오류 대응(XE7: BaaS, RESTClient, DataSnap) [1] Humphery 2014.09.12 15980
699 이 달의 기술자료 - 2015년 03월 험프리 2015.02.25 15872
698 [REST API] REST API 이해하기 험프리 2017.05.23 15256
697 이 달의 기술자료 - 2015년 02월 file 험프리 2015.01.29 15052
696 RAD Studio(델파이, C++빌더) 버전별 공식 지원 플랫폼과 OS 버전 험프리 2014.03.05 11651
695 [REST] REST 클라이언트로 REST 기반 웹서비스와 연동할 수 있습니다. [3] file 험프리 2014.01.29 10884