4

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 is. Nothing freezes, all works, just never runs the onReceive() of the BillingReceiver... anybody else have this?

onkar
  • 4,427
  • 10
  • 52
  • 89
Sam Stern
  • 24,624
  • 13
  • 93
  • 124
  • 1
    Are you sure you added the `` node to your AndroidManifest.xml? You'd need to post some code to know for sure what's going on -- In fact, chances are you missed something from that link you posted, and you'll just have to look over it again until you find what you missed.. Try going back to it and use the sample project (.rar file) and make sure it works correctly with the attachment. If that works, then you know something is missing in your copy. – Joe Jun 21 '11 at 03:18

1 Answers1

1

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>
Dittimon
  • 986
  • 2
  • 14
  • 28