i'm trying to implement in-app billing in my app.
i'm using code from dungeons sample.
everything is working great and i can purchase.
but after i leave the app i get Error "app has stopped working"
and in the LogCat i see.
05-10 14:33:22.293: E/AndroidRuntime(9568): java.lang.RuntimeException: Unable to start service com.package.name.BillingService#2beca0b0 with null: java.lang.NullPointerException
anybody knows what can cause that problem?
edit-1: the problem is that the billingService is still active. and onStart is trying to send null intents (i can solve this by if null==intent ,but it's not the way)
i'm using the unbind when i'm finished purchase.
thanks.
Related
I have an iOS Swift project using the AWSMobileClient SDK (v2.9.9) installed with Cocoapods.
There is one problematic method that is used quite frequently in the app:
AWSMobileClient.sharedInstance().getAWSCredentials { (credentials, error) in ... }
and there is a specific fatal error that occurs:
Obtaining an identity id in another thread failed or didn't complete
within 5 seconds.
On some devices, it works fine 90% of the time and only usually occurs after a sequence of steps - e.g. sign in, log out, sign in again (the method is called after sign in).
However, recently on a new device that I've been testing on it has appeared every single time.
There was another Stack question here that suggested that another AWS SDK operation may be running in parallel when getAWSCredentials is called - but after reviewing my code I'm fairly sure this isn't the case.
I've also tried running this method on the failing device to see if it would give any clues:
AWSMobileClient.sharedInstance().getIdentityId().continueWith { task -> Any? in ... }
and returns with this error:
Fetching identity id on another thread failed. Please retry by calling
getIdentityId() method.
I've spent hours looking through my own code and the stack traces that led to the error and am at a dead end with thoughts on how to solve or even debug this further.
Hopefully someone will be able to suggest something to help me - thanks! :)
I'm using Twilio voice quickstart code https://github.com/twilio/voice-quickstart-swift.
When I make a client to client call, call doesn't connect. CallKit runs in the background though, I can see the green notification bar when I send app in the background.
Following is the error:
StartCallAction transaction request failed: The operation couldn’t be completed. (com.apple.CallKit.error.requesttransaction error 7.)
As you can see Googling doesn't help as there doesn't seem to be any solution around?
Does anyone know how to fix or debug it further?
Updated:
Attaching VoIP settings, it's certainly enabled.
Problem is in your code which you write to handle and initialise variables. There is nothing wrong in the Twilio sdk either so don't look there. Anything which you are doing beyond twilio sample code is the place to look for the problem.
I've also wasted months of my time on similar issue and found out that there was issue with initialising one variable.
You are trying to request CXStartCallAction right after another CXStartCallAction was requested. You need to end the first call correctly.
In any case you must follow correct sequence of actions. Once you user wrong action in a sequence, CallKit will return one or another error.
And DO NOT request one action immediately after another is processed. There should be some time between two requests. For example, you initiated CXStartCallAction, then you checked that user is offline and trying to end the call. If that check is quick, then "end action" may result in error. You need to wait a few milliseconds before cancelling the outgoing call.
Twilio developer evangelist here.
Have you enabled capabilities for Voice over IP in the project settings?
Try to initialize CXProvider and CXCallController sooner, before requesting CXStartCallAction
I had the same problem because the Provider and the CallController have been lazy loaded.
It looks like that the CXProvider initWithConfiguration runs asynchronously which means you need to call this early otherwise you run into the risk of having a call without the completion of the initWithConfiguration function.
Thanks to #Allen for pointing me in the right direction.
It is not clear to me what exactly causes the following errors:
SKError.clientInvalid
SKError.paymentInvalid
SKError.paymentNotAllowed
I am trying to write error dialogs that are informative and instructive. But since I am not sure what causes the errors, I am not sure how to be instructive.
I guess .paymentNotAllowed occurs when parental control is enabled? And .paymentInvalid occurs when an error occurs with the payment?
But I have no idea what would cause .clientInvalid.
And do I have to handle these cloud service errors for in-app purchases? If so, what would cause them?
SKError.cloudServiceRevoked
SKError.cloudServicePermissionDenied
SKError.cloudServiceNetworkConnectionFailed
I am working on an app using Monaca where I need to be able to push notifications to users of the app. I tried getting the monaca push back-end working, and that wouldn't work, the app didn't register. I then moved to using the standard cordova plugin, so I can push directly from my servers, without using monaca's back-end. when I call the init function, normally a register event will fire, this works fine when I build the app. However I very much want to get the custom debugger working, I am able to build the custom debugger, and I see the plugin properly installed. Also the init function gets called, as soon as it is called I get the standard IOS security alert to grant the app permission, however the register event is not fired, therefore I am unable to get the device ID to push to the custom debugger app. Has anyone been able to use push notifications with the custom debugger application?
Best,
Peter
(https://github.com/phonegap/phonegap-plugin-push)
P.S, i calls to set the badge count setApplicationIconBadgeNumber works fine in the debugger. I think this is something simple, maybe with the certs? I dont get any errors fired, no notifications no clues using the standard debugger, how can I hunt down what the issue is?
I can get it work using ngCordova, which is AngularJS integration.
http://ngcordova.com/docs/plugins/pushNotifications/
Then, inject it like
var app = ons.bootstrap('myApp', ['onsen', 'ngCordova']);
Get back to me if you need further clarification.
I'm working on an iOS app where I now want to integrate ChromeCast support. I use the HelloGoogleVideoCast example to test my hardware setup and get inspiration for my app.
I have now stumbled on a problem that is present both in my app and in HelloGoogleVideoCast. When I connect to a device (connectToDevice method in HelloGoogleVideoCast) I get error "The operation couldn’t be completed. (com.google.GCKError error 2.)". I have power-cycled the device with no change in behavior. I never get to the callback deviceManagerDidConnect, instead deviceManager:didFailToConnectWithError is called with this error. Still, I can connect with the iOS YouTube app.
I can't find anything with substance if I google it and I can't find any good ChromeCast developer forums.
Is there anybody who has an inroad to how to solve this?
I m not sure it will help but u can try:
Download the Chromecast app from app store:
chromecast link
After u see your chromecast -> select your chromecast -> General -> make sure both check box are selected (I know the text is nothing to do with your problem).
Try now.
If the error still occur, try to reboot your chromecast.
If your error still occur, try to reset your chromecast, and then check the boxes again (don't forget!).
Make sure that you initialize the Receiver Manager in your receiver app as soon as possible. Don't wait for the window.onload. If the receiver takes too long to load and initialize the receiver manager, the connection is automatically torn down.
I had the same problem as you did and making the following changes on receiver worked for me:
I've put the script src="//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js" inside head tag and before title tag;
I've put my script file which managed all cast functions after
body tag (actually I've put all script declarations, except for cast_receiver, after body tag, including jQuery);
I hope it can help you yet :)