admin管理员组文章数量:1024664
Google suggests to test "your google play billing". I do have a product with weekly and monthly renewal. I want to test the renewal. I did find that test subscriptions for 1 week are renewed after 5 minutes. This is great.
But i didnt find any information on what really is done - will a running instance of "BillingClient" be called automatically by Google, so that it calls listeners in my app ? Or will i have to rely on polling ?
This isnt documented anywhere. So if someone knows -please share your expertise.
My code is tested for the "regular" case, i.e. first order of a product. To allow use of my app when internet is down i am prepared as well, i do # store products timestamps - i found that timestamps in PurchasesResponseListener() are indeed the precise timestamps when the user bought the product the first name.
As of now i am missing 2 informations/ confirmations:
a) do i get the info via polling or via listener ?
b) if a product is renewed -will the timestamp be the time of the original (first) purchase, or will it be begin of the new period ? I would prefer the later, but i dont know ...
Google suggests to test "your google play billing". I do have a product with weekly and monthly renewal. I want to test the renewal. I did find that test subscriptions for 1 week are renewed after 5 minutes. This is great.
But i didnt find any information on what really is done - will a running instance of "BillingClient" be called automatically by Google, so that it calls listeners in my app ? Or will i have to rely on polling ?
This isnt documented anywhere. So if someone knows -please share your expertise.
My code is tested for the "regular" case, i.e. first order of a product. To allow use of my app when internet is down i am prepared as well, i do # store products timestamps - i found that timestamps in PurchasesResponseListener() are indeed the precise timestamps when the user bought the product the first name.
As of now i am missing 2 informations/ confirmations:
a) do i get the info via polling or via listener ?
b) if a product is renewed -will the timestamp be the time of the original (first) purchase, or will it be begin of the new period ? I would prefer the later, but i dont know ...
Share Improve this question asked Nov 18, 2024 at 15:48 MatthiasLMatthiasL 1397 bronze badges1 Answer
Reset to default 0Ok, so i did test this in the debugger now. Renewals of subscriptions do get the original time stamp.
boolean isRenewing = pu.isAutoRenewing();
long purchasetime = Purchase.getPurchaseState();
So purchasetime is -not- increased with each renewal of a subscription. isAutoRenewing is true, as expected.
With respect to polling versus listeners : i do simply call BillingClient in onCreate of the application and again each time my order dialog is shown on the screen. Worstcase is that the user had the order dialog opened a minute before the subscription period renews, he/she would then not get the update correctly. Had to wait for the next start of the app or next open of the dialog.
Google suggests to test "your google play billing". I do have a product with weekly and monthly renewal. I want to test the renewal. I did find that test subscriptions for 1 week are renewed after 5 minutes. This is great.
But i didnt find any information on what really is done - will a running instance of "BillingClient" be called automatically by Google, so that it calls listeners in my app ? Or will i have to rely on polling ?
This isnt documented anywhere. So if someone knows -please share your expertise.
My code is tested for the "regular" case, i.e. first order of a product. To allow use of my app when internet is down i am prepared as well, i do # store products timestamps - i found that timestamps in PurchasesResponseListener() are indeed the precise timestamps when the user bought the product the first name.
As of now i am missing 2 informations/ confirmations:
a) do i get the info via polling or via listener ?
b) if a product is renewed -will the timestamp be the time of the original (first) purchase, or will it be begin of the new period ? I would prefer the later, but i dont know ...
Google suggests to test "your google play billing". I do have a product with weekly and monthly renewal. I want to test the renewal. I did find that test subscriptions for 1 week are renewed after 5 minutes. This is great.
But i didnt find any information on what really is done - will a running instance of "BillingClient" be called automatically by Google, so that it calls listeners in my app ? Or will i have to rely on polling ?
This isnt documented anywhere. So if someone knows -please share your expertise.
My code is tested for the "regular" case, i.e. first order of a product. To allow use of my app when internet is down i am prepared as well, i do # store products timestamps - i found that timestamps in PurchasesResponseListener() are indeed the precise timestamps when the user bought the product the first name.
As of now i am missing 2 informations/ confirmations:
a) do i get the info via polling or via listener ?
b) if a product is renewed -will the timestamp be the time of the original (first) purchase, or will it be begin of the new period ? I would prefer the later, but i dont know ...
Share Improve this question asked Nov 18, 2024 at 15:48 MatthiasLMatthiasL 1397 bronze badges1 Answer
Reset to default 0Ok, so i did test this in the debugger now. Renewals of subscriptions do get the original time stamp.
boolean isRenewing = pu.isAutoRenewing();
long purchasetime = Purchase.getPurchaseState();
So purchasetime is -not- increased with each renewal of a subscription. isAutoRenewing is true, as expected.
With respect to polling versus listeners : i do simply call BillingClient in onCreate of the application and again each time my order dialog is shown on the screen. Worstcase is that the user had the order dialog opened a minute before the subscription period renews, he/she would then not get the update correctly. Had to wait for the next start of the app or next open of the dialog.
本文标签:
版权声明:本文标题:android - What functions does google play billling call when in "test subscription renewal" after the first re 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745610254a2158961.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论