Comments (12)
+1 for this
from androidbillinglibrary.
+1; without this patch the billing library is unable to recover from crash, which I observed on Galaxy Nexus JB 4.1.1 factory ROM
from androidbillinglibrary.
This should really be labeled as a bug and not a feature. The play store will randomly exit and then your app is stranded with a bad reference that won't get removed until the your app is killed. I opted to catch the RemoteException in runPendingRequests and then rebind the service. This seems to seamlessly rebind and launch the play store without showing an error.
private void runPendingRequests() {
BillingRequest request;
int maxStartId = -1;
while ((request = mPendingRequests.peek()) != null) {
if (mService != null) {
try {
runRequest(request);
mPendingRequests.remove();
if (maxStartId < request.getStartId()) {
maxStartId = request.getStartId();
}
} catch (RemoteException re) {
rebindMarketBillingService();
return;
}
} else {
bindMarketBillingService();
return;
}
}
if (maxStartId >= 0) {
stopSelf(maxStartId);
}
}
private void rebindMarketBillingService() {
try {
unbindService(this);
} catch (Exception ignore) { }
mService = null;
bindMarketBillingService();
}
from androidbillinglibrary.
@jgilbert42 Re-labeled.
Will be fixed in the next update.
from androidbillinglibrary.
i would like to add the question: why does it crash, first hand?
because i can report that remote exception been thrown / that crash happening on a motorola droid with android 2.1 where the market version is 2002306 - which i do not know what /normal/ market version number fits. 3.06 ? 2.306 ??
and the situation is that isBillingSupported properly returns with support, and the crash appears as soon as i try to requestPurchase. there is a mobile connection present, and the device & market have been previously used. so why does it crash? any ideas?
because, if i use any of the above mentioned fixes, i guess the crash will just appear over and over?
from androidbillinglibrary.
okay, i have the remotexception (BillingService.runRequest() line 260) been thrown on every device. i googled and hoped it would be a stupid standard mistake, but couldnt find it. as far as i know i follow the typical test steps. the funny thing is, if i do not have connection (wifi + 3g off) then i still get the exception (instead of a "not connected" when i try to purchase my own stuff), if i requestPurchase() on a static response then it works properly (either telling me "not connected" or when connected does what it should, for example the static cancel response returning cancel)
does anybody have an idea what i missed?
from androidbillinglibrary.
@ludocrazy Can you reproduce the problem with my fork too (or by applying hpique@a625937)?
from androidbillinglibrary.
i will try, but if i repress the button in my GUI to retry, then it crashes EVERY TIME. so what should your code help, besides endlessly trying? did i miss something reading the code change you linked?
i'm new to github, i do not understand how i can get the files from your pull request. what keywords do i google to learn / understand that? or can you explain it without taking tomuch of your time? thx!
from androidbillinglibrary.
I'm running into this issue on Galaxy Nexus Android 4.1.1, running app directly from eclipse (debug signed) with developer account on phone.
I see that hpique and jgilbert42 both have solutions, but nothing has been released.
Should I implement one of these solutions or is this something that only occurs using debug signed app or what?
from androidbillinglibrary.
+1. My users encountered similar behavior.
from androidbillinglibrary.
Why this issue is closed? The library has the same error and the same wrong code still.
from androidbillinglibrary.
+1 for suggested improvements - without them this library is useless because it often prevents user from buying products.
from androidbillinglibrary.
Related Issues (20)
- DungeonsRedux android.test.refunded
- DungeonsRedux android.test.canceled
- onPurchaseStateChanged() not called HOT 3
- Compile problem in new Android Eclipse platform release 4.2 / 21.0.0.vxxx HOT 3
- How to handle refunds? HOT 6
- onBillingChecked() not called when BillingService "Could not bind to MarketBillingService"
- Response code of BillingController.restoreTransactions() in case of errors HOT 1
- Cancelled purchase, getTransactions is still returning a value in one mobile but not the other with the same google account HOT 1
- Validation of transaction doesn't work ?
- Issue with onPurchaseStateChanged
- DeadObjectException HOT 1
- API Version 3 HOT 5
- Handling Developer Payload and OrderId HOT 3
- onPurchaseStateChange does not gets called when purchase is successful. HOT 1
- BadTokenException in BillingReceiver
- Transaction doesn't include subscription "purchaseToken" HOT 1
- "Item unavailable" error HOT 5
- How to handle manual confirmations and Google Play status bar notifications? HOT 2
- Publish Maven artifact to Central HOT 5
- onBillingChecked HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from androidbillinglibrary.