I'm not sure what code to put here but I have a working in-app purchase setup in my app (in the sense that the correct amount and item is billed to my account) but the problem is the changes never show up on the user's end, when they buy an item the receiver never gets the broadcast which will allow me to run the code that saves the purchase locally.
I copied the code from here for the most part:
Simple in app billing Payment
So I don't know what the problem 开发者_Go百科is. Nothing freezes, all works, just never runs the onReceive() of the BillingReceiver... anybody else have this?
More info needed to give a specific answer. I wasn't receiving messages because I had placed my receiver node after the </application>
close node. I should have placed it between the <application>
</application>
tags.
<application android:icon blah blah...>
<activity android:name="MyActivity">
</activity>
<service android:name=".BillingService" />
<receiver android:name=".BillingReceiver">
<intent-filter>
<action android:name="com.android.vending.billing.IN_APP_NOTIFY" />
<action android:name="com.android.vending.billing.RESPONSE_CODE" />
<action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />
</intent-filter>
</receiver>
</application>
精彩评论