i have implemented google play successfuly….and its working fine…..but when i close my application after using…and after few minutes of closing application…error is given that”APPLICATION HAS STOPEED UNEXPEXTEDLY”…..in log cat it gives that error is in BillingService.java
10-10 13:38:38.739: E/AndroidRuntime(3586): Caused by: java.lang.NullPointerException
10-10 13:38:38.739: E/AndroidRuntime(3586): at .BillingService.handleCommand(BillingService.java:372)
10-10 13:38:38.739: E/AndroidRuntime(3586): at .BillingService.onStart(BillingService.java:362)
10-10 13:38:38.739: E/AndroidRuntime(3586): at android.app.Service.onStartCommand(Service.java:438)
and my code is….
public void onStart(Intent intent, int startId) {
handleCommand(intent, startId);------>362
}
public void handleCommand(Intent intent, int startId) {
String action = intent.getAction();------>line 732
if (Consts.DEBUG) {
Log.i(TAG, "handleCommand() action: " + action);
}
}
I think you have to exclusively exit the application. After exiting the application check the task manager, if it is still enlisted in the running application section then you have to end the process.
You can check the following code: