구독 정기결제를 구현하는 도중에 라이브러리가 업그레이드 되었다.

즉, 이전에 버전이 4.x.y 에서 5.x.y 가 되었다.

implementation "com.android.billingclient:billing:5.0.0"

이로 인해, deprecated 된 메서드가 많다.

https://developer.android.com/google/play/billing/migrate-gpblv5

 

Google Play 결제 라이브러리 4에서 5로의 이전 가이드  |  Google Play 결제 시스템  |  Android Developers

Google Play 결제 라이브러리 4에서 5로의 이전 가이드 이 주제에서는 Google Play 결제 라이브러리 4에서 Google Play 결제 라이브러리 5로 이전하는 방법과 새로운 정기 결제 기능을 사용하는 방법을 설

developer.android.com

겸사 겸사 현재 개발중인 인앱결제 부분을 마이그레이션 하기로 했다.

기 개발된 코드를 변경하는게 쉽지는 않지만, codeLab과 깃허브에 샘플 코드가 잘 작성되어 있으니 참고해서 개발한다면 큰 무리 없이 개발할 수 있을 것으로 예상된다.

 

코드랩

https://codelabs.developers.google.com/play-billing-codelab?hl=ko#0 

 

Play 결제 라이브러리 5를 사용하여 앱에서 정기 결제 항목 판매  |  Google Codelabs

이 Codelab에서는 기본 요금제 및 탄력 요금제를 비롯하여 자동 갱신되는 정기 결제와 선불 요금제를 구현하는 방법을 알아봅니다.

codelabs.developers.google.com

 

구글 인앱결제 샘플코드

https://github.com/android/play-billing-samples/tree/main/PlayBillingCodelab

 

GitHub - android/play-billing-samples: Samples for Google Play In-app Billing

Samples for Google Play In-app Billing. Contribute to android/play-billing-samples development by creating an account on GitHub.

github.com

 

+ Recent posts