Eymir / marketbilling

Automatically exported from code.google.com/p/marketbilling
0 stars 0 forks source link

Cannot handle more notification IDs when receiving IN_APP_NOTIFY broadcast intents #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In the sample code BillingReceiver.java,

public void onReceive(Context context, Intent intent) {
    ...
    } else if (Consts.ACTION_NOTIFY.equals(action)) {
        String notifyId = intent.getStringExtra(Consts.NOTIFICATION_ID);
        if (Consts.DEBUG) {
            Log.i(TAG, "notifyId: " + notifyId);
        }
        notify(context, notifyId);
    } ...

I think String notifyId = intent.getStringExtra(Consts.NOTIFICATION_ID); should 
be modified to 
String notifyId = intent.getStringArrayExtra(Consts.NOTIFICATION_ID);

Because based on In-app Billing Reference, it may contain more than 1 
notification ID.

STEPS TO REPRODUCE:
1.
2.
3.

EXPECTED OUTPUT:

ACTUAL OUTPUT:

AFFECTED ORDER IDS (IF RELEVANT):

OS VERSION:

MARKET/MYAPPS VERSION:

DEVICE:

OUTPUT FROM ADB BUGREPORT ATTACHED:
(Note: The output from "adb bugreport" is required for all bug reports.)

NOTES:

Original issue reported on code.google.com by xinyu.wa...@gmail.com on 31 Jul 2011 at 4:30