I have implemented In-App purchase in my application.But I need to custom the purchased details, with the time of purchase should come first and the amount of item purchased second, both in a row.Basically from the Dungeons example, it just shows only that column
android.test.purchased 1
I need something like this,
2012FEB1 2$ purchased
Can anyone help me to achieve this?
You can retrieve the data from DB after your transaction completes!! hope this is helpful
public void getdataFromDB() {
db = openOrCreateDatabase("purchase.db", MODE_WORLD_WRITEABLE, null);
cLocal = db.rawQuery("select * from history ", null);
cLocal.moveToFirst();
for (int z = 0; z < cLocal.getCount(); z++) {
id = cLocal.getString(cLocal.getColumnIndex("_id"));
productId = cLocal.getInt(cLocal.getColumnIndex("productId"));
state = cLocal.getString(cLocal.getColumnIndex("state"));
purchaseTime = cLocal.getString(cLocal
.getColumnIndex("purchaseTime"));
developerPayload = cLocal.getInt(cLocal
.getColumnIndex("developerPayload"));
if (z < (cLocal.getCount() - 1)) {
cLocal.moveToNext();
}
Toast.makeText(getApplicationContext(), state,Toast.LENGTH_LONG).show();
//Toast.makeText(getApplicationContext(), "Please wait",Toast.LENGTH_LONG).show();
}
//Toast.makeText(getApplicationContext(), "..."+productId+"..."+state+"..."+purchaseTime+"..."+developerPayload,Toast.LENGTH_LONG).show();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With