Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In App Billing service getting killed at times

Hi we released this app in the market with inApp Billing and our logs show that the BillingService(possibly the app itself) keeps getings killed very randomly on certain customers devices. Because of this sometimes I am not able to get the notification if the purchase was successful or not. Some of the customers often have to buy twice to make a successful purchase. Though this happens to a small percentage of customers but it is very troubling. Any idea why it might be happening or what can be done to work around this problem.

like image 250
the100rabh Avatar asked Nov 04 '22 17:11

the100rabh


1 Answers

I am not sure whether it will help, but I would recommend to make your BillingService foreground service: http://developer.android.com/guide/components/services.html#Foreground

Here is piece of documentation "API to put the service in a foreground state, where the system considers it to be something the user is actively aware of and thus not a candidate for killing when low on memory. "

It could be that small percentage of your user has low memory condition and it's start killing services/applications (including yours).

like image 105
Victor Ronin Avatar answered Nov 09 '22 10:11

Victor Ronin