Hello,
I have a subscription as an in-App purchase for my app. This subscription allows for ads to be completely removed from my app. And i keep a Database with various information about the user including his/her subscription (isMember or Not)
The buying part seems to be ok and working:
My question is. Once that is done. If he closes the app, how do i know if his/her subscription still is purchased 3 days later? I need to update my Database and start showing ads again.
In other words, is there a way for me to check product validity directly to Apple so i can set his App Status to "showing ads" or "showing no ads"...
Thanks
Y.
I have a subscription as an in-App purchase for my app. This subscription allows for ads to be completely removed from my app. And i keep a Database with various information about the user including his/her subscription (isMember or Not)
The buying part seems to be ok and working:
B4X:
Sub Subscription_Click
If MyStore.CanMakePayments And Not(Main.isMember) Then
MyStore.RequestPayment("productid")
End if
End Sub
Sub MyStore_PurchaseCompleted (Success As Boolean, Product As Purchase)
Log("Purchase completed")
If Product.IsInitialized Then
Log("Product: " & Product.ProductIdentifier & ", date=" & DateTime.Time(Product.TransactionDate) & _
", Transaction identifier=" & Product.TransactionIdentifier)
End If
Log("Success = " & Success)
If(Success)Then
'Update my Database to toggle membership status on the user
End If
End Sub
My question is. Once that is done. If he closes the app, how do i know if his/her subscription still is purchased 3 days later? I need to update my Database and start showing ads again.
In other words, is there a way for me to check product validity directly to Apple so i can set his App Status to "showing ads" or "showing no ads"...
Thanks
Y.