(31-07-2026, Saat: 06:41)emailx45 Adlı Kullanıcıdan Alıntı: [ -> ]If the freezing has stopped, that is already a good sign. It means the errors have been isolated and the flow is successfully reaching its destination. However, that doesn't guarantee that your implementation is 100% correct!
In any case, never use modal windows to display messages in a mobile environment—especially within a thread! It is always better to delegate these tasks to the system's messaging mechanism, for instance.
You could create a class using the Observer pattern to send your messages, or use the standard "TMessageManager" class, which allows you to subscribe an object—such as the active form—to receive them.
Regarding the event that isn't firing, you need to check exactly when the "Billing" library triggers it. Unfortunately, I am not very familiar with this library, so you will need to research it further to understand which events it triggers and when.
Here is a draft I put together based on your code.
Galiba sorunun ne olduğunu buldum. Yukarıda paylaştığım kodu billing-8.0.0 dan geri eski billing-7.1.1 getirdiğimde ve manifesti o duruma göre düzenlediğimde uygulama direk çalışıyor ve onProductDetailsResponse tetikleniyor. Hatta satın alma metotları da aktif oluyor galiba IDE 8.0.0 desteklemiyor. Bu durumda ne yapabilirim yeni sürüm mü çıkmasını beklemem lazım yoksa buna bir çözüm var mı yardımlarınızı bekliyorum.
Merhabalar yardımlarınız için çok teşekkür ederim sorun çözülmüştür
Google play developer sitesindeki Billing 8.0 değişiklikleri Androidapi.JNI.InAppBilling uyguladıktan sonra listener tetiklendi ve sorun çözüldü.
Altta düzenlenmiş Androidapi.JNI.InAppBilling pas dosyası mevcut.
{$IFDEF ANDROID}
type
// Bağlantı durumunu dinleyen sınıf
TBillingClientStateListener = class(TJavaLocal, JBillingClientStateListener)
private
FOnConnected: TThreadProcedure;
FOnDisconnected: TThreadProcedure;
public
constructor Create(AOnConnected, AOnDisconnected: TThreadProcedure);
procedure onBillingSetupFinished(billingResult: JBillingResult); cdecl;
procedure onBillingServiceDisconnected; cdecl;
end;
type
// Satın alma sonuçlarını dinleyen zorunlu listener
TPurchasesUpdatedListener = class(TJavaLocal, JPurchasesUpdatedListener)
public
procedure onPurchasesUpdated(billingResult: JBillingResult; purchases: JList); cdecl;
end;
type
// Ürün sorgulama sonucunu dinleyen sınıf
TProductDetailsResponseListener = class(TJavaLocal, JProductDetailsResponseListener)
private
public
constructor Create;
procedure onProductDetailsResponse(billingResult: JBillingResult; productDetailsResult: JQueryProductDetailsResult); cdecl; // Bu kısım düzenlendi.
end;
{$ENDIF}
Google Play Listener :
procedure TProductDetailsResponseListener.onProductDetailsResponse(
billingResult: JBillingResult;
productDetailsResult: JQueryProductDetailsResult); cdecl;
var
LProductList: JList;
I: Integer;
begin
if (billingResult <> nil) and (billingResult.getResponseCode = TJBillingClient_BillingResponseCode.JavaClass.OK) then
begin
if productDetailsResult <> nil then
begin
LProductList := productDetailsResult.getProductDetailsList;
if (LProductList <> nil) and (LProductList.size > 0) then
begin
frmSG_AnaForm.FProductDetailsList.Clear; // Önceki listeyi temizle
for I := 0 to LProductList.size - 1 do
begin
// JObject'i JProductDetails'e çevirip TList'e ekliyoruz
frmSG_AnaForm.FProductDetailsList.Add(
TJProductDetails.Wrap(LProductList.get(I))
);
end;
end;
end;
end;
end;